VivekGIS Posted March 1, 2013 Posted March 1, 2013 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 Quote
BlackBox Posted March 1, 2013 Posted March 1, 2013 This old post may be of use: The Map 3D ObjectARX SDK has three Object Data samples (C++, C#, and VB.NET) here : 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 Quote
SLW210 Posted March 1, 2013 Posted March 1, 2013 Please read the CODE POSTING GUIDELINES and edit your post to include Code Tags. Quote
Recommended Posts
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.