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

display any attribute object data on the dwg file

10 REPLIES 10
Reply
Message 1 of 11
newautocad123
1298 Views, 10 Replies

display any attribute object data on the dwg file

I have imported a shp to dwg. it has the object data attibutes.

 

Suppose I have a point for cities shp imported to dwg. The attribute has name of the city. How can I display the name of the city to each point on the layer of dwg file.

 

Thanks.

10 REPLIES 10
Message 2 of 11

You may get more help by posting a small example file showing the imported data.

Message 3 of 11

the output required is as below:

 

city-dwg.jpg

 

 

 

Message 4 of 11

I have a city layer with the following data. It was exported to the dwg file along with the attribute data. now for editing/ working with this file the labels(it can be name of the city) has to be displayed along with the point. Like the above image for the data as:

 

FeatIdFeatId1OBJECTIDcitycodeCitynamecountrymintempmaxTempPopulationlatlong
24313567735677101DelhiIndia24810000077.1128.4
24353567835678102BangaloreIndia63228900078.113.2
24393567935679103LondonUK101647800079.09-2
24433568035680104newYorkUS14066700080.08-17.2
24473568135681105AustinUS18-1685600081.07-32.4
24513568235682106BerlinGermany22-32104500082.06-47.6
Message 5 of 11
hgasty1001
in reply to: newautocad123

Hi,

 

I'm not sure as the AutoCAD .NET API have a lot of undocumented "things", but I think the only way to read Objectdata is using the MAP API (and so a MAP based product), which have an example of using ObjectData, it also have an API to deal with shape files (and a lot of other GIS related features).

 

If the data is in the form of attributes then  there is a lot of examples of how to deal with, just search for attribute in this forum or in the swamp (http://www.theswamp.org).

 

Also, please, make clear the input of your problem (blocks with attributes, points with OD, hyperlinks, etc) and the output required (a table, a file, etc).

 

Gaston Nunez

 

 

 

 

Message 6 of 11

my input is points with OD  and my output is more on the display side,; ie view the one attribute(name of the city) along with the points. It need not be saved in the .dwg file also. Just be displayed when needed, with some plugins.

Message 7 of 11

When I said small example file, I meant a DWG file containing some of the data, not a JPEG image of it.

Message 8 of 11
norman.yuan
in reply to: newautocad123

ObjectData is specific topic only applies to AutoCAD Map/Civil.

 

Reading/writing data from/to ObjectData is done via AcadMap's COM API (32-bit AutoCAD Map only) and Acad Map ObjectARX API (C++ or .NET).

 

You can download AutoCAD Map ObjectARX SDK (note: MAP ObjectARX SDK, which is different from AutoCAD ObjectARX SDK for vanilla AutoCAD), then you can find .NET code sample of manipulating ObjectData. The sample is very straightforward, and is better than waiting someone write some code for you here. The document coming with the SDK also shows quite some code snippets on ObjectData programming tasks.

Message 9 of 11

please find the city.dwg attached.

 

Went through the examples for Reading the objectdata attributes.  They can be displayed in a grid or any form with .net. But I did not get any example as how a particular attribute related to a point can be displayed on the screen as a text on the screen.

 

 

Message 10 of 11
Balaji_Ram
in reply to: newautocad123

It might be more relevant to post this question in the Map discussion forum, if you have not already done it.

http://forums.autodesk.com/t5/AutoCAD-Map-3D-Developer/bd-p/84

 



Balaji
Developer Technical Services
Autodesk Developer Network

Message 11 of 11

 http://forums.autodesk.com/t5/AutoCAD-Map-3D-Developer/display-attributes-on-the-screen-as-label-for...

 

please suggest whether it is possible or not. With FDO connection labels can be display.

 

programmatically can I display the labels of object data.

 

Thanks.

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