Ok, this is more annoyance than anything else. Does anyone know how to
set the default page size for printing a drawing, or better yet, how to
get SW to recognize what size page I am using (D for example) and print
on a D size page. And do the same thing for a C,B, etc.
Every time I open up a SW drawing, the page size has been reset to A,
which when you have D size drawings, is not acceptable. This happens
regardless of the template that I use. Thanks.
David
I have Win2k SP2, SW SP7, and a HP DesignJet 450C
Rating: 0%, 0 votes
depository for all this new VBA/macro code.
H'mm,
snip
Christopher Dubea Phone: (985) 847-2280
Vice President of Engineering Fax: (985) 847-2282
Moving Parts L.L.C. email:
P. O. Box 6117 URL: #
Slidell, LA 70469-6117
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
Here is a "cleaned" macro
'Print macro - select papersize and voila
'- drawing printed automatically on correct printer/plotter
'PSB/2001-05-28
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim Paperformat As Variant 'defining paperformat
Const swPrintPaperSize = 0
Const swPrintOrientation = 1
Const vbPRORPortrait = 1
Const vbPRORLandscape = 2
Sub print_selected_paperformat() 'macro created by PSB
Dim swApp As Object
Dim Part As Object
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
'Apply the paperformat
Paperformat = InputBox("Enter paper size (only numbers: 5=FIT to A3,
4,3,2,1,0)", "Printmacro", "4") 'A4 to A0
'Select which subroutine to select
If Paperformat = 4 Then GoTo printformat_a4 Else
If Paperformat = 3 Then GoTo printformat_a3 Else
If Paperformat = 2 Then GoTo printformat_a2 Else
If Paperformat = 1 Then GoTo printformat_a1 Else
If Paperformat = 0 Then GoTo printformat_a0 Else
If Paperformat = 5 Then GoTo print_fit_a3 Else GoTo End_routine
End
'subroutines depending on papersize
printformat_a4:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
Let Paperformat = 9 '#9 = A4 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A4
GoTo Print_finally_drawing
printformat_a3:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORLandscape
Let Paperformat = 8 '#8 = A3 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A3
GoTo Print_finally_drawing
printformat_a2:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 54
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A2
GoTo Print_finally_drawing
printformat_a1:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 55
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A1
GoTo Print_finally_drawing
printformat_a0:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 56
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A0
GoTo Print_finally_drawing
Print_finally_drawing:
'Part.PrintPreview
Part.PrintOut2 1, 1, 1, False, Printer, 1#, False, ""
GoTo End_routine
print_fit_a3:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORLandscape
Let Paperformat = 8 '#8 = A3 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A3
'Part.PrintPreview
Part.PrintOut2 1, 1, 1, False, Printer, 0#, False, ""
GoTo End_routine
End_routine:
End Sub
'Values for the PaperSize Member HPLJ4MV
'Value Paper size
'1 Letter (8.5 x 11 in.)
'2 Letter Small (8.5 x 11 in.)
'3 Tabloid (11 x 17 in.)
'4 Ledger (17 x 11 in.)
'5 Legal (8.5 x 14 in.)
'6 Statement (5.5 x 8.5 in.)
'7 Executive (7.25 x 10.5 in.)
'8 A3 (297 x 420 mm)
'9 A4 (210 x 297 mm)
'10 A4 Small (210 x 297 mm)
'11 A5 (148 x 210 mm)
'12 B4 (250 x 354 mm)
'13 B5 (182 x 257 mm)
'14 Folio (8.5 x 13 in.)
'15 Quarto (215 x 275 mm)
'16 11 x 17 in.
'18 Note (8.5 x 11 in.)
'19 Envelope #9 (3.875 x 8.875 in.)
'20 Envelope #10 (4.125 x 9.5 in.)
'21 Envelope #11 (4.5 x 10.375 in.)
'22 Envelope #12 (4.25 x 11 in.)
'23 Envelope #14 (5 x 11.5 in.)
'24 C size sheet (17 x 22 in.)
'25 D size sheet (22 x 34 in.)
'26 E size sheet (34 x 44 in.)
'27 Envelope DL (110 x 220 mm)
'28 Envelope C5 (162 x 229 mm)
'29 Envelope C3 (324 x 458 mm)
'30 Envelope C4 (229 x 324 mm)
'31 Envelope C6 (114 x 162 mm)
'32 Envelope C65 (114 x 229 mm)
'33 Envelope B4 (250 x 353 mm)
'34 Envelope B5 (176 x 250 mm
'35 Envelope B6 (176 x 125 mm)
'36 Envelope (110 x 230 mm)
'37 Envelope Monarch (3.875 x 7.5 in.)
'38 6-3/4 Envelope (3.625 x 6.5 in.)
'39 US Std Fanfold (14.875 x 11 in.)
'40 German Std Fanfold (8.5 x 12 in.)
'41 German Legal Fanfold (8.5 x 13 in.)
'256 User -defined
'Values for the PaperSize Member HJPDJ650
'Value Paper size
'54 A2 (420 x 594mm)
'55 A1 (594 x 841mm)
'56 A0 (841 x 1189mm)
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
I have developed a small VBA macro which propts the user for the paper/print
format (A4,3,2,1,0).
Then the macro rotates the print if neccessary and do the print job on the
laserprinter if A4/A3, and on the plotter if other formats are selected.
You may have to edit the macro to fill in your own printer network pathes,
and the digit that sets the paperformat.
The macro is made for SW2001, on a NT4SP6 solution. Assign the macro to a
hotkey, and you have saved on of the (only!) 10 macro buttons
You may also have to track which digit's are used to select the paperformats
on e.g your plotter. This can be don by recording a macro in excel - record
the print procedure (SW do NOT trace the print selections)
Here it is:
'Print macro - select papersize and voila
'- drawing printed automatically on correct printer/plotter
'PSB/2001-05-28
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long
Dim Annotation As Object
Dim Gtol As Object
Dim DatumTag As Object
Dim FeatureData As Object
Dim Feature As Object
Dim Component As Object
Dim Paperformat As Variant 'defining paperformat
Const swPrintPaperSize = 0
Const swPrintOrientation = 1
'Check the documentation in Visual Basic or Visual C++ for printer
definitions...
Const vbPRORPortrait = 1
Const vbPRORLandscape = 2
'defined in swconst.bas
Sub print_selected_paperformat() 'macro created by PSB
Dim swApp As Object
Dim Part As Object
Set swApp = CreateObject("SldWorks.Application")
Set Part = swApp.ActiveDoc
'Apply the paperformat
'Paperformat = InputBox("Enter paper size (only numbers: 5=FIT to A3,
4,3,2,1,0)", "Paperformat", "4") 'A4 to A0
Paperformat = InputBox("Indtast papirformat. Kun tal:4,3,2,1,0
Samt 5 for tilpas til A3", "Udskrivningsmakro", "4") 'A4 to A0
'Select which subroutine to select
If Paperformat = 4 Then GoTo printformat_a4 Else
If Paperformat = 3 Then GoTo printformat_a3 Else
If Paperformat = 2 Then GoTo printformat_a2 Else
If Paperformat = 1 Then GoTo printformat_a1 Else
If Paperformat = 0 Then GoTo printformat_a0 Else
If Paperformat = 5 Then GoTo print_fit_a3 Else GoTo End_routine
End
'subroutines depending on papersize
printformat_a4:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
Let Paperformat = 9 '#9 = A4 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A4
GoTo Print_finally_drawing
printformat_a3:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORLandscape
Let Paperformat = 8 '#8 = A3 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A3
GoTo Print_finally_drawing
printformat_a2:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 54
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A2
GoTo Print_finally_drawing
printformat_a1:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 55
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A1
GoTo Print_finally_drawing
printformat_a0:
Printer = "\\PJMEL\HPDJ650" 'HP Designjet650C
Part.PrintSetup(swPrintOrientation) = vbPRORPortrait
swApp.ActivePrinter = Printer
Let Paperformat = 56
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A0
GoTo Print_finally_drawing
Print_finally_drawing:
'Part.PrintPreview
Part.PrintOut2 1, 1, 1, False, Printer, 1#, False, ""
GoTo End_routine
print_fit_a3:
Printer = "\\PJMEL\HPLJ4MV" 'HP LJ4MV
Part.PrintSetup(swPrintOrientation) = vbPRORLandscape
Let Paperformat = 8 '#8 = A3 on laserprinter HPLJ4MV
swApp.ActivePrinter = Printer
Part.PrintSetup(swPrintPaperSize) = Val(Paperformat) 'Enable selected
paperformat A3
'Part.PrintPreview
Part.PrintOut2 1, 1, 1, False, Printer, 0#, False, ""
GoTo End_routine
End_routine:
End Sub
'Values for the PaperSize Member HPLJ4MV
'Value Paper size
'1 Letter (8.5 x 11 in.)
'2 Letter Small (8.5 x 11 in.)
'3 Tabloid (11 x 17 in.)
'4 Ledger (17 x 11 in.)
'5 Legal (8.5 x 14 in.)
'6 Statement (5.5 x 8.5 in.)
'7 Executive (7.25 x 10.5 in.)
'8 A3 (297 x 420 mm)
'9 A4 (210 x 297 mm)
'10 A4 Small (210 x 297 mm)
'11 A5 (148 x 210 mm)
'12 B4 (250 x 354 mm)
'13 B5 (182 x 257 mm)
'14 Folio (8.5 x 13 in.)
'15 Quarto (215 x 275 mm)
'16 11 x 17 in.
'18 Note (8.5 x 11 in.)
'19 Envelope #9 (3.875 x 8.875 in.)
'20 Envelope #10 (4.125 x 9.5 in.)
'21 Envelope #11 (4.5 x 10.375 in.)
'22 Envelope #12 (4.25 x 11 in.)
'23 Envelope #14 (5 x 11.5 in.)
'24 C size sheet (17 x 22 in.)
'25 D size sheet (22 x 34 in.)
'26 E size sheet (34 x 44 in.)
'27 Envelope DL (110 x 220 mm)
'28 Envelope C5 (162 x 229 mm)
'29 Envelope C3 (324 x 458 mm)
'30 Envelope C4 (229 x 324 mm)
'31 Envelope C6 (114 x 162 mm)
'32 Envelope C65 (114 x 229 mm)
'33 Envelope B4 (250 x 353 mm)
'34 Envelope B5 (176 x 250 mm
'35 Envelope B6 (176 x 125 mm)
'36 Envelope (110 x 230 mm)
'37 Envelope Monarch (3.875 x 7.5 in.)
'38 6-3/4 Envelope (3.625 x 6.5 in.)
'39 US Std Fanfold (14.875 x 11 in.)
'40 German Std Fanfold (8.5 x 12 in.)
'41 German Legal Fanfold (8.5 x 13 in.)
'256 User -defined
'Values for the PaperSize Member HJPDJ650
'Value Paper size
'54 A2 (420 x 594mm)
'55 A1 (594 x 841mm)
'56 A0 (841 x 1189mm)
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
Some of the features of PAC4SWX are:
Generate drawing lists to print or convert using an
explorer-like interface or reading files with list
Optional use active SolidWorks drawing instead of PAC list
many userdefinable options for printing the various sheet formats,
i.e. printer, sheetsize to print to, scale, line width etc.
complete user definied TIFF export options from within PAC4SWX
Option for generating TIFF based on sheet size
multiple user options for converting output of TIFF, DXF and DWG
save TIFF, DXF or DWG in folder of drawing or all in one folder
save and read all settings from configuartion files
You can download the shareware version at
#
Stefan
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
problem your talking about, because I print all sizes off one machine and
it's annoying when printing a couple dozen drawings of varying sizes and you
have to go into properties and set size for each one you print. The only way
I've been able to manage this to any degree is to sort and send my drawings
by size then I only have to change the properties when I move to the next
group. Helps a little but still sucks.
...
Was this solution helpful? Show your Appreciation by rating it:
Rating: 0%, 0 votes
for the printer
A and B, then two for the plotter C and D. This gives me 4 icons that I keep
in the
taskbar and just cange "default printer" when I want to change sizes...It's
still not
automatic, but it works well for us. There is probibly a better way.
...
Was this solution helpful? Show your Appreciation by rating it:
Post a New problem for PSB Status C5 I Speaker
Email this problem
Can you Help with these Home Theater Speakers and Subwoofers problems?
My Velodyne CT 80 powered...
JVC HOME CINEMA SYSTEM THS66
connect creative labs inspire...
