Issue
I'm trying to align two elements. NewAlignment() method requires references as arguments. But faces/edges returned from Element.Geometry has no reference. It simply returns null. How can I obtain references from a given element?
Solution
If you need to access valid reference objects from the give geometry, you will need to set CalculateReferences property of geometry option to true before you call Geometry. By default, it is set to false for performance reason: e.g.,
Options geomOp = m_app.Create.NewGeometryOptions();
geomOp.ComputeReferences = true;

Leave a Reply