Is there such a thing as putting in an if/then statement into a script that would check to see if a dimension style is in the drawing and if so change the name and if not would just go to the next drawing. I have a script file that changes the style name but if the style name is not found it just stops so I have to manually resume the script again. I have hundreds more files to check to complete my conversion to a new style name but not all drawings will have that style name. It is very tedious and time consuming to just babysit the process. Any help would be very much appreciated. Michael in Salt Lake City.
Michael I don't think you can use if/then in a script perse. You can run a lisp routine from a script, however, to accomplish what you are trying to do. I've attached a lisp which should do what you want.
Rename the file with a .LSP extension rather than the .ZIP extension. Open the file with a text editor and insert the OLDNAME and NEWNAME between the existing quotes where shown in the file. Save the file and Move it to an AutoCAD supported path. Create a one line script: renamedimstyle
Please make sure you back up your files someplace before you run the script, just in case something goes wrong.
If the instructions about editing the attached file are unclear to you, let me know what the old and new names for the dimstyle are, and I can edit the file accordingly and repost it for you.