如何根据对像OBJECTID 取得对像名称?
<P>如标题所示。还望大侠指点。</P> 好了,找到解决方案了。 请问楼主是如何取得的 Public ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor<BR> Public Function objectidtoacadobject(ByVal objid As ObjectId) As AcadObject<BR> Dim obj2 As AcadObject<BR> Dim db = HostApplicationServices.WorkingDatabase<BR> Dim trans As Transaction = db.TransactionManager.StartTransaction()<BR> Dim ent As Entity = trans.GetObject(objid, OpenMode.ForRead, False)<BR> obj2 = ent.AcadObject<BR> Return obj2<BR> End Function
页:
[1]