computeReferences?

computeReferences?

Anonymous
Not applicable
531 Views
1 Reply
Message 1 of 2

computeReferences?

Anonymous
Not applicable

So I have written this function to prompt the user to select a face:

 

        Public Function SelectSingleFace() As Face
           
            Dim selectedReference As Reference = _uidoc.Selection.PickObject(ObjectType.Face, "Select Face")
            Dim e As Element = _uidoc.Document.GetElement(selectedReference.ElementId)
            Return (TryCast(e.GetGeometryObjectFromReference(selectedReference), Face))

        End Function

Which generally works ok, however the returned face does not compute references. ie.

 

SelectSingleFace.Reference = nothing

 

Is there a way to turn on computeReferences prior to calling PickObject?

 

Thanks,

 

Brett

 

 

0 Likes
532 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

No, not that I am aware of.

 

You can query the picked element for its geometry after the pick completes, and specify compute references in that call.

 

Cheers, Jeremy



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