Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Fields and lisp

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
idragonb
538 Views, 5 Replies

Fields and lisp

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

Flow state:
Maximum challenge with maximum skills.
Tags (3)
5 REPLIES 5
Message 2 of 6
Lee_Mac
in reply to: idragonb

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 Smiley Happy

Message 3 of 6
idragonb
in reply to: Lee_Mac

Thank Lee! Nailed it on the head...

Flow state:
Maximum challenge with maximum skills.
Message 4 of 6
Lee_Mac
in reply to: idragonb

Message 5 of 6
idragonb
in reply to: idragonb

(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

Flow state:
Maximum challenge with maximum skills.
Message 6 of 6
Lee_Mac
in reply to: idragonb

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)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost