Author Topic: How to get data from Property Pane?  (Read 3715 times)

0 Members and 1 Guest are viewing this topic.

n.yuan

  • Bull Frog
  • Posts: 348
Re: How to get data from Property Pane?
« Reply #15 on: July 21, 2020, 11:51:43 AM »
I saw your original post in Autodesk's "AutoCAD Map Developer" forum and hesitated to post reply, because you mentioned "IM" (Industrial Models) and "Object Data" in the title of your post. "Object Data" is Acad Map SPECIFIC approach to attach attribute to AutoCAD NATIVE entities, it does not mix with IM (at least, AFAIK). Plus, the picture posted is not in English (German, I guess?), it makes it a guess game to answer your question.

Now that you attached a drawing here under the insistence of the other repliers, I downloaded it and tried to open it. Of course, as you correctly pointed out, the drawing originally was connected to IM database. Without the DB connection, the drawing would show nothing meaningful. I could see that (based on the drawing file name), you probably tried to export the data into SDF file and connect to the drawing to the SDF file as FDO Map data source. But since you did not also provide the SDF file, the drawing would also not show the map feature data at all (except for an empty map layer in the drawing. Besides, while both IM data and FDO map source data would be shown in opened drawing in Acad Map as "MapBulkFeature", they are brought into drawing with different APIs: IM API and Acad Map Geospatial API (formerly called "Platform API").

AutoCAD Map has many sets of API to deal with "mapping" data:

1. Object Data is the earliest attempt Autodesk built for mapping, which ONLY applies to AutoCAD NATIVE entities, quite similar to XData/ExtensionDictionary attached to Acad entities. BTW, it is your mentioning of "Object Data" that confused some responders here (me included), thus some responds that relate to "Object Data" totally do not address your question.

2. Geospatial API, which connect Acad Map tp FDO sources (be it shape/SDF/geodatabase...) and visually presents the feature data as MapBulkFeature, which is not AutoCAD native entity.

3. IM API, which is "specialized geospatial" API to deal with feature data. similar to Geospatial API, but has its own set of API not only deals with the external feature data, but also provides some UI handing functionalities.

2 and 3 are all .NET APIs

IM is not widely used (I guess Autodesk now very regret that they have to bear the burden of supporting this rarely used API for years to come), many AutoCAD Map uses/programmers have not touched it, or even heard of it.

In your case, if you want to get information of MapBulkFeature's data (Feature's properties and associated geometry's properties), you DO NOT try to access the Properties Window, you need to use IM API to access them. There is huge amount of sample codes that comes with AutoCAD Map's installation at "C:\Program Files\AutoCAD20xx\Map\Development\Samples\". It would be quite some learning/studying ahead of you, if you have deal with IM with AutoCAD Map.

Some of the other responders mentioned "PropertySet Data". That does not apply to your IM related question. While "PropertySet Data" is yet another approach to attach attribute data in AutoCAD vertical, it is not available for pure AutoCAD Map, unless one uses AutoCAD Civil3D, which is built on top of AutoCAD Map.

Hope this at least provides some background information for you to look into.




Peter2

  • Swamp Rat
  • Posts: 653
Re: How to get data from Property Pane?
« Reply #16 on: July 21, 2020, 02:20:18 PM »
Thanks n.yuan

for your detailed and high-class explanation.

I'm sorry about the "object data" confusion, it derived from "data / property / object property"..., so I added a screenshot, hoping it makes it clearer.
One year ago I was not aware that IM is so exotic  :?, but since then I saw that many of my questions stayed unanswered.

The code samples you mentioned are from VB.net and C#, and this is beyond my current knowledge. I hoped to find some ready-to-use code snippets or mini-executables, but I have to bury this vision.

Quote
(I guess Autodesk now very regret that they have to bear the burden of supporting this rarely used API for years to come),
"Support" is a rather elastic term ...
Peter

AutoCAD Map 3D 2023 German (so some technical terms will be badly retranslated to English)
BricsCAD V23

n.yuan

  • Bull Frog
  • Posts: 348
Re: How to get data from Property Pane?
« Reply #17 on: July 21, 2020, 03:58:16 PM »
Because of using the term "Object Data", some tried to show you how to access Object Data in AutoCAD Map with VisualLisp code, which eventually led to you posting in AutoLisp forum here.

Lisp can access COM API via late-binding, thus can be used to manipulate Object Data in AutoCAD Map because Object Data is exposed via both COM API and .NET API.  Unfortunately, as I already pointed out, AutoCAD Map's IM API (and Geospatial API) is .NET API, which cannot be accessed by VisualLisp. So, the only way to solve your issue is to learn IM API (and AutoCAD/Map .NET) programming, using either VB.NET or C#.