1 Reply Latest reply on Mar 26, 2015 3:57 AM by piotrek

    How to get SolderPaste area from within padstacks in component placed in layout?


      Tried to get pointarray with the object "FabricationLayerGfxs(epcbFabSolderpaste, epcbSelectAll, epcbSideTop,True)"

      It reads any Solderpaste drawing objects in layout that is drawn during design, ok. But It does not read the Solderpastes in the Components(which mean placed as Padstacks).

      What should I add into below?



      Dim mskeng
          Set mskeng = CreateObject("MGCPCBEngines.MaskEngine")
          Scripting.AddTypeLibrary ("MGCPCBEngines.MaskEngine")
          Scripting.AddTypeLibrary ("MGCPCB.ExpeditionPCBApplication")

      Dim stenColl

          Set stenColl = pcbDoc.FabricationLayerGfxs(epcbFabSolderpaste, epcbSelectAll, epcbSideTop,True)


      Dim stenUs, shapesCu

          Set stenUs = mskeng.Masks.Add
          Set shapesCu = stenUs.shapes


      Dim stenobj, pnts

          For Each stenobj In stenColl
        pnts = stenobj.Geometry.PointsArray
        Call shapesCu.AddByPointsArray (1 + UBound(pnts, 2), pnts)


        • 1. Re: How to get SolderPaste area from within padstacks in component placed in layout?



          For pads you should use PadstackObject not FabricationLayerGfxs, so:


          'Get Fabrication Pad Object

          PadstackObjs = pcbDoc.PadstackObjects(MGCPCB.EPcbPadstackObjectType.epcbPadstackObjectAll, MGCPCB.EPcbSelectionType.epcbSelectPlaced)

          For Each PadstackObj In PadstackObjs

                      FabPads = PadstackObj.FabricationPads

                      For Each FabPad In FabPads

                          If FabPad.Type = MGCPCB.EPcbFabricationPadType.epcbFabPadSolderpaste Then

                              If FabPad.Side = MGCPCB.EPcbSide.epcbSideTop Then

                                  PadstackGmtrs = FabPad.Geometries

                                  For Each PadstackGmtr In PadstackGmtrs

                                  ... and here getPolyArea(PadstackGmtr.PointsArray) or whatever you wish


          I think it should work


          Best regards