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
 Tips and Tricks
 Problem using batch plot script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

TJacbose
New Member

6 Posts

Posted - May 01 2013 :  09:46:14 AM  Show Profile  Reply with Quote

Hi All,

I have been testing the demo version off Hurricane in combination with AutoCAD 2013 to see if buying a version of Hurricane would be benificial for our company.

It turns out that it would be a major time saver (as I expected) if I can get it to work properly.

The problem I have now is when using the A2K Good plot script is that answers to command lines seem to get skipped causing the script to for instance reply -Plot on the question: Save changes to page setup <Y> <N>, which of course results in an error.

Below is the command window output from AutoCAD. As you can see something is going wrong at the last line.
It seems AutoCAD opening the files in the batch is interfering with the plot script.

Any help on this issue would be much appreciated!

Command: -PLOT
Detailed plot configuration? [Yes/No] <No>: YES
Enter a layout name or <Layout1>: MODEL
Regenerating model - caching viewports.
Enter an output device name or <None>: DWG To PDF.PC3
Enter paper size or <ANSI A (11.00 x 8.50 Inches)>: ISO full bleed A3 (420.00 X 297.00 MM)
Enter paper units [Inches/Millimeters] <Millimeters>: MILLIMETERS
Enter drawing orientation [Portrait/Landscape] <Portrait>: LANDSCAPE
Plot upside down? [Yes/No] <No>: NO
Enter plot area [Display/Extents/Limits/View/Window] <Display>: E
Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] <Fit>: FIT
Enter plot offset (x,y) or [Center] <0.00,0.00>: 0,0
Plot with plot styles? [Yes/No] <Yes>: YES
Enter plot style table name or (enter . for none) <monochrome.ctb>: MONOCHROME.CTB
Plot with lineweights? [Yes/No] <Yes>: YES
Enter shade plot setting [As displayed/legacy Wireframe/legacy Hidden/Visual styles/Rendered] <As displayed>: AS
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: DISPLAYED
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: NO
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: NO
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: YES
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: _OPEN
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1-Model.pdf>: "C:\Users\toon.jacobse\Desktop\A-22 test\GXL-19-STE-201-revB.dwg"
Save changes to page setup [Yes/No]? <N> -PLOT
Yes or No, please.

Admin
Administrator



651 Posts

Posted - May 01 2013 :  10:30:56 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Hi,

Here is my current plot script, that works quite well.

