Jump to content

Recommended Posts

Posted

Hi All,

To access the object data in autodesk map 3D 2011, I used the below VBA code.

 

Dim amap As AcadMap

Set amap = ThisDrawing.Application. _

GetInterfaceObject("AutoCADMap.Application")

amap.Projects(ThisDrawing).ODTables.Item(i).Name

 

I want to do the same process in VB.NET.

Please help me to solve this issue.

 

Thanks,

VIVEKGIS

Posted

This old post may be of use:

 

The Map 3D ObjectARX SDK has three Object Data samples (C++, C#, and VB.NET) here :thumbsup::

 

attachment.php?attachmentid=37594&d=1349184403

 

 

 

 

 

 

 

OBJECTDATA .Net API Sample ReadMe

 

© Copyright 2004-2009 by Autodesk, Inc.

 

 

By using this code, you are agreeing to the terms

and conditions of the License Agreement that appeared

and was accepted upon download or installation

(or in connection with the download or installation)

of the Autodesk software in which this code is included.

All permissions on use of this code are as set forth

in such License Agreement provided that the above copyright

notice appears in all authorized copies and that both that

copyright notice and the limited warranty and

restricted rights notice below appear in all supporting

documentation.

 

AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.

AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF

MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.

DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE

UNINTERRUPTED OR ERROR FREE.

 

Use, duplication, or disclosure by the U.S. Government is subject to

restrictions set forth in FAR 52.227-19 (Commercial Computer

Software - Restricted Rights) and DFAR 252.227-7013©(1)(ii)

(Rights in Technical Data and Computer Software), as applicable.

 

 

Trademarks

 

AutoCAD Map 3D is a registered trademark of Autodesk, Inc., in the

USA and/or other countries.

 

All other brand names, product names or trademarks belong to

their respective holders.

 

 

===============================================================================

Readme.txt for ObjectData .NET API sample for AutoCAD Map 3D 2008

===============================================================================

 

This sample demonstrates how to use some features of ObjectData.

 

Build steps

-------------------------------------------------------------------------------

 

1) Open the project with Microsoft Visual Studio 2008.

 

2) In the Solution Explorer->ObjectDataCS->References,

add References files: acdbmgd.dll, acmgd.dll and ManagedMapAPI.dll.

The default path is the directory where you installed Map 3D,

e.g., C:\Program Files\AutoCAD Map 3D 2010.

 

3) Build the sample application to obtain the ObjectDataCS.dll file.

 

Loading the sample application

-------------------------------------------------------------------------------

To load the sample application

1. Enter "NETLOAD" on the Command Line of AutoCAD Map 3D.

2. Choose ObjectDataCS.dll in the file browser.

 

Using the sample

-------------------------------------------------------------------------------

 

This sample demonstrates:

- How to define an ObjectData Table.

- How to add a record to an entity with ObjectData Table definition.

- How to show the contents of records associated with an entity.

- How to remove an ObjectData record from an entity.

- How to remove an ObjectData Table.

 

- Load this dll application in AutoCAD Map 3D.

 

- Open or Create a drawing with an entity.

 

- Run the command "CreateTable".

- It will define a table named "MyODTable" that contains four field

definitions:

Field Name Value Type

 

FIRST_FIELD Character

SECOND_FIELD Integer

THIRD_FIELD Real

LAST_FIELD Point

 

- Run the command "AddRecord".

- Select an entity to which add the new record.

 

- Repeat to add records to the entity as you wish.

 

- Run the command "ShowRecords".

- Select an entity which all records associated with will be listed.

 

- Run the command "DeleteRecord".

- Select an entity from which you want to remove a record.

- All records associated with the entity will be listed by index.

- Choose an index you want to remove.

 

- Run the command "RemoveTable".

- Remove the table defined in CreateTable command.

HTH

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...