.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to read/ write Object data

3 REPLIES 3
Reply
Message 1 of 4
dancalgary
867 Views, 3 Replies

how to read/ write Object data

can somebody give me an example how to read or write object data to a autocad entity
I am interested only of the portion of code of reading or writing object data

I know how to do this in VBA but I don't know in VB.Net

Set Table1 = A_Map.Projects(ThisDrawing).ODTables.Add("SWGiiT-TABLE", "Location of data", Definitions1, True)
or
Set Table1 = A_Map.Projects(ThisDrawing).ODTables.Item("SWGiiT-TABLE")

Thanks
3 REPLIES 3
Message 2 of 4
norman.yuan
in reply to: dancalgary

There are two sets of API you can access ObjectData in Acad Map: COM API and ObjectARX MAP .NET API.

You can still use COM API as you do in VBA by setting reference to "amvbapi.tlb", and do basically the same thing as you do in VBA.

However, since you use .NET language, you'd better do it with ObjectARX MAP .NET API, by setting reference to ManagedMapAPI.dll. In the .NET API, look into namespace Autodesk.Gis.Map.Project/ObjectData/Utilities...

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 4
dancalgary
in reply to: dancalgary

I know about diferences between com and net
I already have managedmapapi.dll referenced and allready I have seen the classes
Autodesk.Gis.Map.Utilities
Autodesk.Gis.Map.Project
and
Autodesk.Gis.Map.ObjectData
But I couldn't find an example showing how you can manipulate object data
Can somebody help me?
Thanks
Message 4 of 4
norman.yuan
in reply to: dancalgary

Have you downloaded Map ObjecyARX SDK?

It comes with quite some code samples, including .NET API samples. One of the sampe is specific for ObjectData in C#/VB.BET/C++.

Actually, the Map ObjectARX .NET Developer Guide comes wth Map ObehctARX SDK includes quite some sample code, too.

Norman Yuan

Drive CAD With Code

EESignature

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost