🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Is there a way to export a Far Field generated by a math script using Lua?

User: "Israel Lopez"
Altair Community Member
Updated by Israel Lopez

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

Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Madelé"
    Altair Employee
    Updated by Madelé

    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é

    User: "Israel Lopez"
    Altair Community Member
    OP
    Updated by Israel Lopez

    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

    User: "Madelé"
    Altair Employee
    Updated by Madelé

    Thanks Madelé

    It worked just fine

    Thanks for the feedback. I'm glad to hear that it worked!