C# 根据Objectid 判断图块是在模型还是布局(图元所在的空间)
ObjectId objectid = ObjectId.Null; ;BlockReference blkRef= trans.GetObject(objectid ,OpenMode.ForRead) as BlockReference;
BlockTableRecord data = trans.GetObject(blkRef.OwnerId, OpenMode.ForRead) as BlockTableRecord ;
Layout ly = data.LayoutId.GetObject(OpenMode.ForRead) as Layout;
//获取 布局名称
string name1 = ly.LayoutName;
页:
[1]