JPlanera Posted January 11, 2011 Share Posted January 11, 2011 That can be fixed by temporarily setting FILEDIA to 0 this prevents dialog boxes from appearing during commands Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 11, 2011 Share Posted January 11, 2011 in my case, with FILEDIA set to 0 my script filwe would look like this -plot yes model dwg to pdf.pc3 ansi expanded a (8.50 x 11.00 inches) inches landscape no extents fit center no monochrome.ctb no as displayed c:\dwgtopdf\drawing1 no no Quote Link to comment Share on other sites More sharing options...
YZ Posted January 11, 2011 Author Share Posted January 11, 2011 FILEDIA changes everything, thanks. Anyone know how to tell AutoCAD not to open the PDF in Adobe Reader once it is created? I can see this crashing with so many PDFs open at once! Quote Link to comment Share on other sites More sharing options...
YZ Posted January 11, 2011 Author Share Posted January 11, 2011 This is what I have in my script file so far: FILEDIA 0 -ATTEDIT N N * * * 20021379 20021385 -PLOT N "Layout1" "A4 COLOUR" N N Y -PLOT N A4 PDF N Y FILEDIA 1 It spits up an error: "Enter a page setup name : "A4 COLOUR" not found. There is a named page setup called "A4 COLOUR" in every dwg and I have been using it successfully in a button macro for duration of project: ^C^C-PLOT;N;;A4 COLOUR;;N;N;Y;PLOT;-PURGE;A;*;N; Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 12, 2011 Share Posted January 12, 2011 Is it the space in the layer name that is throwing it off? Quote Link to comment Share on other sites More sharing options...
YZ Posted January 12, 2011 Author Share Posted January 12, 2011 Is it the space in the layer name that is throwing it off? I suspect it is the space. I am not certain what else to do about it because that is what the page setup is named. I put the speech marks " " around it to try to overcome the space issue, but now it seems like it is trying to find a named plot setup with " ". I am looking into using the detailed plot configuration, but it is likely to encounter the same issue when it comes to typing DWG to PDG.pc3 ... Quote Link to comment Share on other sites More sharing options...
YZ Posted January 12, 2011 Author Share Posted January 12, 2011 Wow, I am so close to making this work. It is a revolution for me. Thanks to all for the help. I have tested the script, and it works when I call it up manually. Then I put it into a .bat file like this: FOR %%f in ("Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\*.dwg") do start /wait C:\"Program Files"\"Autodesk"\"AutoCAD LT 2011"\acadlt.exe "%%f" /b Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\ATTCHANGE.scr Which spits up the attached error. What am I doing wrong? Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 12, 2011 Share Posted January 12, 2011 FOR %%f in ("Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\*.dwg") do start /wait C:\"Program Files"\"Autodesk"\"AutoCAD LT 2011"\acadlt.exe "%%f" /b Z:\2010\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\ATTCHANGE.scr check your quote marks - especially the 2nd one. I now know the command I used to use, it was ATTEDIT and for the record, while 600 is a large number of drawings it isn't that big for batch files either, we regularly used to run 2000 drawings at a time. Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 12, 2011 Share Posted January 12, 2011 Try it this way (Z:\"2010"\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\"*.dwg") Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 12, 2011 Share Posted January 12, 2011 This is what I have in my script file so far:It spits up an error: "Enter a page setup name : "A4 COLOUR" not found. You should not need quotes around Layout1 or A4 COLOUR.... If you stepped through the sequence at the command line -plot n layout1 a4 colour etc... does it work that way? Layout name, page setup, and output device, all accept spaces in the input. So using detailed plot config will not give you a problem. In fact that is probably the best option, incase 1 drawing just so happens NOT to have a page setup named A4 COLOUR Quote Link to comment Share on other sites More sharing options...
YZ Posted January 12, 2011 Author Share Posted January 12, 2011 Try it this way (Z:\"2010"\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\"*.dwg") I have made that change to the quotation marks. Then tried other combinations of () and "" as well. Still the error message is the same. Is it possible that the startup stuff in AutoCAD (opening the ribbon and tool palette etc) is interfering? Below is what the command line says up to the error message. I did notice that the command line picks up the rest of the path that is missing from the error message attached in my previous post: SUBURB"_PROPERTY PLANS"STREET: Improper drawing name. TEST"ATTCHANGE.scr): Improper drawing name. Loading AEC Base... Loading AEC Base Extended... Loading AEC Project Base... Loading AEC Schedule Data... Loading AEC Architectural Base... Loading AEC Base UI... Opening an AutoCAD 2007 format file. Regenerating layout. Regenerating model. Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application. Command: _RIBBON Command: COMMANDLINE Command: properties Command: TOOLPALETTES Command: Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 12, 2011 Share Posted January 12, 2011 ok.... onw thing i dont see clarified is this... the entire .bat file needs to be ONE line in notepad. if it sees a line break in there it will gag on it. If you still have trouble with it. Move all the drawings to a temp folder that is simple. then change your code to this exactly (Z:\TEST\*.dwg) instead of that long string... Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 12, 2011 Share Posted January 12, 2011 this worked for me on my system Quote Link to comment Share on other sites More sharing options...
YZ Posted January 12, 2011 Author Share Posted January 12, 2011 ok.... onw thing i dont see clarified is this... the entire .bat file needs to be ONE line in notepad. if it sees a line break in there it will gag on it. If you still have trouble with it. Move all the drawings to a temp folder that is simple. then change your code to this exactly (Z:\TEST\*.dwg) instead of that long string... Yes, the .bat file is all on one single line. I have just made it work on the (Z:\TEST\*.dwg). Thank you SO much JPlanera. I will try one more time to debug my original .bat, otherwise I will move the folders to a simpler path. Quote Link to comment Share on other sites More sharing options...
JPlanera Posted January 12, 2011 Share Posted January 12, 2011 What's odd, is that i created a path on my system that was exactly this (C:\"2010"\"2010059 A"\"_SUBURB NAME"\"_PROPERTY PLANS"\"STREET TEST"\"*.dwg") and it worked fine.... I'm glad you got it going. I'm sure all this work is still better than one by one file editing! And you can use this same method for any script file so once you get it solid, you are set!! Post back your solution if you figure out your bug. I'm curious now! Good luck:) Quote Link to comment Share on other sites More sharing options...
YZ Posted January 23, 2011 Author Share Posted January 23, 2011 I never tracked down the bug. What I did do was place the .bat and the .scr file in the simplified path "(Z:\TEST\*.dwg)" and then ran it from there. That worked perfectly. My script ended up being bug free also, thank you all for that. It is included, in case anyone interested. I used all the features that were posted on this thread. FILEDIA 0 -ATTEDIT N N * * * 20021379 20021382 -PLOT Y LAYOUT1 A4 COLOUR.PC3 A4 M P N E 1:1 C Y A4 HOME PLAN.ctb Y N N N N N Y -PLOT Y LAYOUT1 DWG TO PDF.PC3 ISO full bleed A4 (210.00 x 297.00 MM) M P N E 1:1 C Y A4 HOME PLAN.ctb Y N N N N Y FILEDIA 1 QSAVE QUIT Y What I was left with was 700 PDFs all with the automatically generated "-Layout1" at the end. I could not work out a way in AutoCAD to exclude that. But this adventure, and your help, gave me the confidence and Know-how to write another batch file to rename them: REN SL????CAD[X]-LAYOUT1.PDF "SL????[X].PDF" Effortless. Took a long time to write, but I still think it was quicker than doing this manually. And of course the future possibilities are endless. Thanks again. Quote Link to comment Share on other sites More sharing options...
rkent Posted January 23, 2011 Share Posted January 23, 2011 Maybe use scriptpro from autodesk? http://labs.autodesk.com/utilities/ADN_plugins/catalog/ Quote Link to comment Share on other sites More sharing options...
GVR Posted January 25, 2011 Share Posted January 25, 2011 Maybe use scriptpro from autodesk?http://labs.autodesk.com/utilities/ADN_plugins/catalog/ But YZ uses Autocad 2011 LT and what i understand is that ScriptPro doesn't work on LT unfortunately. What i see about ScriptPro it is a very nice program. But sadly i also use LT. Quote Link to comment Share on other sites More sharing options...
ReMark Posted January 25, 2011 Share Posted January 25, 2011 Why wouldn't ScriptPro work with LT? Is it because it is VB based? Just curious. Quote Link to comment Share on other sites More sharing options...
GVR Posted January 25, 2011 Share Posted January 25, 2011 Why wouldn't ScriptPro work with LT? Is it because it is VB based? Just curious. I don't know, but that is what i read on more site's Quote Link to comment Share on other sites More sharing options...
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.