Ok, I'm stumped.
I have been trying to find where they hide the drawing properties that can be seen through the menu "Drawing Utilities/Drawing properties".
I am trying to set these by using autolisp but I can't seem to find them in the object model. They are document specific, so I would expect to see them in the (vlax-get-property (vlax-get-acad) 'Activedocument) somewhere. I get the idea that they should be in dictionaries, but I scrolled through them and can't find...
Can anyone give me the drill-down to get to and add to these values?
Much appreciated.
(Autocad 14, Window 7, 64 bit)
Michael
Solved! Go to Solution.
Solved by Lee_Mac. Go to Solution.
Use the ActiveX Properties & Methods of the SummaryInfo object:
(vla-get-summaryinfo (vla-get-activedocument (vlax-get-acad-object)))
Shout if you need more assistance
(defun C:dump-prop () ; spits out existing custom property value (if exists - no error catching)
(setq prop (getstring "\nProp to dump: "))
(setq acad (vlax-get-acad-object))
(setq doc (vlax-get-property acad 'ActiveDocument))
(setq summ (vlax-get-property doc 'Summaryinfo))
(vlax-invoke-method summ 'GetCustomByKey prop 'ret)
(princ ret)
)
Basic access to custom properties - writing similar, if anyone else needs...
Thanks Lee Mac for the direction
To return all custom property information:
(defun c:dumpprops ( / idx key rtn sum val ) (setq sum (vla-get-summaryinfo (vla-get-activedocument (vlax-get-acad-object)))) (repeat (setq idx (vla-numcustominfo sum)) (vla-getcustombyindex sum (setq idx (1- idx)) 'key 'val) (setq rtn (cons (cons key val) rtn)) ) ) (vl-load-com) (princ)