9 Replies Latest reply on Oct 15, 2014 12:19 PM by Deepak Gupta

    Macro for Drawing color and Drawing quality

    Dinesh Ramasubbu

      Dear Users,

       

      I have some check points to be done in every drawing before getting it printed

      The check points are mentioned below, (Page set up field)

       

      1. Paper size

      2. Page orientation

      3. Scale to fit

      4. High quality should to be unchecked

      5. Drawing color should be "Black & white"

       

      Below is the code which I tried.

      with this code, first three are OK, working fine, But last two are not working. (high quality, drawing color)

       

      CAN SOMEONE HELP ME OUT WITH A SOLUTION please,

       

      Sub main()

      Set swApp = _

      Application.SldWorks

      Set Part = swApp.ActiveDoc

      Dim myPageSetup As Object

      Set myPageSetup = Part.Extension.AppPageSetup

      myPageSetup.HighQuality = False

      Dim mySheet As Object

      Set mySheet = Part.Sheet("Drawing 1")

      Set myPageSetup = mySheet.PageSetup

      myPageSetup.ScaleToFit = True

      myPageSetup.Orientation = swPageSetupOrientation_e.swPageSetupOrient_Landscape

      myPageSetup.DrawingColor = swPageSetupDrawingColor_e.swPageSetup_BlackAndWhite

      myPageSetup.HighQuality = False

      myPageSetup.PrinterPaperSize = 1

      End Sub

       

      Hi Deepak, I have attached a sample drawing + macro by me + macro sent by you