Revit二次开发:创建FamilyInstance无法获取面
作者:
BIMnotes | 来源:发表于
2020-02-24 13:10 被阅读0次
![](https://img.haomeiwen.com/i15587633/b13e320522d0f8dc.png)
make sure to turn on the option
- 使用NewFamilyInstance带有face的重载,必须用Element.Geometry 获取,并打开ComputeReferences选项
Face face = null;
Options geomOptions = new Options();
geomOptions.ComputeReferences = true;
GeometryElement wallGeom = wall.get_Geometry(geomOptions);
foreach (GeometryObject geomObj in wallGeom)
{
Solid geomSolid = geomObj as Solid;
if (null != geomSolid)
{
foreach (Face geomFace in geomSolid.Faces)
{
face = geomFace;
break;
}
break;
}
}
- 连续的墙体,对于共面的墙无法获取reference。取消墙连接即可。
WallUtils.DisallowWallJoinAtEnd(wall, 0);
本文标题:Revit二次开发:创建FamilyInstance无法获取面
本文链接:https://www.haomeiwen.com/subject/nmamqhtx.html
网友评论