![]() |
【转帖】.net 中如何遍历blocktablerecord中的所有实体(包括被删除的)
.net 中如何遍历blocktablerecord中的所有实体(包括被删除的)
www.dimcax.com .net 中如何遍历blocktablerecord中的所有实体(包括被删除的) database db = hostapplicationservices.workingdatabase; transaction trans = db.transactionmanager.starttransaction(); try { blocktable bt = (blocktable)trans.getobject(db.blocktableid, openmode.forread); blocktablerecord btr = (blocktablerecord)trans.getobject(bt[blocktablerecord.modelspace], openmode.forread); bt.dispose(); blocktablerecordenumerator iter = btr.getenumerator(); while (iter.movenext()) { entity ent=(entity) trans.getobject(iter.current, openmode.forwrite, true); } } catch { } finally { trans.dispose(); } 以上代码在autocad7中无法遍历到被删除的实体。各位大侠有没有解决的办法? getobject autodesk.autocad.databaseservices.dbobject 请使用下面这个形式的getobject getobject( autodesk.autocad.databaseservices.objectid id, autodesk.autocad.databaseservices.openmode mode, system.boolean openerased) c#最适合开发autocad,因为它拥有vb容易的特点,却具有vc++的强大功能。 原帖由 admin 于 6-9-13 06:09 pm 发表 getobject autodesk.autocad.databaseservices.dbobject 请使用下面这个形式的getobject getobject( autodesk.autocad.databaseservices.objectid id, autodesk.autocad.databaseservices.openmode m ... |
所有的时间均为北京时间。 现在的时间是 04:22 AM. |