|
Forums
Conferences
SIG Info
LUG Info
FAQs
Jobs
Mentor Graphics
MEMBERS ONLY
Change Profile
Email Archives
SIG Top Issues
User Library
Conference Proceedings
Search
|
|
Patrick_Cashman
member
Reged: 01/04/05
Posts: 36
Loc: Binghamton, NY
|
|
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?
Thanks,
Patrick
|
Clint_Cote
member
Reged: 01/03/05
Posts: 34
Loc: New Mexico/USA
|
|
I use a script that does the same thing. The only thing I can think of that might trip it up is making sure there are quotations (") in the right places. I am using vbScript I put in chr(34) codes to write the quotations. Here is a snippett:
'Open the GPF file OutputFileName = pcbDoc.Path & "Config\PlotSetup.gpf" GerberDAC = pcbDoc.Path & "Config\GerberD-Codes.dac" Dim fso Set fso = CreateObject("Scripting.FileSystemObject") Dim f Set f = fso.CreateTextFile(OutputFileName, True) f.WriteLine (".FILETYPE GerberPlotSetupFile") f.WriteLine (".VERSION " & chr(34) & "VB99.0" & chr(34)) f.WriteLine (".CREATOR " & chr(34) & "GE Intelligent Platforms Gerber Output" & chr(34)) f.WriteLine (".DATE " & chr(34) & Now() & chr(34)) f.WriteLine ("") f.WriteLine (".BaseUnits " & chr(34) & "1NM" & chr(34)) f.WriteLine ("") f.WriteLine (".DataOffset 0 0") f.WriteLine (".DataCopies 1 1") f.WriteLine (" ..OriginOffset 0 0") f.WriteLine ("") 'f.WriteLine (".DCodeToApertureFile " & chr(23) & GerberDAC & chr(34)) f.WriteLine (".GerberMachineFormatFile " & chr(34) & "Config\\GerberMachineFile1.gmf" & chr(34)) f.WriteLine ("")
For i = 1 to LayerCount f.WriteLine (".GerberOutputFile " & chr(34) & BoardNumRev & "_L" & LayerNum & ".gdo" & chr(34)) f.WriteLine (" ..ProcessFile Yes") f.WriteLine (" ..FlashPads Yes") f.WriteLine (" ..GerberOutputPath " & chr(34) & Path & chr(34)) f.WriteLine (" ..ConductiveLayer " & i) f.WriteLine (" ...ConductiveItem EtchedText") f.WriteLine (" ...ConductiveItem Fiducials") f.WriteLine (" ...ConductiveItem PartPadsSMD") f.WriteLine (" ...ConductiveItem PartPadsTest") f.WriteLine (" ...ConductiveItem PartPadsThru") f.WriteLine (" ...ConductiveItem PlaneData") f.WriteLine (" ...ConductiveItem Traces") f.WriteLine (" ...ConductiveItem ViaPads") f.WriteLine (" ...ConductiveItem CopperBalancing") f.WriteLine (" ...ProcessUnconnectedPads Yes") f.WriteLine (" ..BoardItem BoardOutline") f.WriteLine (" ..UserLayer " & chr(34) & "Film_ID" & chr(34)) f.WriteLine ("") Next ...
-------------------- Clint Cote
CAE/CAD Engineer
GE Fanuc Automation, Inc.
|
Patrick_Cashman
member
Reged: 01/04/05
Posts: 36
Loc: Binghamton, NY
|
|
Problem resolved.
Turns out that I was writing the file in Unicode instead of ASCII. Changing the format option in the filesystemobject commmand fixed it.
The order of the output items needs to be a certain way also. Such as the ProcessUnconnectedPads statement has to be after ConductiveItems and before UserLayers.
Thanks for the suggestion. You never know what little thing will trip up the system.
-Patrick
|
|
0 registered and 0 anonymous users are browsing this forum.
Moderator:
Print Topic
|
Forum Permissions
You cannot start new topics
You cannot reply to topics
HTML is disabled
UBBCode is enabled
|
Rating:
Topic views: 209
|
|
|
|
|
|
Powered by UBB.threads™ 6.5.4
|