3 Replies Latest reply on Jun 2, 2010 7:41 AM by patrick.cashman

    Writing PlotSetup.gpf


      I am working on a script to write the PlotSetup.gpf file in the Config directory.  The objective is to read information from the design to determine how to set up the Gerber output without the user having to select everything manually.


      The problem is that when I write the file out, then do Output>Gerber in Expedition, the file is not read properly and nothing appears.  I suppose that I am doing something wrong with the formatting of the text, linebreaks, or something similar.  I've compared files written by Expedition to those written by my script, and so far I can't find anything that would cause a problem.  I've verified that the layer order in the gpf file doesn't matter, as I am writing out all conductive layers in order and then the outer layers (SM, SS, SP).


      Does anyone have any experience with writing these files and know something special they need in order to be read correctly?





        • 1. Re: Writing PlotSetup.gpf

          Hello Patrick,

          what you are doing is quite complicated, because you want to write a file which syntax you do not know exactly.


          My proposal would be to write a gerger creation script directly. The you manage, wich elements of the pcb you want to write in each file.

          I can not provide our files, but you should have a look into attached RunGerber.vbs (from installation directory C:\Mentor\2007.7EE\SDD_HOME\standard\examples\pcb\Automation\AutoProEngines)

          It needs an automation pro license!

          Additionally you can look into Kendalls AutoActive Toolkit .


          This way would give you much more control about the content of the files.




          • 2. Re: Writing PlotSetup.gpf



            Thank you; I am looking into it.  Do you have any example with the GerberEngine inside a VB6 project?  It would be nice to use it there because I already have available all the information from the design such as filenames, selected user layers to gerber out, plane layers and so on.  If I run the RunGerber.vbs not only will I have to supply that file with the install, but every user will need access to Automation Pro (which won't always be the case) and I'll have to pass all the information from various arrays and variables into the vbs to make it work correctly.


            Thanks again for your suggestion - now just how to implement it smoothly.



            • 3. Re: Writing PlotSetup.gpf

              Problem solved.


              I was writing the file in Unicode format instead of ASCII.




              Set ts = f1.OpenAsTextStream(ForWriting, True)




              Set ts = f1.OpenAsTextStream(ForWriting, False)


              does the trick.



              I'm still looking into using the Gerber Engines as part of a tool running alongside Expedition instead of just in a vbscript.  If anyone has an example of how this is done please share it.