Skip to content

8.0 Deployment #1517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Revit_Adapter/Revit_Adapter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<Description>https://github.com/BHoM/Revit_Toolkit</Description>
<Version>6.0.0</Version>
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Adapter.Revit</RootNamespace>
<FileVersion>7.3.0.0</FileVersion>
<FileVersion>8.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Revit_Core_Adapter/Revit_Core_Adapter.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<Description>https://github.com/BHoM/Revit_Toolkit</Description>
<Version>6.0.0</Version>
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Revit.Adapter.Core</RootNamespace>
<FileVersion>7.3.0.0</FileVersion>
<FileVersion>8.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
8 changes: 8 additions & 0 deletions Revit_Core_Engine/Create/FamilyInstance/FamilyInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,14 @@ private static FamilyInstance FamilyInstance_WorkPlaneBased(Document document, F
if (orientation.BasisZ.DotProduct(orientation.BasisX.CrossProduct(orientation.BasisY)) < 0)
refDir = -refDir;
}
else if (((host.Location as LocationCurve)?.Curve) is Line line)
{
Transform linkTransform = linkInstance?.GetTotalTransform() ?? Transform.Identity;
if (!linkTransform.IsIdentity)
line = line.CreateTransformed(linkTransform) as Line;

refDir = line.Direction;
}

FamilyInstance familyInstance = document.Create.NewFamilyInstance(reference, location, refDir, familySymbol);

Expand Down
1 change: 0 additions & 1 deletion Revit_Core_Engine/Query/LinkedElementsInView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
/**** Public methods ****/
/***************************************************/

[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.LinkedElementsInView(Autodesk.Revit.DB.ViewPlan, Autodesk.Revit.DB.RevitLinkInstance, System.Collections.Generic.List<Autodesk.Revit.DB.ElementFilter>)")]
[Description("Return elements from the revit link instance located in the view scope (including hidden elements)")]

Check warning on line 36 in Revit_Core_Engine/Query/LinkedElementsInView.cs

View check run for this annotation

BHoMBot-CI / beta-documentation-compliance

Revit_Core_Engine/Query/LinkedElementsInView.cs#L36

Documentation attribute should end with grammatically correct punctuation (., !, or ?) - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/AttributeHasEndingPunctuation
[Input("view", "View to get visible elements from. The view needs to belong to the host document.")]
[Input("linkInstance", "Revit link instance to get the elements from.")]
[Input("elementFilters", "Additional filters for the element collector. If null, no additional filters will be applied.")]
Expand Down
1 change: 0 additions & 1 deletion Revit_Core_Engine/Query/SpecFromName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public static partial class Query
/**** Public methods ****/
/***************************************************/

[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.UnitTypeByPropertyName(System.String)")]
[Description("Returns Revit spec object (enum for Revit up to 2020 or ForgeTypeId for later versions) based on SpecTypeId property name that represents it.")]
[Input("name", "Name of SpecTypeId property to be queried for the correspondent spec.")]
[Output("spec", "Spec object under the input SpecTypeId property name.")]
Expand Down
3 changes: 0 additions & 3 deletions Revit_Core_Engine/Query/SpecName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ public static partial class Query
/**** Public methods ****/
/***************************************************/

[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.UnitTypePropertyName(Autodesk.Revit.DB.UnitType)")]
[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.UnitTypePropertyName(Autodesk.Revit.DB.ForgeTypeId)")]
[Description("Returns name of SpecTypeId property that contains a given Revit spec object (enum for Revit up to 2020 or ForgeTypeId for later versions).")]
[Input("spec", "Spec object to be queried for the correspondent SpecTypeId property name.")]
[Output("name", "Name of SpecTypeId property that contains the input spec object.")]
Expand All @@ -55,7 +53,6 @@ public static string SpecName(this ForgeTypeId spec)

/***************************************************/

[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.UnitTypePropertyName(Autodesk.Revit.DB.Parameter)")]
[Description("Returns name of SpecTypeId property that contains given Revit parameter's spec object (enum for Revit up to 2020 or ForgeTypeId for later versions).")]
[Input("parameter", "Parameter to be queried for the correspondent SpecTypeId property name.")]
[Output("name", "Name of SpecTypeId property that contains the spec object correspondent to the input parameter.")]
Expand Down
3 changes: 1 addition & 2 deletions Revit_Core_Engine/Query/ViewSolid.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
Expand Down Expand Up @@ -35,7 +35,6 @@ public static partial class Query
/**** Public methods ****/
/***************************************************/

[PreviousVersion("7.3", "BH.Revit.Engine.Core.Query.ViewSolid(Autodesk.Revit.DB.View)")]
[Description("Returns a solid that represents the 3-dimensional extents of a given view.")]
[Input("view", "View to compute the solids.")]
[Input("createUnlimitedIfViewUncropped", "If false, the method will return null in case of missing crop box (i.e. the view is unlimited, so it cannot be represented by a solid). If true, uncropped views will produce an 'unlimited' solid roughly 1e+6 by 1e+6 in dimensions perpendicular to the view direction, with depth equal to view depth or 1e+4 in case of views without depth.")]
Expand Down
4 changes: 2 additions & 2 deletions Revit_Core_Engine/Revit_Core_Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<Description>https://github.com/BHoM/Revit_Toolkit</Description>
<Version>6.0.0</Version>
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Revit.Engine.Core</RootNamespace>
<FileVersion>7.3.0.0</FileVersion>
<FileVersion>8.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
18 changes: 18 additions & 0 deletions Revit_Engine/Create/Generic/RevitFilePreview.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
using BH.oM.Base.Attributes;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Xml.Linq;

namespace BH.Engine.Adapters.Revit
Expand All @@ -39,14 +40,31 @@ public static partial class Create
[Output("revitFilePreview")]
public static RevitFilePreview RevitFilePreview(string path)
{
// Find the family document
XDocument xDocument = path.XDocument();
if (xDocument == null)
return null;

// Get category and family name
string categoryName = xDocument.CategoryName();
string familyName = System.IO.Path.GetFileNameWithoutExtension(path);

// Scrape type names from the file itself
List<string> familyTypeNames = xDocument.FamilyTypeNames();

// Scrape type names from the sister .txt file if exists
string txtPath = path.Replace(".rfa", ".txt");
if (System.IO.File.Exists(txtPath))
{
foreach (string line in System.IO.File.ReadAllLines(txtPath).Skip(1))
{
string[] splitLine = line.Split(',');
if (splitLine.Length != 0 && !familyTypeNames.Contains(splitLine[0]))
familyTypeNames.Add(splitLine[0]);
}
}

familyTypeNames.Sort();
return new RevitFilePreview(path, categoryName, familyName, familyTypeNames);
}

Expand Down
4 changes: 2 additions & 2 deletions Revit_Engine/Revit_Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<Description>https://github.com/BHoM/Revit_Toolkit</Description>
<Version>6.0.0</Version>
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.Engine.Revit</RootNamespace>
<FileVersion>7.3.0.0</FileVersion>
<FileVersion>8.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
4 changes: 2 additions & 2 deletions Revit_oM/Revit_oM.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<AssemblyVersion>7.0.0.0</AssemblyVersion>
<AssemblyVersion>8.0.0.0</AssemblyVersion>
<Description>https://github.com/BHoM/Revit_Toolkit</Description>
<Version>6.0.0</Version>
<Authors>BHoM</Authors>
<Copyright>Copyright © https://github.com/BHoM</Copyright>
<RootNamespace>BH.oM.Revit</RootNamespace>
<FileVersion>7.3.0.0</FileVersion>
<FileVersion>8.0.0.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down