[S8344] Script to obtain flux values for current conditions

 

The following is an example of a script that retrieves the value of the magnetic flux in the current condition from the results of a magnetic field static analysis.

app = designer.GetApplication()

# Get Magnetic Flux of Current Condition from result table

Flux = app.GetModel(0).GetStudy(0).GetResultTable().GetData("CoilFlux")

# Get value

A = Flux.GetValue(0,0)

# Display retrieved values

print(u"Magnetic flux is "+Str(A)+u"(Wb)")

How to use script file

Use the JMAG Script Library after reading and agreeing to the following terms of use.