Hi All,
I was wondering if someone has a lisp routine or any other idea on how to change "Drawing Properties" (fields via Mtext) on multiple single drawing files?
There are several instances where we would need to take a project to create another one and simply change the title block description.
As of now, we are opening each drawing (there could be hundreds) and modifiying the drawing properties on each drawing to change the customer name and other project descriptions.
These are not attributes, but fields. I've researched alot on here and couldnt find anything.
The drawing is attached.
Thanks in advance!
knj777
Solved! Go to Solution.
Solved by rl_jackson. Go to Solution.
Not sure if your aware of this or not but once you create drawing properties inside autocad as a custom field that information is also exposed in the drawing properties via windows, simply right-click the drawing-select properties and go to the tab called custom. All the fields will be listed there that are in the drawing. You can change them from there without ever opening the drawing, in fact anyone could at that point.
Hope it helps.
Rick Jackson
Survey CAD Technician VI
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Hey Thanks, I did not know that. I also have come to realize that we can change these in Vault as well.
Thanks for replying
How would you change these properties without opening the drawings? When I go to properties through Windows these options are greyed out. As it happens this is what I would expect as I would not want someone clicking on properties and changing things through Windows without knowing what was actually in the drawing. If there is a way to change these properties without opening the drawings then maybe I need to stop inserting drawing information in drawing properties as potentially it could be changed and be meaningless.
Hi,
I still couldn't find any answers to this question. This forum is the closest answer I could find to this question, but I would like to also know how can I achieve that without using Vault?
"There are several instances where we would need to take a project to create another one and simply change the title block description.
As of now, we are opening each drawing (there could be hundreds) and modifiying the drawing properties on each drawing to change the customer name and other project descriptions.
These are not attributes, but fields. I've researched alot on here and couldnt find anything."
Let me restructure the question again. What I would like to do is to change the field in the 'Drawing Properties' such as 'Location Code'. But to open drawing properties for each drawing in the same project one at a time is a painful process. Is there a way I could modify these fields all at once for the drawings in a same project?
I've been looking around for an answer to this but I'm still struggling 😞 Please help.
Thanks,
Josh.
Hi Josh,
to change a custom property, using LISP, it's quite easy.
To process multiple dwg's at once, it's easy too.
One possible way is, using a script file (.scr) to call the LISP file, and using Autodesk ScriptPro to process multiple dwg's.
Hope that helps
Henrique
I did remove the code in my previous post, because it had an error, this one, should work as expected...
;; Change custom property ;; prop = custom property Name as a string ;; newvalue = New custom property Value as a string ;; usage (ch_info "Location Code" "123-XYZ") (vl-load-com) (defun ch_info (prop newvalue / a b proplst suminfo) (setq suminfo (vla-get-SummaryInfo (vla-get-ActiveDocument (vlax-get-acad-object)) ) ) (if (> (setq n (vla-NumCustomInfo suminfo)) 0) (repeat n (vla-GetCustomByIndex suminfo (setq n (1- n)) 'a 'b) (setq proplst (cons (list n a b) proplst)) ) ) (if (member prop (mapcar 'cadr proplst)) (vla-SetCustomByKey suminfo prop newvalue) ) (princ) )
Henrique
Hi Josh,
I'm new here.
Recently I had the same problem and I found that in the Express Tools (as in Acad2013), under "File tools" menu, you can find the "Update Drawing Property Data" command.
It runs the Propulate command, which lets you configure the properties you want and update them in a single file or multiple files in a directory.
You can even set a template file ("Template.prp") where to store the properties you need.
Quite simple and fast.
Hope this helps,
Giancarlo
Hi Henrique,
Thanks a lot for your script. I've tried to run it but I'm not sure what to fill in to the prompt in order to achieve what I need to. (Sorry I'm really new to this).
I might need some further guide of how to use this script in order to use it, perhaps take changing the Location Code project wide as an example?
Cheers,
Josh.
Hi Josh,
I will try to explain briefly.
In the .prp file you can store the information you want, starting from an existing file.
For instance: if you have a dwg file with the properties information you like (i.e. LOCATION CODE = xxxx), you can open that file and run the propulate command. Choose the "Edit" option. A main window will open.
Under the Template menu in the main window of the program you will find "Fill from current drawing" option. In the custom tab you should find the new custom properties filled from your dwg file.
Then, you have to save the .prp file in a location you prefer and name it in a recognizible way (something like "Location.code.prp", suppose). Right after that you have to set this setting as your template: under the Template menu, click on "Make active template".
Now, if you want to set the properties saved in the .prp file on a bunch of dwg's, you have to set the Update option at the command line, then set the "other drawings" option, and finally digit the path of the drawings you want to update. Make sure to write it complete of "*.dwg".
After that you will have the option to update the drawings in the subdirectories.
If you do not have a drawing containg the custom properties you like, you can start from scratch , which is quite the same thing: the difference is that you have to set manually the custom properties in the custom tab of the main window.
Hope this helps
Giancarlo
i clicked on properties but i couldnt find the custom tab, i also want to change dwgprops to multiple drawings
Can't find what you're looking for? Ask the community or share your knowledge.