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
Solved! Go to Solution.
Solved by pbejse. Go to Solution.
@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?
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.)
(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.