You will need to create a sub-folder in your drawings directory called "PDF", where it will write your pdf outputs to. (You will notice the Hurricane tags near the end, that do this...
"$filepath$pdf\$filename$.pdf"


Let me know if you have any issues.

;BEGIN SCRIPT
;Command: -plot
-PLOT
;Detailed plot configuration? [Yes/No] <No>: y
Y
;Enter a layout name or  <Model>:
Model
;Enter an output device name or  <DWG To PDF.pc3>:
DWG To PDF.pc3
;Enter paper size or  <ANSI expand A (8.50 x 11.00 Inches)>:
ANSI expand A (8.50 x 11.00 Inches)
;Enter paper units [Inches/Millimeters] <Inches>:
Inches
;Enter drawing orientation [Portrait/Landscape] <Portrait>:
Portrait
;Plot upside down? [Yes/No] <No>:
No
;Enter plot area [Display/Extents/Limits/View/Window] <Extents>:
Extents
;Enter plot scale (Plotted Inches=Drawing Units) or [Fit] <Fit>:
Fit
;Enter plot offset (x,y) or [Center] <Center>:
Center
;Plot with plot styles? [Yes/No] <Yes>:
Yes
;Enter plot style table name or  (enter . for none) <monochrome.ctb>:
monochrome.ctb
;Plot with lineweights? [Yes/No] <Yes>:
YES

"$filepath$pdf\$filename$.pdf"
;Save changes to page setup [Yes/No]? <N>
N
;Proceed with plot [Yes/No] <Y>:
Y
;END SCRIPT

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

TJacbose
New Member

6 Posts

Posted - May 01 2013 :  10:57:17 AM  Show Profile  Reply with Quote
Hi,

I tried your script (with a different paper size) but for some reason AutoCAD seems to forget what it was doing as the script reaches the paper units command line. See the Autocad window output below.

Command: _RIBBON
Command: COMMANDLINE
Command:
Command: _SDI
Enter new value for SDI <1>: 1
Command: _OPEN
Enter name of drawing to open <.>: "C:\Users\toon.jacobse\Desktop\A-22 test\A-19-STE-201-revB-sh1.dwg"
Opening an AutoCAD 2013 format file.
Regenerating model.
Command:
Command:
AutoCAD menu utilities loaded.
Command: -PLOT
Detailed plot configuration? [Yes/No] <No>: Y
Enter a layout name or <Model>: Model
Enter an output device name or <None>: DWG To PDF.pc3
Enter paper size or <ISO full bleed A3 (420.00 x 297.00 MM)>: ISO full bleed A3 (420.00 X 297.00)
Command: Millimeters
Unknown command "MILLIMETERS". Press F1 for help.
Go to Top of Page

Admin
Administrator



651 Posts

Posted - May 01 2013 :  11:07:30 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
When you are specifying the paper size, the descriptin MUST BE EXACT (it's an AutoCAD thing). (Including CaSe)

Try adjusting your last line...

from.... ISO full bleed A3 (420.00 X 297.00)
to...... ISO full bleed A3 (420.00 X 297.00 MM)

Hopefully that will get you a bit farther...



Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

TJacbose
New Member

6 Posts

Posted - May 01 2013 :  11:25:34 AM  Show Profile  Reply with Quote
Hi,

You're right, that was an oversight on my part.

I adjusted it and got the script to work for a single drawing. After plotting the drawing however no new drawing was opened.

I managed to fix this by adding:
_QSAVE
_CLOSE

to the PostUserScript.

Thanks for your help!
Go to Top of Page

Admin
Administrator



651 Posts

Posted - May 01 2013 :  11:43:39 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
You should find that if you have SDI 1 and SDI 0 in the PreBatch and PostBatch commands (respectfully), AND you don't have the "TEST RUN" checkbox checked, Hurricane will function properly, and add the QSAVE itself automatically. It will suppress the QSAVE only when the "Test Run" checkbox is selected.

You will also want to confirm the "Tools->Options->Prefs tab", that the top option "Use Open with DBMOD..." is selected.

In that configuration, you will be able to plot files (when Test Run is selected) without saving them (which can really speed things up, and it won't mess with your files datestamps).

And of course, make sure you are running the latest version... as of today 6.9.4 is the most up to date (in the Announcements forum).

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

TJacbose
New Member

6 Posts

Posted - May 02 2013 :  03:10:13 AM  Show Profile  Reply with Quote

I tried the second option you mentioned as not having to save the drawings would be preferable.
However with "use open in dbmod..." and "test run" selected I encounter another hiccup in the script as can be seen in the last lines below of the autocad command output.

Command: -PLOT
Detailed plot configuration? [Yes/No] <No>: Y
Enter a layout name or <Layout1>: Model
Regenerating model - caching viewports.
Enter an output device name or <None>: DWG To PDF.pc3
Enter paper size or <ISO full bleed A3 (420.00 x 297.00 MM)>: ISO full bleed A3 (420.00 X 297.00 MM)
Enter paper units [Inches/Millimeters] <Millimeters>: Millimeters
Enter drawing orientation [Portrait/Landscape] <Portrait>: Landscape
Plot upside down? [Yes/No] <No>: No
Enter plot area [Display/Extents/Limits/View/Window] <Display>: Extents
Enter plot scale (Plotted Millimeters=Drawing Units) or [Fit] <Fit>: Fit
Enter plot offset (x,y) or [Center] <0.00,0.00>: Center
Plot with plot styles? [Yes/No] <Yes>: Yes
Enter plot style table name or (enter . for none) <monochrome.ctb>: monochrome.ctb
Plot with lineweights? [Yes/No] <Yes>: YES
Enter shade plot setting [As displayed/legacy Wireframe/legacy Hidden/Visual styles/Rendered] <As displayed>:
Enter file name <C:\Users\toon.jacobse\Desktop\A-22 test\A-22-STE-201-revB-sh1-Model.pdf>: "C:\Users\toon.jacobse\Desktop\A-22 test\pdf\A-22-STE-201-revB-sh1.pdf"
Save changes to page setup [Yes/No]? <N> N
Proceed with plot [Yes/No] <Y>: Y
Effective plotting area: 414.12 wide by 295.41 high
Plotting viewport 2.
Error: Cannot append to plot stamp log file.
Temporary plot stamp log file saved to C:\Users\TOON~1.JAC\AppData\Local\Temp\PlotLog25
Restoring cached viewports - Regenerating layout.
Command:
-PLOT
Detailed plot configuration? [Yes/No] <No>: (if (/= (getvar "DBMOD") 0)(command "_.OPEN" "_Y")(command "_.OPEN"))
Unknown command "Y". Press F1 for help.
nil


The first drawing gets plotted fine but there is something going wrong as Autocad is commanded to open the second...
Go to Top of Page

TJacbose
New Member

6 Posts

Posted - May 02 2013 :  03:54:56 AM  Show Profile  Reply with Quote
Curiosly enough the script does run all the way through when test run is NOT selected
Go to Top of Page

Admin
Administrator



651 Posts

Posted - May 02 2013 :  05:34:55 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
I would confirm there are no BLANK LINES at the end of the script, and that there are no TRAILING SPACES also.
(Remember that a SPACE or CARRIAGE RETURN, in AutoCAD, calls up the last command...)

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
Go to Top of Page

TJacbose
New Member

6 Posts

Posted - May 02 2013 :  05:51:44 AM  Show Profile  Reply with Quote

It appears there indeed was blank line at the end. I deleted it and the script now works fine.

I do have still have a carriage return after
"$filepath$pdf\$filename$.pdf" for which I ofcourse get a warning message but the script doesn't run without. I think I will just disable that warning message in the preferences and be happy that the script now works.

FYI

I will be combining the lpot script with a script that automates some changes in project and product codes (using the search and replace text wizard) so I think I would need to run the script without the test run option active so the changes will get saved.

Considering I will use the script on a batch of 150+ drawings would you advise to do this or just to seperate the two scripts (1. change codes and save drawings & 2. plot)and run the plot script using the test run option selected?
Go to Top of Page

Admin
Administrator



651 Posts

Posted - May 02 2013 :  06:39:28 AM  Show Profile  Visit Admin's Homepage  Reply with Quote
Yes, I agree... run it in two passes... do the changes first, saving, then do the plot without saving.

Hurricane for AutoCAD
http://www.74mph.com
FAQ at
http://www.74mph.com/faq/faq.html
Tutorials at
http://www.74mph.com/tutorials.html
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.28 seconds. Snitz Forums 2000