What does Options.ComputeReferences do?

What does Options.ComputeReferences do?

ebarMLN7G
Enthusiast Enthusiast
1,573 Views
2 Replies
Message 1 of 3

What does Options.ComputeReferences do?

ebarMLN7G
Enthusiast
Enthusiast

I need to pass an instance of Options (http://www.revitapidocs.com/2016/aa41fc13-9f81-836c-4271-82568ba5d7e8.htm) to get the geometry from an element:

 

GeometryElement geometryElement = element.get_Geometry(geometryOption);

 

One of the properties in Options class is ComputeReferences (http://www.revitapidocs.com/2016/d7da6de4-74a9-60e2-826f-698a5730d0a8.htm)

 

The documentations on this property doesn't really explain what it does and changing it from false to true doens't really make a difference. I posted a question here:

http://www.revitapidocs.com/2016/d7da6de4-74a9-60e2-826f-698a5730d0a8.htm

 

But didn't get an answer. What exactly does this property do?

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

jeremytammik
Autodesk
Autodesk
Accepted solution

Dear Ehsan,

 

Thank you for your query.

 

I documented this in 2010:

 

https://thebuildingcoder.typepad.com/blog/2010/01/geometry-options.html

 

  • ComputeReferences – this flag sets Revit to make the GeometryObject.Reference property active for each geometry object extracted. When this is false, the property will be null. Remember that the default is false, you must turn this on or your reference will not be accessible.

 

This flag is off by default, because it costs performance to determine the geometry references.

 

They are required for dimensioning and all other operations that need to refer to specific aspects of the element sub-geometry.

 

I hope this clarifies.

 

Cheers,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

Message 3 of 3

ebarMLN7G
Enthusiast
Enthusiast

Oh awesome! Than k you for clarifying that. That make sense.

0 Likes