stage Posted May 4, 2009 Posted May 4, 2009 Hi there, I am successfully using ScriptPro to run a large *.scr file of commands. This is working towards cleaning drawings prior to making them available on the web for others. I would like to reset the editing time and am using these instructions; First save your drawing to be reset. Next, use the NEW command to create a new drawing. Under the Select Template switch from DWT to DWG and find your saved drawing.. So I have added the following to my *.scr file; _new <acet:cFolderName><acet:cBaseName>.dwg This however causes ScriptPro and AutoCAD to both hang when running it. Anybody got a work around or know of this problem? Cheers, Piers Quote
MiGo Posted May 4, 2009 Posted May 4, 2009 I could not get the command line you used to work for opening a new drawing utilizing the current drawing as a template, but another way to get the drawingprefix and dwgname are just to pull in the variables. (strcat (getvar "dwgprefix") (getvar "dwgname")) Not sure if that will work, because with your line and my own I always got a message saying that the template drawing is not on file, and it goes to default. Another variable that makes it so the dialog box does not pop up for the new command is "filedia". set it to zero using this line before your new template line. (setvar "filedia" 0) Hope some of this helps, but i'm not an expert by any means. Quote
stage Posted May 4, 2009 Author Posted May 4, 2009 Hi there, Thanks for looking. I've tried a few different ways and can't seem to get past the problem either. I think it must be built into ScriptPro itself which is a pity. At the start of all my scr scripts I do something similar; FILEDIA 0 CMDDIA 0 commandlinehide to keep file dialogs away. I'll keep playing.... Quote
MiGo Posted May 4, 2009 Posted May 4, 2009 As far as AutoCAD not making the template the current drawing problem isn't related to script pro. You can drag a script and drop it over the current drawing to run it and you will get the same results, so there is something in AutoCAD that you need to get around. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.