I am trying to write a code that attaches data to Object Data Tables
The code works in AutoCAD Map 3D 2012 but does not work in AutoCAD Map 3D 2017.
Code that worked in older versions:
Dim ODtb As AutocadMAP.ODtable
Dim oRecords As AutocadMAP.ODRecords
Dim TblName as String
Dim bRetVal as Boolean
Set ODtb = MyMapApp.Projects(0).ODtables.Item(TblName)
Set oRecords = ODtb.GetODRecords()
bRetVal = oRecords.Init(AcadObj, True, True)
The code for oRecords.Init(AcadObj, True, True) does not work for the current version, generates an 'ArgumentException was unhandled' error.
Thanks for your help,
Noam.
Hi,
TblName is not set to a valid value in your code snippet, that can't work (also not in 2012).
Either that snippet is not complete to test (then please add the missing parts) and upload a drawing you are working with (where object data exists which you try to access).
Other question: are you working with VBA, VB6 or VB.NET?
- alfred -