I have a user defined property called "TREE SIZES" on my cogo points I am writing a script that will parse the description and fill this in. My only problem is that I can't figure out how to access and set this TREE SIZES property on my cogo point. Any help?
This short example utilizes my (get_aeccapp) lisp that I've posted many times. To set the UDP value to a cogopoint, it must belong to a pointgroup which has the UDPClassification assigned that the UDP's belong to.
(setq civdoc (vlax-get (getaeccapp "Land") 'activedocument))
(setq ptgroup (vlax-invoke (vlax-get civdoc 'pointgroups) 'item "Storm Manholes"))
(setq udpclass (vlax-invoke ptgroup 'getuserdefinedpropertyclassification'way))
(setq udps (vlax-get udpclass 'userdefinedproperties))
(setq staUDP (vlax-invoke udps 'item "Station")
offUDP (vlax-invoke udps 'item "Offset")
)
(setq pt (vlax-ename->vla-object (car (entsel "/nSelect point"))))
(vlax-invoke pt 'setuserdefinedpropertyvalue staUDP "2+50.23")
(vlax-invoke pt 'setuserdefinedpropertyvalue offUDP "15.23'")
Thanks for the help Jeff.
I found your (get_aeccap) function, but when I get to the line:
(setq udps (vlax-get udpclass 'userdefinedproperties))
I get and error saying:
bad argument type: VLA-OBJECT nil
Thanks!
Can't find what you're looking for? Ask the community or share your knowledge.