Extracting Min-Max Tabular Data for a Boundary Condition

The Field API can be used to extract minimum and maximum tabular data for boundary conditions. For example, you can extract minimum and maximum applied force. The following figure displays tabular data for a force and highlights its minimum and maximum quantities.

 

First, get the project model object, analysis object, force object, and the output variable with the applied force variables:

mymodel = DataModel.Project.Model
anal = mymodel.Analyses[0]
f2 = anal.Children[2]
f2td = f2.Magnitude.Output

Next, get the tuple containing the minimum and maximum force quantities and then display these quantities by entering the variable name of the tuple:

mnmxf2 = f2td.MinMaxDiscreteValues 
mnmxf2

Given the above tabular data, the following results display:

(0 [lbf], 300 [lbf])

The variable mnxf2 is a tuple (pair) of quantities. Each element in the tuple can be gotten by using the tuple's properties Item1 and Item2.

To get and display only the minimum force quantity:

mnv = mnmxf2.Item1 
mnv

Given the above tabular data, the following results display:

(0 [lbf])

To get and display only the maximum force quantity:

mxv = mnmxf2.Item2 
mxv

Given the above tabular data, the following results display:

(300 [lbf])