Why is the first solid from GeometryInstance.GetInstanceGeometry() null or has zero volume/surface area?

Why is the first solid from GeometryInstance.GetInstanceGeometry() null or has zero volume/surface area?

gopinadh7XTGG
Contributor Contributor
186 Views
2 Replies
Message 1 of 3

Why is the first solid from GeometryInstance.GetInstanceGeometry() null or has zero volume/surface area?

gopinadh7XTGG
Contributor
Contributor

When calling GetInstanceGeometry() on a GeometryInstance, the first retrieved Solid always has a volume or surface area of 0. Does anyone know why this happens?

Revit Version: 22.0.2.392

gopinadh7XTGG_0-1740395845810.png

0 Likes
Accepted solutions (1)
187 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

I do not know why this happens. I assume there is a reason. I do not really care what the reason is. I suggest that you prepare your code to be able to handle that situation, and not to rely on it remaining that way. It may depend on the geometry instance interaction with various constraints in the BIM or with other BIM elements. Ours is not to wonder why...

    

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

gopinadh7XTGG
Contributor
Contributor

I understand your point. Instead of relying on this behavior staying the same, I'll make sure the code is robust enough to handle that situation properly. Thanks for the suggestion.

0 Likes