Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
jlane
Posts: 37
Registered: ‎07-21-2011
Message 1 of 3 (1,038 Views)
Accepted Solution

Update Custom Drawing Properties

1038 Views, 2 Replies
10-01-2012 10:46 AM

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

__________________________
jlane
Inventor Pro 2013
AutoCAD Mechanical 2013
ASD 2013
Vault Collaboration 2013
Windows 7 Pro
*Expert Elite*
pbejse
Posts: 2,460
Registered: ‎11-24-2009
Message 2 of 3 (1,008 Views)

Re: Update Custom Drawing Properties

10-01-2012 06:34 PM in reply to: jlane

jlane 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?

Active Contributor
jlane
Posts: 37
Registered: ‎07-21-2011
Message 3 of 3 (991 Views)

Re: Update Custom Drawing Properties

10-02-2012 07:24 AM 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.)

__________________________
jlane
Inventor Pro 2013
AutoCAD Mechanical 2013
ASD 2013
Vault Collaboration 2013
Windows 7 Pro
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.