Author Topic: Shapefile ObjectData to Property Set Definitions  (Read 5264 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Shapefile ObjectData to Property Set Definitions
« on: August 22, 2018, 02:28:03 PM »
Someone mentioned that it would be nice to have shape file object data be linked to property set definitions in order to utilize the Civil3D Labels. They mentioned since a property set could be read from a civil3d label. You could attach a label that pulls the property set of a line then use that as a label. Makes some sense if it works.
Thanks for any feedback.
Civil3D 2020

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Shapefile ObjectData to Property Set Definitions
« Reply #1 on: August 23, 2018, 04:07:00 PM »
I don't see how object data is shared with Property Set definitions?

However you could already use annotation styles to label things with object data attached to them
Be your Best


Michael Farrell
http://primeservicesglobal.com/

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Re: Shapefile ObjectData to Property Set Definitions
« Reply #2 on: August 23, 2018, 04:19:40 PM »
You are right. But with annotations, there needs to be a definite scale. it can not be "just a random zoom within a viewport". Unless (I hope ) I am wrong.
Civil3D 2020

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Shapefile ObjectData to Property Set Definitions
« Reply #3 on: August 23, 2018, 05:07:59 PM »
You are right. But with annotations, there needs to be a definite scale. it can not be "just a random zoom within a viewport". Unless (I hope ) I am wrong.

Or use the MAP explorer if you want the labels to dynamically zoom...I guess I need to better understand what you after and what workflow this will be part of?

The annotation templates can be Annotative these days....but yes a real scale helps in viewports.
Be your Best


Michael Farrell
http://primeservicesglobal.com/

Rod

  • Newt
  • Posts: 185
Re: Shapefile ObjectData to Property Set Definitions
« Reply #4 on: August 23, 2018, 10:27:26 PM »
I was able to extract and write to Property set definitions with lisp. I was using Civil 2017

But only after I had installed Autocad Architecture 2017 (trial) the lisp continued to work after the trial had expired.

My solution was more of a workaround. Hopefully they have started including the COM interfaces I was using in later versions.

Let me see if I can dig up my lisp.

I'm interested if anyone has a better solution to red/write to property set data.

Cheers, Rod
"All models are wrong, some models are useful" - George Box

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Re: Shapefile ObjectData to Property Set Definitions
« Reply #5 on: August 23, 2018, 10:34:39 PM »
That sounds crazy cool. Just want to understand it alittle but more. You would select the objects that have a certain field within the object data. Then it would create a property set catalogue. Then copy the object data field into the property set definition.

If it works like that... all I have to do is create a civil3d line label and attach it to the line with it pulling that property set info into the label!

Thanks for the info that it is possible.
Civil3D 2020

Rod

  • Newt
  • Posts: 185
Re: Shapefile ObjectData to Property Set Definitions
« Reply #6 on: August 23, 2018, 10:36:16 PM »
I haven't needed it yet but here is.

It required Autocad architecture to be installed. I used a trial.

Not sure how this would work with Autocad One.

If you take this further please post any success / failure on theswamp for myself and others

Also you would need to change the version number in AecX.AecScheduleApplication.7.9 to suit your version

Code - Auto/Visual Lisp: [Select]
  1. (defun C:test ()
  2.   (setq vlaObj          (vlax-ename->vla-object (car (entsel "Select a Object ")))
  3.         acadObj         (vlax-get-acad-object)
  4.         schedApp        (vla-getInterfaceObject
  5.                           acadObj
  6.                           "AecX.AecScheduleApplication.7.9"
  7.                         )
  8.         propSets        (vlax-invoke-method schedApp 'PropertySets vlaObj)
  9.         psdName         "New Style"
  10.         propSet         (vlax-invoke-method propSets 'Item psdName)
  11.         properties      (vlax-get-property propSet 'Properties)
  12.         propNameValList (reverse
  13.                           (vlax-for prop properties
  14.                             (setq propNameValList
  15.                                    (cons
  16.                                      (cons
  17.                                        (vlax-get-property prop 'Name)
  18.                                        (vlax-variant-value
  19.                                          (vlax-get-property prop 'Value)
  20.                                        )
  21.                                      )
  22.                                      propNameValList
  23.                                    )
  24.                             )
  25.                           )
  26.                         )
  27.   )
  28. )
"All models are wrong, some models are useful" - George Box

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Re: Shapefile ObjectData to Property Set Definitions
« Reply #7 on: August 23, 2018, 10:39:55 PM »
Thank you! I’ll take a stab at it! I might have questions, like I always do but thank you for sharing again.
Civil3D 2020

Rod

  • Newt
  • Posts: 185
Re: Shapefile ObjectData to Property Set Definitions
« Reply #8 on: August 23, 2018, 10:43:10 PM »
No worries. It will only get you started but I hope it helps
"All models are wrong, some models are useful" - George Box