I am trying to get a simple script file to run project wide in acade 2010. The idea is to be able to convert the page setup of every file to monochrome so when I do a file->publish to pdf they will all be in black and white and I can save them as a single file. It will also plot in the background so I can continue working. Here is the script file;
;;Resets all Page Set-Up information for drawings to allow file->publish->pdf while maintaining monochrome
;;advantage of this is that we can plot them all to one file without having to combine the individual
;;pdf files seperately.
;;RUN AS PROJECT WIDE UTILITY FROM PROJECT TOOL BAR
;;BY AKF 2/8/2011
-plot
no
model
Canon iR3225 PCL5e.pc3
no
yes
no
If I do a publich->plot project from the project manager it will open each drawing and save them all as individual files which I then have to combine, but I am given the option to select a plot style and the drawings come out fine. However, this method also means that I can not work on my machine at all while acad is plotting.
Here is the text I get when I try to run the script;
WD_PRJ_RUN_CUR_DWG_OEM -plot
no
model
Canon iR3225 PCL5e.pc3
no
yes
no
wd_scr_qsave3
ACAD then freezes up and I have to escape the program. I am new to scripting and would greatly appreciate any information anyone can give me...
What does wd_scr_qsave3 mean anyways?
anthony
Solved! Go to Solution.
Solved by PatMurnen_Adsk. Go to Solution.
Solved by PatMurnen_Adsk. Go to Solution.
It's an ACADE dialog box asking to qsave the current drawing before changing to the first drawing in the plot list. It only comes up on the first drawing and might make it a tad hard to program into a script file.
Regards Brad
Icemanau (NNTP handle: Brad Coleman
AutoCAD Electrical User and IT Hardware Support
Save your active dwg andmake sure the first dwg in the plot list is the active dwg on screen.
If that doesn't work, I don't have a clue.
Regards Brad
Icemanau (NNTP handle: Brad Coleman
AutoCAD Electrical User and IT Hardware Support
still does not work. There is a new development though. If I hit Enter a few times while it is hung up, it will say "deleted 83 blocks" and then not move on to the next drawing.
I thought this was what project wide utilities was for, why is it not working?
To run the script are you using the AutoCAD Electrical Project-Wide Utility and then checking the "Run command script file" option? If that is the case this function saves each drawing before it goes on to the next if anything in the drawing changed. The wd_scr_qsave3 does not use any dialgos and simply saves the drawing.
One thing to try and determine the issue is to run the script on the active drawing. Are there any problems with it? Does it return to the command line cleanly. Sometimes it can be as simple as too many blank lines in a script which can be interpreted as an Enter repeating a command. Or not enough to complete the command.
If you attach the script file I can try and determine what is happening. What version of AcadE are you using?
Pat,
The issue was blank lines at the end of the program. Thanks for the tip.
Glad that was it.
I have a similar problem. The script runs the 1st dwg and then stops. If I left click in the drawing area it will advance to the next file. a left click is required to advance. I have manipulated the "space" and/or "return" entries at the end of the scripts. Nothing helps.
Hi mc5fan,
If you can attach the script file, I will take a look at it. What version of AutoCAD Electrical are you using?
Regards,
Pat
Lee, the link led me to a PNG file not a SCR file. Is your SDI system variable set to 0?
-Pat
Lee,
Lee, the link led me to a PNG file not a SCR file. Can you try again or attach it to a reply?
Also, is your AutoCAD SDI system variable set to 0? This might affect scripts so I want to make sure what your setting is.
-Pat
Lee,
I have seen some people say that when replying by email, attachments don't work properly. Can you click the link in the email to open a browser to the discussion thread, reply, and scroll down and select Choose File under Attachments. You probably need to zip the file since some file types are stripped out.
I did create a script with those 3 commands in it and it worked fine in my sample project. I've attached my file, test.scr.
Regards,
Pat
I always have to be sure that I have the last drawing from the project open when I am running the script using the "Project Wide Utilities".
I didn't have my last drawing in the project open, but I did have a drawing from the project open. Any update on this? Did my test script work or are you still having issues?
Regards,
Pat
No, it does not work regardless. I will assume ACADE 2018 has bugs. I got a new version of AUTOSCRIPT 3.4 that works in ACAD. As long as AUTOSCRIPT works, I am not worried about it. Thanks for your assistance.
Lee M.
Lee,
Glad the Autoscript is working so you can move forward. I would be happy to look at the script you wanted to use in AutoCAD Electrical to confirm if AutoCAD Electrical has a bug in this area. This way I can get it logged. You can send the .scr file to me directly at pat.murnen@autodesk.com if you want.
Regards,
Pat
NONE of the established good scripts work. AutoScript does the job and has a nice user interface. Shame on Autodesk.
Lee M.