T O P I C R E V I E W |
milleniummike |
Posted - September 14 2006 : 10:00:04 AM 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. |
2 L A T E S T R E P L I E S (Newest First) |
milleniummike |
Posted - September 18 2006 : 5:55:37 PM Sorry I took so long to answer back, been busy. Thank you for the help, I will get to play with this perhaps tomorrow afternoon. |
n/a |
Posted - September 14 2006 : 11:12:46 AM 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.
Download Attachment: renamedimstyle.zip 595 Bytes |
|
|