AnsweredAssumed Answered

PutFabricationLayerGfx

Question asked by andrew_french on May 17, 2011
Latest reply on May 18, 2011 by john_dube

Expedition 7.9.1

C#.net

 

I'm trying to use the  PutFabricationLayerGfx command from Expedition Automation and am having issues.  The PutFabricationLayerGfx throws the error "Could not convert argument 1 for call to PutFabricationLayerGfx."

 

Documentation says the first argument should be "ByVal eType As EPcbFabricationType" so even if I replace my variable "fabType" with "MGCPCB.EPcbFabricationType.epcbFabAssembly" in the PutFabricationLayerGfx command I get the same error.

 

The end result of the script is to find all the pin one markers on assembly and silkscreen layers and change them to be solid fill.  Trying to fix library translation issues and the following code is stripped down to display the issue I'm encountering.

 

 

 

 

private void drawStuff()

 

 

{

MGCPCB.FabricationLayerGfxs fabGfxs = App.ExpDoc.FabricationLayerGfxs;

 

 

 

 

foreach (MGCPCB.FabricationLayerGfx fabGfx in fabGfxs)

{

 

 

     if (fabGfx.Geometry.Filled == false)

     {

          MGCPCB.EPcbFabricationType fabType = fabGfx.Type;

          MGCPCB.EPcbSide eSide = fabGfx.Side;

          double dGraphicsWidth = fabGfx.Geometry.get_LineDisplayWidth();

          var pointsArray = fabGfx.Geometry.PointsArray;

          int nPnts = pointsArray.Length;

          App.ExpDoc.PutFabricationLayerGfx(fabType, eSide, dGraphicsWidth, nPnts, pointsArray,true, null, MGCPCB.EPcbUnit.epcbUnitCurrent);

          fabGfx.Delete();

     }

 

}

}

 

Outcomes