- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
As part of a utility planning project I need to place a large number of objects on to the map at certain geo-coordinates. I would like to do that by using the C# or VB.Net API of AutoCad Map 2020 but found no way to access/define the coordinate data of an object. On the other hand the coordinates can be easily checked/modified within the AutoCad Map 2020 application under the Modify/Properties menu. Here it is possible to change the x,y coordinate values within the pop-up window's 'Geometry' table and the object 'moves' to the new location. That is exactly the functionality that I can not find within the .Net API. The following VBA code gives access to the ODTables of an object but the coordinates are not among them:
Dim tables As ObjectData.Tables
tables = activeProj.ODTables
Dim table As ObjectData.Table
table = tables.Item(FieldName)
Dim fieldDefs As ObjectData.FieldDefinitions = table.FieldDefinitions
Dim recs As ObjectData.Records
recs = table.GetObjectTableRecords(0, BlckID, Constants.OpenMode.OpenForRead, True)
Thanks in advance for any hints about accessing the coordinates data.
Solved! Go to Solution.