问题描述
我想使用AutoCad的VB.net API访问和修改AutoCad Map模型空间内对象的地理坐标。本来我以为这应该很简单,但是令人惊讶的是我找不到解决方案。
使用以下代码,可以访问对象数据,但是对象的地理坐标是非常基本的参数,可以在“修改/属性”菜单的“几何”下针对AutoCad Map应用程序中的每个对象进行检查或修改。表-似乎不可访问,至少使用“几何”作为字段名称会产生异常。
Dim tables As ObjectData.Tables
tables = activeProj.ODTables ' this Could be the problem as ODTables do not seem to contain the coordinates but then which table does?
Dim table As ObjectData.Table
table = tables.Item(FieldName) 'any Field within the ODTables can be referred to by a respective FieldName but the object coordinates are not there
Dim fieldDefs As ObjectData.FieldDeFinitions = table.FieldDeFinitions
Dim recs As ObjectData.Records
recs = table.GetobjectTableRecords(0,BlckID,Constants.OpenMode.OpenForRead,True)
如果有人可以建议如何访问存储对象坐标的表/记录,那就太好了,因为如前所述,上面的代码似乎只能访问用户定义的对象数据。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)