Model
This manual provides detailed documentation of the Model class methods used for managing structural analysis models via Midas API.
Methods
Model.new
Creates a new model file.
Model.new()
Model.open
Opens an existing model file.
Model.open("D://model.mcb")
Model.save
Saves the current model. For first-time saves, provide a path.
NOTE
If path is not provided for the first time GUI prompt will appear
Model.save()
Model.save("D://model.mcb")
Model.saveAs
Saves the model to the specified file path.
Model.saveAs("D://model.mcb")
Model.importMCT
Imports MCT data file in MIDAS CIVIL NX.
Model.importMCT('D:\\model.mct')
Model.importJSON
Imports JSON data file in MIDAS CIVIL NX.
Model.importJSON('D:\\model.json')
Model.exportMCT
Exports MIDAS CIVIL NX model as MCT file.
Model.exportMCT('D:\\model.mct')
Model.exportJSON
Exports MIDAS CIVIL NX model as JSON file.
Model.exportJSON('D:\\model.json')
Model.info
Sets the project information.
info(project_name="", revision="", user="", title="")
Model.info(project_name="Bridge Project", revision="v1", user="Sumit Shekhar", title="Steel Bridge")

Model.units
Sets the model's working units.
Model.units(force="KN", length="M", heat="BTU", temp="C")
Parameters
force
: KN, N, KGF, TONF, LBF, KIPSlength
: M, CM, MM, FT, INheat
: CAL, KCAL, J, KJ, BTUtemp
: C, F
Model.units() # Set the SI unit system
Model.units(force='TONF') # Set the Force unit to Tonf
NOTE :
Make sure the units are in all caps
Model.type
Sets structure and mass type information for the model.
Model.type(strc_type=0, mass_type=1, gravity=0, mass_dir=1)
Parameters
strc_type
: 0 : 3D | 1 : X-Z | 2 : Y-Z | 3 : X-Y | 4 : RZ constraintmass_type
: 1 : Lumped | 2 : Consistentgravity
: Gravity acceleration (l/t²)mass_dir
: 1 : Convert to XYZ | 2 : Convert to XY | 3 : Convert to Z only
Model.type()

Model.create
Creates all model components: materials, sections, nodes, elements, groups, and boundaries.
Equivalent to executing all the create commands individually
Model.create()
Model.clear
Clears all components in the model, including nodes, elements, materials, groups, loads, and boundaries.
Equivalent to executing all the delete commands individually
Model.clear()
NOTE
To save time, use individual delete commands eg. Node.delete() ; Element.delete()
Model.analyse
Checks whether a model has been analyzed. If not, saves it and then analysis.
Model.analyse()
Model.select
Selects nodes and elements based on geometric criteria or material/section properties.
Model.select(crit_1, crit_2, crit_3, st='a', en='a', tolerance=0)
Parameters
crit_1
: X, Y, Z, XY, YZ, ZX, USM (coordinate/system type)crit_2
: Coordinate or Material IDcrit_3
: Coordinate or Section IDst, en
: Start and end rangetolerance
: Tolerance for selection
Returns
Dictionary with selected 'NODE'
and 'ELEM'
IDs.
nodes = Model.select('X',0,0)['NODE']