Print your dwg files with EPDM Tasks

April 18th, 2011


Would you like to have your SolidWorks Enterprise PDM 2011 tasks be able to [batch] print your dwg files as well as your SolidWorks drawings?

It is pretty easy, you only need to make a few changes to your Print Task’s “Advanced Scripting Options”.

Click on the advanced scripting options button in the bottom of the “Files” section.

scriptingbutton
Now all you have to do is find the function “bIsSupportedExtension” and replace all of it with this code:
Function bIsSupportedExtension(oExtension) As Boolean
oExtension=lcase(oExtension)
If oExtension = "prt" Then
bIsSupportedExtension = False
ElseIf oExtension = "asm" Then
bIsSupportedExtension = False
ElseIf oExtension = "drw" Then
bIsSupportedExtension = False
ElseIf oExtension = "dxf" Then
bIsSupportedExtension = False
ElseIf oExtension = "dwg" Then
bIsSupportedExtension = True
ElseIf oExtension = "psd" Then
bIsSupportedExtension = False
ElseIf oExtension = "ai" Then
bIsSupportedExtension = False
ElseIf oExtension = "lfp" Then
bIsSupportedExtension = False
ElseIf oExtension = "sldlfp" Then
bIsSupportedExtension = False
ElseIf oExtension = "prtdot" Then
bIsSupportedExtension = False
ElseIf oExtension = "asmdot" Then
bIsSupportedExtension = False
ElseIf oExtension = "drwdot" Then
bIsSupportedExtension = False
ElseIf oExtension = "x_t" Then
bIsSupportedExtension = False
ElseIf oExtension = "x_b" Then
bIsSupportedExtension = False
ElseIf oExtension = "xmt_txt" Then
bIsSupportedExtension = False
ElseIf oExtension = "xmt_bin" Then
bIsSupportedExtension = False
ElseIf oExtension = "igs" Then
bIsSupportedExtension = False
ElseIf oExtension = "iges" Then
bIsSupportedExtension = False
ElseIf oExtension = "step" Then
bIsSupportedExtension = False
ElseIf oExtension = "stp" Then
bIsSupportedExtension = False
ElseIf oExtension = "sat" Then
bIsSupportedExtension = False
ElseIf oExtension = "vda" Then
bIsSupportedExtension = False
ElseIf oExtension = "wrl" Then
bIsSupportedExtension = False
ElseIf oExtension = "stl" Then
bIsSupportedExtension = False
ElseIf oExtension = "cgr" Then
bIsSupportedExtension = False
ElseIf oExtension = "wrl" Then
bIsSupportedExtension = False
ElseIf oExtension = "xpr" Then
bIsSupportedExtension = False
ElseIf oExtension = "xas" Then
bIsSupportedExtension = False
ElseIf oExtension = "ipt" Then
bIsSupportedExtension = False
ElseIf oExtension = "iam" Then
bIsSupportedExtension = False
ElseIf oExtension = "par" Then
bIsSupportedExtension = False
ElseIf oExtension = "psm" Then
bIsSupportedExtension = False
ElseIf oExtension = "ckd" Then
bIsSupportedExtension = False
ElseIf oExtension = "emn" Then
bIsSupportedExtension = False
ElseIf oExtension = "brd" Then
bIsSupportedExtension = False
ElseIf oExtension = "bdf" Then
bIsSupportedExtension = False
ElseIf oExtension = "idb" Then
bIsSupportedExtension = False
ElseIf oExtension = "3dm" Then
bIsSupportedExtension = False
Else
bIsSupportedExtension = False
End If
End Function

Lastly, if you wish to have all the prints “Scaled to fit” (regardless of file type) -add this highlighted line in the location shown:

PrintToFit

[Tested on EPDM 2011 SP 2.0.]

Jeff Sweeney

CSWE Engineering Data Specialist 3DVision Technologies

Tags: , ,

Loading Facebook Comments ...

One Response to “Print your dwg files with EPDM Tasks”

  1. Jeff Sweeney says:

    As of EPDM 2012, you no longer need to go through these steps. This tip is incorporated within the software.

Leave a Reply

Follow
Get every new post delivered to your inbox
Join other followers
Powered By WPFruits.com
Bear