hatchelhoff 发表于 2022-7-6 22:40:40

外部参照块表记录

是否可以获取外部参照中对象的块表记录。

Jeff H 发表于 2022-7-6 23:11:36


如果是BlockTableRecord。IsFromExternalReference将为true,并查看XrefGraph类

hatchelhoff 发表于 2022-7-6 23:31:38

谢谢杰夫
我使用了你的代码,但我得到一个错误,它说
属性“IsFromExternalReference”为“ReadOnly”
 

Dim Doc as Document = Application.DocumentMAnager.MdiActiveDocument
Dim db as Database = doc.Database
Dim ed as Editor = doc.Editor
Dim bt as BlockTable = db.BlockTableId.GetObject(OpenMode.ForRead)
Dim btr As BlockTableRecord = bt(BlockTableRecord.ModelSpace).GetObject(OpenMode.ForWrite)
btr.IsFromExternalReference = True

Jeff H 发表于 2022-7-6 23:53:41

这只会告诉您BlockTableRecord是否为外部参照,并且您无法更改它。
页: [1]
查看完整版本: 外部参照块表记录