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

Update Custom Drawing Properties

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
jlane
3852 Views, 3 Replies

Update Custom Drawing Properties

Good Day!

 

I found a helpful suggestion on how to access custom drawing properties using LISP.  It was in a discussion initiated on 01-06-2011, subject:  Custom drawing properties.

 

One solution was to use the following method:

(setq  si (vla-Get-SummaryInfo (vla-Get-ActiveDocument (vlax-Get-Acad-Object))))
(vla-GetCustomByKey si  "DWGPROP1" 'pval)
(princ pval)

 

Now taking it a step further, using LISP, how can I "update" my custom drawing properties?

 

Thanks!

 

jlane

AM2011

Windows 7 Pro

3 REPLIES 3
Message 2 of 4
pbejse
in reply to: jlane


@Anonymous wrote:

Good Day!

 

(setq  si (vla-Get-SummaryInfo (vla-Get-ActiveDocument (vlax-Get-Acad-Object))))
(vla-GetCustomByKey si  "DWGPROP1" 'pval)
(princ pval)

 

Now taking it a step further, using LISP, how can I "update" my custom drawing properties?

 

Thanks!

 

jlane

 


by Update you mean assign a new value to an existing Custom Key word info?

 

(vla-SetCustomByKey  si "DWGPROP1" "New Value")

 

or add a new custom info?

 

(vla-AddCustomInfo si "DWGPROP2" "add this value")

 

HTH?

Message 3 of 4
jlane
in reply to: pbejse

Thanks pbejse!  That's exactly what I was looking for.  Actually, I was needing to perform both operations, so thanks for your keen insight on the matter.

 

(I'm new to using all the Visual LISP extensions.  I have some reading up to do.  This had steered me in the right direction.)

Message 4 of 4
mark.martinezECRPT
in reply to: jlane

(setq  si (vla-Get-SummaryInfo (vla-Get-ActiveDocument (vlax-Get-Acad-Object))))
(vla-GetCustomByKey si  "DWGPROP1" 'pval)

 

Does not seem to work in a script.  How do you use it in a script file?

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report