Skip to content

Commit

Permalink
fix(rvt): Updates leftover GenericModels category references in Rev…
Browse files Browse the repository at this point in the history
…it conversions. (#2138)

fix(revit): Leftover `GenericModels` category changed for singular `GenericModel`
  • Loading branch information
AlanRynne authored Feb 10, 2023
1 parent e537455 commit 36e8a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public ApplicationObject DirectShapeToNative(DirectShape speckleDs, ToNativeMesh

BuiltInCategory bic;
if ((int)speckleDs.category == -1)
speckleDs.category = RevitCategory.GenericModels;
speckleDs.category = RevitCategory.GenericModel;
var bicName = Categories.GetBuiltInFromSchemaBuilderCategory(speckleDs.category);

BuiltInCategory.TryParse(bicName, out bic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private string CreateFreeformElementFamily(List<DB.Solid> solids, string name, o
{
//by default free form elements are always generic models
//otherwise we'd need to supply base files for each category..?
var bicName = Categories.GetBuiltInFromSchemaBuilderCategory(BuiltElements.Revit.RevitCategory.GenericModels);
var bicName = Categories.GetBuiltInFromSchemaBuilderCategory(BuiltElements.Revit.RevitCategory.GenericModel);
BuiltInCategory.TryParse(bicName, out bic);
cat = famDoc.Settings.Categories.get_Item(bic);
if (cat.SubCategories.Contains(freeformElement.subcategory))
Expand Down Expand Up @@ -209,4 +209,4 @@ private string CreateFreeformElementFamily(List<DB.Solid> solids, string name, o
return tempFamilyPath;
}
}
}
}

0 comments on commit 36e8a97

Please sign in to comment.