2 Replies Latest reply on Mar 1, 2012 12:50 PM by Head1

    Display Control

    dcg

      I am writing a simple script that turns on layers from the display control (in vbscript).

      Is there a command that turns off everything in the display control?

      I then I plan to turn on specific things only such as:

       

      Option  Explicit
      Scripting.AddTypeLibrary("MGCPCB.ExpeditionPCBApplication")
      Dim  pcbAppObj
      set pcbAppObj = Application
      Dim pcbDocObj
      Set pcbDocObj =  pcbAppObj.ActiveDocument
      ValidateServer(pcbDocObj)

       

       


      'Get display control
      Dim DispCtrlObj
      Set  DispCtrlObj = pcbDocObj.ActiveView.DisplayControl

       

      DispCtrlObj.PartItems(0,epcbSideTop) =  True
      DispCtrlObj.GeneralItems(15) = True   'soldermask-top
      DispCtrlObj.GeneralItems(14) = False   'soldermask-bot
      DispCtrlObj.GeneralItems(16) = True  'paste-top    
      DispCtrlObj.GeneralItems(17) = False  'paste-bot

       

      thanks

       

      PS

      Anybody using perl or tcl/tk?

       

      Donovan

        • 1. Re: Display Control
          Satoru

          Hi Donovan-san,

           

          DisplayControl object doesn't have methods to turn OFF of all layers.

          But control of a layer group can be performed.

           

              Set DispCtrlObj = pcbDocObj.ActiveView.DisplayControl

              Set globDispCtrlObj = DispCtrlObj.Global

           

              DispCtrlObj.EnableSection(epcbDCFabricationSection) = False

           

          epcbDCFabricationSection: "Fabrication Layers Group in General tab"

           

          Regards,

          Satoru

          • 2. Re: Display Control
            Head1

            Hello Donovan,

             

            I do not know a way to hide all layers in one line of code.

            I can give you an idea how  to achieve what you want, in an indirect way, with ONE line of code.

             

            1. Define a scheme which displays an empty screen

            2. Load this scheme.

             

                 All the best,

             

                    Head1.

            ------------------------------------------------------------