var sel = uidoc.Selection;
var reference = sel.PickObject(ObjectType.Element);
var ele = doc.GetElement(reference);
var geoElem = ele.get_Geometry(new Options()); //options 选项 可以选 物体的选项
var solids = new List<Solid>();
foreach(GeometryObject geoObj in geoElem)
{
var solid = geoObj as Solid;
if(solid != null && solid.Volume != 0 && solid.SurfaceArea != 0 )
{
solids.Add(solid);
}
var geoIns = geoObj as GeometryInstance;
if(geoIns != null)
{
var subGeos = geoIns.GetInstanceGeometry();
foreach(GeometryObject subGeoObj in subGeos)
{
var subSolid = subGeoObj as Solid;
if(solid !
【revit二次开发】通过选择模型 找到 solid 进行操作
最新推荐文章于 2024-03-14 17:27:16 发布