← Back to team overview

kicad-developers team mailing list archive

Re: pcbnew.py: How to set plot color?

 

Le 18/03/2017 à 15:59, Martin Schreiber a écrit :
> On Friday 03 February 2017 08:25:12 Martin Schreiber wrote:
>> Hi,
>> How can the plot color been set while using pcbnew.py?
>> "
>> [...]
>>  board = LoadBoard(apcbfilename)
>>  pctl = PLOT_CONTROLLER(board)
>>  popt = pctl.GetPlotOptions()
>>  popt.SetOutputDirectory(aoutputdir)
>>  popt.SetPlotFrameRef(False)
>>  popt.SetLineWidth(FromMM(0.35))
>>
>>  popt.SetAutoScale(False)
>>  popt.SetScale(1)
>>  popt.SetMirror(False)
>>  popt.SetUseGerberAttributes(True)
>>  popt.SetExcludeEdgeLayer(True);
>>  popt.SetUseAuxOrigin(True)
>>  popt.SetSubtractMaskFromSilk(False)
>>
>>  pctl.OpenPlotfile(lnames[0],PLOT_FORMAT_POST,'')
>>  pctl.SetColorMode(False)
>>  popt.SetColor(YELLOW)
>>  pctl.SetLayer(F_SilkS)
>>  pctl.PlotLayer()
>>  pctl.ClosePlot()
>> [...]
>> "
>> shows black,
>> "
>>  pctl.SetColorMode(True)
>> "

Currently, plot functions overwrite the initial setting made by popt.SetColor(color).

-- 
Jean-Pierre CHARRAS


Follow ups

References