Is there a way to export a Far Field generated by a math script using Lua?
Hello,
I’m trying to export a Far Field that was previously generated by a Far Field Math script.
The manual has this entry:
farFieldData = app.Models[1].Configurations[1].FarFields["FarFields"] farFieldData:ExportData("temp_farFieldExport",pf.Enums.FarFieldsExportTypeEnum.Directivity,51)
I was not able to find something similar for the Math Scripts.
My code:
farFieldData = app.MathScripts[1] farFieldData:ExportData("temp_farFieldExport",pf.Enums.FarFieldsExportTypeEnum.Directivity,51)
Looks like the method does not exist.
I’m getting the error:
Attempt to call method ‘ExportData’ (a nil value)
Is there a way to export the Far Field?
Of course I can do it directly from PostFEKO, but I’d like to do it in a script.
Thanks
Answers
-
Hello @Israel Lopez
You should be able to do this with a script by referencing the math script as you did, then first storing the data before exporting.
farFieldData = app.MathScripts[1] storedData = farFieldData:StoreData() storedData:ExportData("temp_farFieldExport",pf.Enums.FarFieldsExportTypeEnum.Directivity,51) storedData:Delete()
Kind regards
Madelé
1 -
Hello @Israel Lopez
You should be able to do this with a script by referencing the math script as you did, then first storing the data before exporting.
farFieldData = app.MathScripts[1] storedData = farFieldData:StoreData() storedData:ExportData("temp_farFieldExport",pf.Enums.FarFieldsExportTypeEnum.Directivity,51) storedData:Delete()
Kind regards
Madelé
Thanks Madelé
It worked just fine
1 -
Israel Lopez said:
Thanks Madelé
It worked just fine
Thanks for the feedback. I'm glad to hear that it worked!
0