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

0 Members and 1 Guest are viewing this topic.

Peter2

  • Swamp Rat
  • Posts: 650
How to get data from Property Pane?
« on: July 13, 2020, 09:32:34 AM »
Hi
The original "Property Pane" from AutoCAD shows sometimes properties of one or many elements which are not that easy to get - see the example here, taken from AutoCAD MAP with Industry Model, based on Oracle.


So I think it is sometimes easier to analyse and use the data from Property Pane instead from the objects themselves.
Are there tools to get the data from the pane?
Or is my idea not that great as I think?
Peter

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

ribarm

  • Gator
  • Posts: 3251
  • Marko Ribar, architect
Re: How to get data from Property Pane?
« Reply #1 on: July 13, 2020, 10:19:37 AM »
Have you tried something like :
(dumpallproperties (car (entsel)))

Then to get/set you have :
(setpropertyvalue (car (entsel)) "Property" "Value")
(getpropertyvalue (car (entsel)) "Property")

"Property" and "Value" are just my examples - you should be using what you get/see when (dumpallproperties (car (entsel)))
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get data from Property Pane?
« Reply #2 on: July 13, 2020, 10:44:13 AM »
Hi Marco

the problem that "MAP with Industry Model" (on oracle) has a dataflow in background which I don't know and uses for everything the object "AcMapBulkFeature". E.g dumping a text (similar to the example above) I get this:

Code - Auto/Visual Lisp: [Select]
  1. Objekt wählen: Begin dumping object (class: AcMapBulkFeature)
  2. Annotative (type: bool)  (LocalName: Beschriftung) = Failed to get value
  3. AnnotativeScale (type: AcString)  (RO)  (LocalName: Beschriftungs-Maßstab) = Failed to get value
  4. BlockId (type: AcDbObjectId)  (RO) = 16ea11089f0
  5. CastShadows (type: bool) = 1
  6. ClassName (type: AcString)  (RO) =
  7. CollisionType (type: AcDb::CollisionType)  (RO) = 1
  8. Color (type: AcCmColor)  (LocalName: Farbe) = VONLAYER
  9. ExtensionDictionary (type: AcDbObjectId)  (RO) = 0
  10. Handle (type: AcDbHandle)  (RO) = 9fc
  11. HasFields (type: bool)  (RO) = 0
  12. HasSaveVersionOverride (type: bool) = 0
  13. Hyperlinks (type: AcDbHyperlink*)
  14. IsA (type: AcRxClass*)  (RO) = AcMapBulkFeature
  15. IsAProxy (type: bool)  (RO) = 0
  16. IsCancelling (type: bool)  (RO) = 0
  17. IsEraseStatusToggled (type: bool)  (RO) = 0
  18. IsErased (type: bool)  (RO) = 0
  19. IsModified (type: bool)  (RO) = 0
  20. IsModifiedGraphics (type: bool)  (RO) = 0
  21. IsModifiedXData (type: bool)  (RO) = 0
  22. IsNewObject (type: bool)  (RO) = 0
  23. IsNotifyEnabled (type: bool)  (RO) = 0
  24. IsNotifying (type: bool)  (RO) = 0
  25. IsObjectIdsInFlux (type: bool)  (RO) = 0
  26. IsPersistent (type: bool)  (RO) = 1
  27. IsPlanar (type: bool)  (RO) = 0
  28. IsReadEnabled (type: bool)  (RO) = 1
  29. IsReallyClosing (type: bool)  (RO) = 1
  30. IsTransactionResident (type: bool)  (RO) = 0
  31. IsUndoing (type: bool)  (RO) = 0
  32. IsWriteEnabled (type: bool)  (RO) = 0
  33. LayerId (type: AcDbObjectId)  (LocalName: Layer) = 16ea110ed10
  34. LineWeight (type: AcDb::LineWeight)  (LocalName: Linienstärke) = -1
  35. LinetypeId (type: AcDbObjectId)  (LocalName: Linientyp) = 16ea1108950
  36. LinetypeScale (type: double)  (LocalName: Linientypfaktor) = 1.000000
  37. LocalizedName (type: AcString)  (RO) =
  38. MaterialId (type: AcDbObjectId)  (LocalName: Material) = 16ea1108dc0
  39. MergeStyle (type: AcDb::DuplicateRecordCloning)  (RO) = 1
  40. ObjectId (type: AcDbObjectId)  (RO) = 16ece87fe40
  41. OwnerId (type: AcDbObjectId)  (RO) = 16ea11089f0
  42. PlotStyleName (type: AcString)  (RO)  (LocalName: Plotstil) = VonFarbe
  43. ReceiveShadows (type: bool) = 1
  44. ShadowDisplay (type: AcDb::ShadowFlags)  (LocalName: Schattenanzeige) = 0
  45. Transparency (type: AcCmTransparency)  (LocalName: Transparenz) = 0
  46. Visible (type: AcDb::Visibility) = 0
  47. End object dump

