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: 

Retrieve face from pick face of plates

3 REPLIES 3
Reply
Message 1 of 4
mr.engineer.aec
553 Views, 3 Replies

Retrieve face from pick face of plates

 Hi All,

I'm using Revit 2020.

I want to retrieve face from pick face of plates but result is null. (face = null)
Can i do this at Revit 2020 API ? and how ?
 Thank in advanced !

 

 

Reference pickObject = UiDoc.Selection.PickObject(ObjectType.Face, "Please select Face");

Face face = Doc.GetElement(pickObject).GetGeometryObjectFromReference(pickObject) as Face;

 

 

pickface.png 

Tags (2)
3 REPLIES 3
Message 2 of 4

This one is an easy solve. 

 

Element myElement = Doc.GetElement(pickObject.ElementId);

Face myFace = myElement.GetGeometryObjectFromReference(pickObject) as Face;

 

If they're handing out free donuts....TAKE ONE. 

Message 3 of 4

 Hi @joshua.lumley 

Thank for your help. But still can't get face
pickface.png

Message 4 of 4

Can you post the whole code.

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

Post to forums  

Autodesk Design & Make Report