[S8332] Script to add cases and specify the direction of magnetization for each

 

The following is an example of a script that adds three cases and sets the direction of the reference axis for the magnetization direction for each.

app = designer.GetApplication()

# Set Current Study

app.SetCurrentStudy(0)

# Adding parameter variables

app.GetModel(0).GetStudy(0).GetDesignTable().AddParameterVariableName(u"Magnet: Direction")

# Add a case

app.GetModel(0).GetStudy(0).GetDesignTable().AddCases(3)

# Set the direction of the reference axis for each case

app.GetModel(0).GetStudy(0).GetDesignTable().SetValue(1, 0, u"(0, 1, 0)")

app.GetModel(0).GetStudy(0).GetDesignTable().SetValue(2, 0, u"(-1, 0, 0)")

app.GetModel(0).GetStudy(0).GetDesignTable().SetValue(3, 0, u"(0, -1, 0)")

How to use script file

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