- #Autocad lt 2014 find and replace notifications how to#
- #Autocad lt 2014 find and replace notifications code#
I can't get the program to save the changes back to the file. The other problem that I had wasn't so big, kind of little. The only way I could think of to implement option #1 was to look at the ascii character values of the text string and compare those to the space value, I just don't have that much time right now. I am too busy right now to work on option #1.
#Autocad lt 2014 find and replace notifications code#
My code currently only works for option #2 (case).
#Autocad lt 2014 find and replace notifications how to#
So I am putting my work here in hopes that some other brave souls will take pity on me and help you out and instruct me on how to do this (if even possible).
I quickly determined that I didn't have the time nor the skills to effectively construct this for you. I tried to emulate the ACAD find & replace, but did a bad job.
This process can be changed to select all the dwg's in a folder if you need that instead. Then it continues with the rest of the routine. Once you select the file and click open it reloads the dialog box to select another file and continues this process until you click cancel. The code I have below gives you a dialog box to select a file (single selection only). Hopely somebody more skillfull comments this subject. ScriptPro from Migration Assistant could also be helpful in this kind of tasks. (write-line (strcat "Y qsave close") scriptname) (write-line (strcat "gatte b " blockname " " attrib-name " " new-attrib-val) scriptname) (write-line (strcat "open " (getvar "dwgprefix") dwg-in-turn) scriptname) (setq scriptname (open (strcat (getvar "dwgprefix") "batch.scr") "w")) (setq new-attrib-val (getstring "New value for attribute? ")) (setq attrib-name (cdr (assoc 2 (entget (car (entsel "Please choose an attribute: ")))))) (setq blockname (cdr (assoc 2 (entget (car titleblock))))) (setq titleblock (entsel "Please choose a block: ")) getting the information: blockname, attribute name and the new value: (setq dwgnames (dos_dir (strcat (getvar "dwgprefix") "*.dwg"))) (defun c:bgae (/ dwgnames titleblock blockname attrib-name new-attrib-val scriptname dwg-in-turn) Run the script (batch.scr, created in the same folder) Assumption 2: Expresstools gatte available THIS LISP WRITES A SCRIPT TO CHANGE ATTRIBUTE VALUES IN A BUNCH OF DRAWINGS I quess this has been done many times but following is what I have came up with: I figured out that the lisp must write a script to do the job. I was asked a while ago to write a lisp to do something almost similar: to change attribute values in titleblocks in a bunch of drawings (same value to all).