AnsweredAssumed Answered

ProBatchEngines PDF output - Printing User layers?

Question asked by jmarsel@curtisswright.com on Mar 2, 2017
Latest reply on Mar 20, 2017 by fuba

I'm trying to use the ProBatchEngines PDFOutput or ExtendedPrint engine and make a PDF of selected user layers in VBscript.

 

I'm using the following code (I'm not showing all variables being dimensioned here.. for the sake of simplicity).  It seems to run without errors but I get no output file at all. Can anyone tell me what I'm missing?  When I change the content of the sheet to things like ASSEMBLY TOP type elements, I get a PDF output file no sweat.  btw, I'd love to know if there is such a thing as mirrored output on the PDF engine but I don't see it.

 

Thanks.

 

 

Set oPDFEngine = CreateObject("MGCPCBEngines.PDFOutput")

Scripting.AddTypeLibrary("MGCPCBEngines.PDFOutput")

    ' Set the design file name

    oPDFEngine.DesignFileName = jobName

    ' Get design Config directory

    Dim pcbPath

    pcbPath = Split(jobName, "PCB")

    jobConfigPath = pcbPath(0) + "PCB/Config/"

  

    Set oPDFOutputSheets = oPDFEngine.Sheets
  oPDFOutputSheets.Add "FabDrawing_Pg1"
  Set sheetObj = oPDFOutputSheets.Item(0)
  Set oUserlayers = sheetObj.UserLayers
  oUserlayers.ADD "Pcb_Fabdrawing_pg1"
  oUserlayers.ADD "Stackup_dielec"
  oUserlayers.ADD "Stackup_plane"
  oUserlayers.ADD "Stackup_sig"

  sheetObj.UserLayerOrder = True

 

        oPDFEngine.WhiteBackground = True

        oPDFEngine.PageNumbering = True

        oPDFEngine.LaunchReader = True

      oPDFEngine.FitDrawing = False

      oPDFEngine.FillText = True

      oPDFEngine.OutputFileName = pcbPath(0) & "PCB\Output\PDF\FabDwg.pdf"   ' This is the name and location of the output pdf

    'oPDFEngine.SetupFileName = jobConfigPath + "PDFSetup.pcf"

   

    ' Run the PDF Engine

    On Error Resume Next

    oPDFEngine.Go

    On Error Goto 0

Outcomes