Visual LISP, AutoLISP and General Customization

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

Update Custom Drawing Properties

986 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 RS 2011
AutoCAD Mechanical 2011
ASD 2013
Vault Collaboration 2011
Windows 7 Pro
*Expert Elite*
pbejse
Posts: 2,440
Registered: ‎11-24-2009
Message 2 of 3 (956 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: 36
Registered: ‎07-21-2011
Message 3 of 3 (939 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 RS 2011
AutoCAD Mechanical 2011
ASD 2013
Vault Collaboration 2011
Windows 7 Pro

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

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 to get help installing your software.

Ask the Community