daveyboyd Posted January 12, 2010 Share Posted January 12, 2010 Ok, so I have a basic script file that plots a drawing using the set prarmeters given but I am getting stuck at the end where I have to give it a file name as it is a PDF plot, a dialog box opens and then nothing. I have attached the file. What I really need is a program which gives the drawing name as the file name. Does this make sense? If so any ideas? I have output a bunch of drawings to PDF for an entire project and the only other option is to do each one individually (100+ drawings!). Please, for my insanity, help! Dave plot.scr Quote Link to comment Share on other sites More sharing options...
daveyboyd Posted January 12, 2010 Author Share Posted January 12, 2010 Oh, I have scriptpro also Quote Link to comment Share on other sites More sharing options...
todouble22 Posted January 12, 2010 Share Posted January 12, 2010 Oh, I have scriptpro also i know there is a pdf maker add-on for autocad depending on what version of adobe you have? check out this link hopefully its helpful. http://www.adobe.com/designcenter/acrobat/articles/acr7sdautocadpdf.html Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 12, 2010 Share Posted January 12, 2010 I don't have scriptpro so can't suggest how it can be used. Try setting FILEDIA to 0 before running the script. (No guarantees to what will happen) And don't forget to set FILEDIA to 1 afterwards Quote Link to comment Share on other sites More sharing options...
todouble22 Posted January 12, 2010 Share Posted January 12, 2010 if this helps this is what i have for my script to plot to pdf and it shows the plot configuration questions. Yours will obviously be different but this may give you a start. just follow along with the command prompts by using -plot ;Here are the questions you need to answer if you were going to automate plotting via script file at the command line in 2006: ;Command: -plot ;Detailed plot configuration? [Yes/No] :y ;Enter a layout name or [?] : Layout1 ;Regenerating model - caching viewports. ;Enter an output device name or [?] : Adobe PDF ;Enter paper size or [?] : ;Enter paper units [inches/Millimeters] : ;Enter drawing orientation [Portrait/Landscape] : ;Plot upside down? [Yes/No] : ;Enter plot area [Display/Extents/Layout/View/Window] : ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] : ;Enter plot offset (x,y) : ;Plot with plot styles? [Yes/No] : ;Enter plot style table name or [?] (enter . for none) : ;Plot with lineweights? [Yes/No] : ;Scale lineweights with plot scale? [Yes/No] : ;Plot paper space first? [Yes/No] : ;Hide paperspace objects? [Yes/No] : ;Write the plot to a file [Yes/No] : ;Save changes to page setup [Yes/No]? ;Proceed with plot [Yes/No] : ;Plot to previous setting -plot y Model \\kingston\Xerox5225 11x17 Inches Landscape No Extents Fit Center Yes LJ5000-D-ONEWEIGHT.ctb Yes No No No Yes ;Save and close drawing save Yes Yes Close Quote Link to comment Share on other sites More sharing options...
zera Posted January 12, 2010 Share Posted January 12, 2010 Could you use a string that specifies the directory? Probably would only work if you had sequentially numbered drawings? I used this for an excel thing awhile back. Create a visual basic file with the string, etc. and have it call the script. Let the script end at the point where you would be entering the filename, and then have another script that runs afterwards to complete the process. Just throwing out ideas, not sure how practical they are, depends on filenames. Const sPath As String = "C:\username\Example_Folder\" Dim cell As Range Dim sName As String Dim oCmt As Comment sName = sPath & .Value & ".jpg" ********************************* ****.Value= the cell contents in excel**** Quote Link to comment Share on other sites More sharing options...
daveyboyd Posted January 13, 2010 Author Share Posted January 13, 2010 if this helps this is what i have for my script to plot to pdf and it shows the plot configuration questions. Yours will obviously be different but this may give you a start. just follow along with the command prompts by using -plot;Here are the questions you need to answer if you were going to automate plotting via script file at the command line in 2006: ;Command: -plot ;Detailed plot configuration? [Yes/No] :y ;Enter a layout name or [?] : Layout1 ;Regenerating model - caching viewports. ;Enter an output device name or [?] : Adobe PDF ;Enter paper size or [?] : ;Enter paper units [inches/Millimeters] : ;Enter drawing orientation [Portrait/Landscape] : ;Plot upside down? [Yes/No] : ;Enter plot area [Display/Extents/Layout/View/Window] : ;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] : ;Enter plot offset (x,y) : ;Plot with plot styles? [Yes/No] : ;Enter plot style table name or [?] (enter . for none) : ;Plot with lineweights? [Yes/No] : ;Scale lineweights with plot scale? [Yes/No] : ;Plot paper space first? [Yes/No] : ;Hide paperspace objects? [Yes/No] : ;Write the plot to a file [Yes/No] : ;Save changes to page setup [Yes/No]? ;Proceed with plot [Yes/No] : ;Plot to previous setting -plot y Model \\kingston\Xerox5225 11x17 Inches Landscape No Extents Fit Center Yes LJ5000-D-ONEWEIGHT.ctb Yes No No No Yes ;Save and close drawing save Yes Yes Close I treid this but it gets to the same point as me where a dialog box opens asking for a file name, I want to just accept the default name for the drawing and carry on . . .? Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 13, 2010 Share Posted January 13, 2010 I treid this but it gets to the same point as me where a dialog box opens asking for a file name, I want to just accept the default name for the drawing and carry on . . .?have you tried my suggestion yet? Quote Link to comment Share on other sites More sharing options...
todouble22 Posted January 13, 2010 Share Posted January 13, 2010 I treid this but it gets to the same point as me where a dialog box opens asking for a file name, I want to just accept the default name for the drawing and carry on . . .? What if you changed it to qsave at the end of the script instead of save? Quote Link to comment Share on other sites More sharing options...
todouble22 Posted January 13, 2010 Share Posted January 13, 2010 I'll try and play around with it today if I get a sec away from work Quote Link to comment Share on other sites More sharing options...
daveyboyd Posted January 14, 2010 Author Share Posted January 14, 2010 have you tried my suggestion yet? Nah, it stalls on the same dialog box, thanks. Much the same for the other suggestion, the problem is writing it to a file, its stalling before the save bit Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 14, 2010 Share Posted January 14, 2010 Nah, it stalls on the same dialog box, thanks. Much the same for the other suggestion, the problem is writing it to a file, its stalling before the save bit it shouldn't do. It turns off the file dialogue box and resorts to the command line. My scripts continue with a space to represent the default file name. Done this MANY times. Maybe ADT overrides something that vanilla acad doesn't. try CMDDIA = 0 as well just in case its not the file dialogue box thats being shown. Quote Link to comment Share on other sites More sharing options...
dbroada Posted January 14, 2010 Share Posted January 14, 2010 Here is a typical script of mine. I use the AutoCAD converter (as you can see) and I supply the output file name (which is why I used to use excel) but a space there has worked in the past. SDI 1 open "h:\Design_Office\20008402_1.dwg" plot y Model DWG to PDF.pc3 ISO A3 (420.00 x 297.00 MM) m l n e F C y STL Mono.ctb y AS h:\Design_Office\20008402_1.dwg.PDF n y qnew Y or for paperspace SDI 1 open "h:\Design_Office\20008402_1.dwg" plot y Layout1 DWG to PDF.pc3 ISO A3 (420.00 x 297.00 MM) m l n e F C y STL Mono.ctb y n n n "h:\Design_Office\20008402_1.dwg.PDF" n y qnew Y Quote Link to comment Share on other sites More sharing options...
daveyboyd Posted January 15, 2010 Author Share Posted January 15, 2010 Cheers dbroada, I didn't get what you meant at first but makes sense now, I will let you know how I get on . . . 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.