Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

computeReferences?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
313 Views, 1 Reply

computeReferences?

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

 

 

1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: Anonymous

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community