Hello: I´m triyng to create a png graph from PostFeko script and I wish to use a variable defined in a father script (in CadFeko) for the name of the model. The program give to me the next message:
attempt to index global 'Iteration' (a nil value).
Here are the lines i the programs
In the main program:
...
for Iteration = 1,#f do
pf.Variable
modelName = baseModelName .. '_Iteration_' ..Iteration..'_Polarization_'..Polarization
app:SaveAs(modelName)
...
-- Define the model to open in POSTFEKO
runOutput = cf.Launcher.Run('postfeko', {modelName, '--run-script', 'createAndExportGraph.lua', '--non-interactive'})
...
--------------------------------------------------------------------------------
In the subscript 'createAndExportGraph.lua'
app = pf.GetApplication()
graph = app.CartesianGraphs:Add()
farFieldTrace = graph.Traces:Add(app.Models[1].Configurations[1].FarFields[1])
graph:ExportImage('FarFieldGraph'..Iteration, 'png', 180, 260)
app:Close()
thank´s