AutoCAD Map 3D Developer
Welcome to Autodesk’s AutoCAD Map 3D Developer Forums. Share your knowledge, ask questions, and explore popular AutoCAD Map 3D Developer topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Object Data Table

1 REPLY 1
Reply
Message 1 of 2
noambbb
453 Views, 1 Reply

Object Data Table

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.

 

 

 

 

 

1 REPLY 1
Message 2 of 2
Alfred.NESWADBA
in reply to: noambbb

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at ... blog.hollaus.at ... CDay 2024
------------------------------------------------------------------------------------
(not an Autodesk consultant)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost