PDA

View Full Version : Macro to Print Multi Sheet Drawings from Drafting


John Scheffel
04-03-2003, 03:17 PM
As part of a recent project, I wrote a macro which will plot all the sheets in an Annotation drawing which has been loaded into Drafting 11.6. Since it relates to an enhancement request (http://www.cocreateusers.org/forum/showthread.php?s=&threadid=2347) that I submitted, I am posting it here in case it will benefit others.

Note that it you have Drafting set to open Print Manager, it will only open it once so you don't get prompted for each sheet. If it is set to not open Print Manager, everything will go to the default printer with the default settings.

DEFINE Plot_all_sheets
LOCAL Cur_sheet
LOCAL Row
LOCAL Save_nt_print_mgr_option
{Save the current Print Mgr Option}
LET Save_nt_print_mgr_option Nt_print_mgr_option
{Check if current drawing is from Annotation}
INQ_ENV 0
IF (POS (INQ 305) 'Annotation' )
{If from Annotation, plot all sheets}
Show_sheets
LET Row 1
LOOP
LET Cur_sheet (READ_LTAB 'List_of_sheets' Row 1)
EXIT_IF (Cur_sheet = '')
EDIT_PART TOP
VIEW Cur_sheet
EDIT_PART Cur_sheet
Plot_current_sheet
LET Row (Row+1)
Print_mgr_option_off
END_LOOP
ELSE
{Not annotation drawing, just plot drawing with current settings}
Plot_start
END_IF
IF (Save_nt_print_mgr_option)
Print_mgr_option_on
END_IF
END_DEFINE
Note: Edited by John Scheffel on 4/25/2003 to use the new Plot_current_sheet macro intead of setting the source to CURRENT_WINDOW.

ChrisE
04-10-2003, 01:36 PM
What happens if your different sheets have
- different orientation
- different sizes
?

Wouldn't it be necessary to setup paper size and orientation before plotting each single sheet ?

John Scheffel
04-10-2003, 03:39 PM
Originally posted by ChrisE
What happens if your different sheets have
- different orientation
- different sizes
Wouldn't it be necessary to setup paper size and orientation before plotting each single sheet ?
That could be an issue depending on the use, but for most of the printing we do it's not necessary. People usually print to a Laser printer using a size of Fit (scale=0) and Landscape orientation (our borders are all Landscape). Since these are our default settings they don't even need to change them, they can just run the macro. You can change most PLOT settings before running the macro, but all the sheets will print the same using whatever settings are current when the macro is run.

If you are going to a large format printer you could set the scale to 1 and your sheet size would depend on the border you used, so you would get different sizes, but not different scales. If you are using roll paper the orientation is less important since it can print either way and you need to cut each sheet to size and shape afterwards.

I would hope that any enhancement from Cocreate to print multiple sheets would be more sophisticated. This macro was intended as a quick and dirty way to avoid the printing one sheet at a time. It might be nice to provide a table of sheets where you could select the sheets to print and set PLOT parameters for each sheet individually, then print them in one shot. Another option woul be to have a check box to choose printing all sheets with the current settings, or prompting for each sheet. Either way, I don't think most people would want to be prompted for each sheet as the default. If you just want them all the same it would be annoying.