The Hurricane Forum
The Hurricane Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Hurricane for AutoCAD
 General Discussion
 IF / THEN help with script file
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

milleniummike
New Member



USA
10 Posts

Posted - September 14 2006 :  10:00:04 AM  Show Profile  Visit milleniummike's Homepage  Reply with Quote
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.

n/a
deleted

112 Posts

Posted - September 14 2006 :  11:12:46 AM  Show Profile  Reply with Quote
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

Steve Bubendorf
Go to Top of Page

milleniummike
New Member



USA
10 Posts

Posted - September 18 2006 :  5:55:37 PM  Show Profile  Visit milleniummike's Homepage  Reply with Quote
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Hurricane Forum © 2009 - 2021 Go To Top Of Page
This page was generated in 0.31 seconds. Snitz Forums 2000