-I am getting an error after it has been run that will not allow any version of ACAD earlier than the one the LISP is run on to open any of the files.
This may be because it just issues the save as command ( through code, not really the command ). Maybe if you change the default version of the save command, then it will save to a different format.
-I want to create a use interface menu for the user to be able to give the text they want to replace and the text they want to replace that text with. I can not figure out the variables to change and because of this I can't figure out how to add more too it. I want to be able to search for multiple different lines of text to replace.
Here is how to call the code, and you can see how to add multiple string replacements ( in red ).
(defun c:TextReplace ()
;; Add flag values
;; flag 1 = ModelSpace Only
;; 2 = PaperSpace Only
;; 4 = reserved
;; 8 = Include Attributed Blocks * Not Operational
;;
;; text to replace ("OldString" "NewString")
(TextReplaceDBX 3 ; both Model & Paper Space
[color=red] '(("OldText" "NewString")
("Test 012807.1" "NewString")
)
)[/color]
(princ)
)
- Also.. has anyone figured out how to change the text within a block for this routine?
Thanks for your help.
This wouldn't be hard, but take some time, as you would have to step through each block definition, and see if they contain text, and then if they match one of the test strings.