The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Hurricane for AutoCAD
 General Discussion
 IF / THEN help with script file

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Attach a File

Check here to subscribe to this topic.
   

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

The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.2 seconds. Snitz Forums 2000