I have a simple Autolisp question, similar to this if anyone can answer. I am writing a routine, and in the routine I want to be able to get (and Store with a Setq if needed) the value from a custom field in the drawing from the Drawing Properties. (for example: FLRLEVEL would be the custom field name in the Drawing Properties and the Value may be something like 02, for the second floor). This field is not really tied to any particular object in the drawing, so I am not sure if it can be done without an Object ID? (Which is what all of the examples have been of) I know I could have the lisp prompt for the floor number, but this routine will be ran multiple times in each DWG and I was hoping to have it stored with the DWG rather than the LISP routine; I have tried GETVAR but it is not found as a system variable. If anyone can assist me I will be forever grateful. Thank you in advance.
Solved! Go to Solution.
Solved by Shneuph. Go to Solution.
This thread may give you a good start...not sure if it covers custom fields but it covers that standard ones:
http://www.cadtutor.net/forum/showthread.php?87345-Useing-LISP-to-Populate-Drawing-Properties-Fields
Be sure you have vla functions loaded (vl-load-com)
(setq tlv-docSummary (vla-get-summaryinfo (vla-get-activedocument (vlax-get-acad-object)))) (vla-getcustombykey tlv-docSummary "Floor" 'tlv-propname))
"Floor" is your custom property name (string value) used as KEY to custom property value
Thank you everyone, I was under a tight deadline and was able to figure it out a a few hours after I made the cry for help. Sorry this is the first chance I have had time to reply. I am glad that I know that you are all out there to help me in the future though. Thank you again everyone!
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.