The key questions:
1. How can we access, using API (no interactive User selection), a specific face of a Pad feature?
2. How can we get the Object (to which the reference was created) from the Reference? This is reverse of CreateReferenceFromObject.
What I am trying to do:
I am trying to programmatically select a face of a Pad and calculate its area using measurable. (I have been able to successfully do it manually, and using Interactive selection in code. But I want to avoid interactive User selection).
What I have done so far:
For identifying a specific face, I have added a point (HybridShapePointOnSurface) on it. Using code I am able to access this point. But I am unable to get the face on which that point resides.
The point has a Surface property that returns a Reference object which causes error in Area property of Measurable object. I believe, the Measurable object needs the native object and not a Reference object.
So the question - how can we get Object from Reference.
Alternatives:
There can be other alternatives like assigning a different color to the face.
But it would be nice to know if this alternative is also available.
NB: I tried to record the manual process, but nothing was recorded.
Suggestions are welcome.
1. How can we access, using API (no interactive User selection), a specific face of a Pad feature?
2. How can we get the Object (to which the reference was created) from the Reference? This is reverse of CreateReferenceFromObject.
What I am trying to do:
I am trying to programmatically select a face of a Pad and calculate its area using measurable. (I have been able to successfully do it manually, and using Interactive selection in code. But I want to avoid interactive User selection).
What I have done so far:
For identifying a specific face, I have added a point (HybridShapePointOnSurface) on it. Using code I am able to access this point. But I am unable to get the face on which that point resides.
The point has a Surface property that returns a Reference object which causes error in Area property of Measurable object. I believe, the Measurable object needs the native object and not a Reference object.
So the question - how can we get Object from Reference.
Alternatives:
There can be other alternatives like assigning a different color to the face.
But it would be nice to know if this alternative is also available.
NB: I tried to record the manual process, but nothing was recorded.
Suggestions are welcome.