Skip to content

Commit

Permalink
Improved Types.GraphicalElement.ToModelContent.
Browse files Browse the repository at this point in the history
Now it exports the `Frame`.
  • Loading branch information
kike-garbo committed Dec 4, 2024
1 parent eee3a77 commit ac90b05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/RhinoInside.Revit.GH/Types/GeometricElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -897,6 +897,7 @@ internal override ModelContent ToModelContent(IDictionary<ARDB.ElementId, ModelC
attributes.Name = element.get_Parameter(ARDB.BuiltInParameter.ALL_MODEL_MARK)?.AsString() ?? string.Empty;
attributes.Url = element.get_Parameter(ARDB.BuiltInParameter.ALL_MODEL_URL)?.AsString() ?? string.Empty;
attributes.Layer = Category.ToModelContent(idMap) as ModelLayer;
attributes.Frame = Location;

modelContent = attributes.ToModelData() as ModelContent;
//idMap.Add(Id, modelContent);
Expand Down
1 change: 1 addition & 0 deletions src/RhinoInside.Revit.GH/Types/Instances/FamilyInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ internal override ModelContent ToModelContent(IDictionary<ARDB.ElementId, ModelC
attributes.Name = element.get_Parameter(ARDB.BuiltInParameter.ALL_MODEL_MARK)?.AsString() ?? string.Empty;
attributes.Url = element.get_Parameter(ARDB.BuiltInParameter.ALL_MODEL_URL)?.AsString() ?? string.Empty;
attributes.Layer = Category?.ToModelContent(idMap) as ModelLayer;
attributes.Frame = Location;

modelContent = attributes.ToModelData() as ModelContent;
//idMap.Add(Id, modelContent);
Expand Down
1 change: 1 addition & 0 deletions src/RhinoInside.Revit.GH/Types/Model/CurveElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ internal override ModelContent ToModelContent(IDictionary<ARDB.ElementId, ModelC
var attributes = ModelObject.Cast(new GH_Curve(curve.GeometryCurve.ToCurve())).ToAttributes();
//attributes.Name = DisplayName;
attributes.Layer = Category.ToModelContent(idMap) as ModelLayer;
attributes.Frame = Location;

modelContent = attributes.ToModelData() as ModelContent;
//idMap.Add(Id, modelContent);
Expand Down

0 comments on commit ac90b05

Please sign in to comment.