1 Reply Latest reply on Jul 17, 2012 2:57 PM by Patrick.Cashman

    Is it possible to copy the Assembly Outline of some components of a board to a User Draft Layer?

    marco.colombo

      Is it possible to copy the Assembly Outline of some components of a board to a User Draft Layer?

      The targhet is to do a script that copy on a layer only Ref and Assebly used in BOM (for topographic design).

      Thanks!!!

       

      Marco Colombo

        • 1. Re: Is it possible to copy the Assembly Outline of some components of a board to a User Draft Layer?
          Patrick.Cashman

          Yes, but it is a very slow method.  What you have to do is get to the individual drawn objects in the source in this fashion

           

          component = pcbdoc > find component

          graphics objects = component.FabricationLayerGfxs, selected by type

          cycle through the collected graphics objects and get the geometry for each one

          get the points array from each geometry

          use the points array to draw another object on a different layer

           

          This method works, but as I said it's slow.  I did some experimentation on controlling the mouse and keyboard using software to emulate the process of selecting an object and either using the CTRL+drag or double-click methods to copy the objects.  It's very complicated and it turns out the resolution available through interacting with the Windows Automation cursor location data is not good enough to know you are getting the right object when you execute the mouse commands.

           

          This is another aspect of the Expedition Automation that is frustrating because I know the functionality to copy a bunch of objects very quickly is in there, just not available to the automation engines.

           

          Just like the Grow/Shrink command.  Conceptually very simple, yet due to a lack of access to the function, very tedious and frustrating to implement with code.