And this is why I thought "Don't search for the real data - just take the displayed data" ....
Peter

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

jvillarreal

  • Bull Frog
  • Posts: 332
Re: How to get data from Property Pane?
« Reply #3 on: July 13, 2020, 11:57:33 AM »
Look into the object data functions.
Here's one resource:
https://documentation.help/AutoCAD-Map-3D-2009-AutoLISP/object_data_functions.htm

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: How to get data from Property Pane?
« Reply #4 on: July 13, 2020, 12:14:42 PM »
Examples here: https://www.theswamp.org/index.php?topic=51728.0
The ade_odgetfield function from jvillarreal's link is the most common way to get that record but you need the Table name as well.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

BIGAL

  • Swamp Rat
  • Posts: 1407
  • 40 + years of using Autocad
Re: How to get data from Property Pane?
« Reply #5 on: July 14, 2020, 02:19:08 AM »
Object data has good references. Property data can also exist and is a bit of a nightmare to get at unless you have access to the right .dll's. Civ3d on its own is an example, the dll's are in Autocad Architecture but not Civ3d you can see them in the properties box. Creating them by external program can be done but how to retrieve programatically.
A man who never made a mistake never made anything

Rod

  • Newt
  • Posts: 185
Re: How to get data from Property Pane?
« Reply #6 on: July 14, 2020, 02:50:28 AM »
I did some experimenting with reading property sets using lisp, but I had to install an autocad architecture trial to get the required dlls.
See https://www.theswamp.org/index.php?topic=54460.msg598224#msg598224
I haven't furthered it any more, just too busy.

Sounds like you are after object data anyway

+2 for ade_odgetfield
"All models are wrong, some models are useful" - George Box

BIGAL

  • Swamp Rat
  • Posts: 1407
  • 40 + years of using Autocad
Re: How to get data from Property Pane?
« Reply #7 on: July 15, 2020, 12:19:48 AM »
Thanks Rod it was a civ3d property set question and yes no .dll available. Just mentioned as property set data looks similar.
A man who never made a mistake never made anything

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get data from Property Pane?
« Reply #8 on: July 15, 2020, 04:30:11 AM »
Thanks for the replies, but as written above - it is "Industry Model", and I could not get any access using the "ade_..." commands. Property Sets from Civil can be reached via Lisp, but I think that's not the solution here.

That's why I thought it's "easier" to used the existing data in Property Pane.

Peter
Peter

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

tombu

  • Bull Frog
  • Posts: 289
  • ByLayer=>Not0
Re: How to get data from Property Pane?
« Reply #9 on: July 15, 2020, 10:50:14 AM »
Why not just attach a small drawing with an object with the property data you want?
One of us could write the code to access the data you want like FID or LABEL_TEXT.
Your image simply isn't providing enough information.
Tom Beauford P.S.M.
Leon County FL Public Works - Windows 7 64 bit AutoCAD Civil 3D

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get data from Property Pane?
« Reply #10 on: July 20, 2020, 02:58:41 AM »
Why not just attach a small drawing with an object with the property data you want?..
That's the problem with "Industry Model" - all the data is used and displayed in a "dynamic(?)" way, connected to the database. When you save a file, it changes the way of data handling, so an example file would not help.
Peter

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

wizman

  • Bull Frog
  • Posts: 290
Re: How to get data from Property Pane?
« Reply #11 on: July 20, 2020, 10:39:56 AM »
Save current Map to AutoCAD then have the feature attributes exported as xdata.  Then you can play from there.

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get data from Property Pane?
« Reply #12 on: July 20, 2020, 11:24:36 AM »
Thanks to all

I see that there are some ways, but my wish to a one-click-data-extract seem to impossible based on the knowledge and/or on the tools that I have.

Enjoy the summer!
Peter

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

BIGAL

  • Swamp Rat
  • Posts: 1407
  • 40 + years of using Autocad
Re: How to get data from Property Pane?
« Reply #13 on: July 21, 2020, 01:48:39 AM »
Your giving up to quick its not that hard but need a dwg from you as the variables will be different names.
A man who never made a mistake never made anything

Peter2

  • Swamp Rat
  • Posts: 650
Re: How to get data from Property Pane?
« Reply #14 on: July 21, 2020, 02:50:11 AM »
@BIGAL

thanks for your insistence. Here is a drawing, made from Map. There are many Texts, but the Acad command "list" shows one "Mapbulkfeature".

I'm really curious if
a) data can extracted from here and
b) if it will work in Industry Model
Peter

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