🎉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

Need to add near-field script to existing POSTFEKO session using Lua

User: "John Underwood"
Altair Community Member
Updated by John Underwood

I am trying to add near-field scripts in POSTFEKO using Lua to dynamically generate them.

According to the API reference, I need to do the following:

nearFieldMathScript = app.MathScripts:Add(pf.Enums.MathScriptTypeEnum.NearField)

My problem is with "app".

When I try to use "app = pf.GetApplication()" to define the variable, I get the following error:

".. attempt to index global 'app' (a nil value)"

Any ideas?

Thanks in advance

Find more posts tagged with