' -----------------------------------------------------------------------------
' Save Drawing as PDF
' SaveDwgAsPDF.swp - Original functional code by Lee Bell on 02/10/02.
'                    Modified for SolidWorks 2006 by JB on 3/31/06.
'                    Modified by Matthew Lorono (http://sw.fcsuper.com) on 4/24/06.
'                    Copyright 2006, 2007
'                    Based on publically available information found at:
'                      http://www.eng-tips.com/viewthread.cfm?qid=151087
' Contact:  fcsuper@aol.com (Matthew Lorono)
' This macro is provided as is.  No claims, support, refund, safety net, or
' warranties are expressed or implied.  By using this macro and/or its code in
' any way whatsoever, the user and any entities which the user represents,
' agree to hold the authors free of any and all liability.  Free distribution
' and use of this code in other free works is welcome.  If any portion of
' this code is used in other works, credit to the authors must be placed in
' that work within a user viewable location (e.g., macro header).  All other
' forms of distribution (i.e., not free, fee for delivery, etc) are prohibited
' without the expressed written consent by the authors.  Use at your own risk!
' ------------------------------------------------------------------------------
' Description:
' Saves the active drawing or current view of a model or assembly as a PDF.
' ------------------------------------------------------------------------------
' Version - By Matthew Lorono, Copyright 2006
'           1.00         * Created Macro from various sources at the above
'                          website.
'                        * Added error handling for no docs loaded.
'                        * Modified error handling for failed save.
'                        * Added/modified comments.
'                        * Cleaned up user interface.
'           1.10         * Add nondrawing support
'                        * Add error handling for missing directory
'           1.20         * Add error handling for missing document path
'                        * Add user input/confirmation of save folder
'           1.21         * Expand header to prohibit money based distribution
'                          (such as for-profit or fee based) of this macro.
'           1.22         * Add save status to lower left status bar pane; some
'                          clean up; add detail to description.
' ------------------------------------------------------------------------------



Usage:
1.  With any active document, run
    SaveDwgAsPDF.swp macro.
2.  This creates a PDF of the document in the
    specified folder (or whichever
    folder is set up within macro; see macro
    module for details).

Notes:
1. This macro will not function on SolidWorks 2002
   or older.
2. If you are using SolidWorks 2003 - 2005, make
   sure "Save as PDF" is checked in Tool>Add-ins.
   This setting is unnecessary to function on 2006
   or newer.
3. This macro works most efficiently when it is
   assigned to a custom macro button on the 
   Standard toolbar.  An icon is included in this
   package's zip file for this purpose.