revit二次开发之选择实体的某个面


 

 

UIApplication uiApp = commandData.Application;
Autodesk.Revit.ApplicationServices.Application application = uiApp.Application;
UIDocument uiDocument = uiApp.ActiveUIDocument;
Document document = uiDocument.Document;

Selection selection = uiDocument.Selection;  

Reference bridgeFace = selection.PickObject(ObjectType.Face, "选面");  //选择面类型

Element face = document.GetElement(bridgeFace);  //实体

Face downFace = face.GetGeometryObjectFromReference(bridgeFace) as Face; //

Face pf = downFace as PlanarFace;  //这个就是最后的Face面

return Result.Succeeded;

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM