Using the command line interface

The command line interface provides a versatile method for exploring the model database structure with all sub-objectes and methods. It enables instant exploration of the objects, properties and methods, as well as a way to test the logic of small segments of code.

Using command line interface

Example: The model database (mdb) has two models where the model named 'M1' has one part having a mesh with 426 nodes. The properties of the first node is eventually printed in the following sequence of commands:

>>>
>>> print mdb.models
{'M1': 'Model object', 'M2': 'Model object'}
>>> mod = mdb.models['M1']
>>> print mod.parts
{'P1': 'Part object'}
>>> prt = mod.parts['P1']
>>> print len(prt.nodes)
462
>>> print prt.nodes[0]
({'coordinates': (13.75, 16.25, 20.0), 'instanceName': None, 'label': 1})
>>>

The command line interface is used extensively for exploring the structure of the model database.

TOC Next Prev

Disclaimer:This site is designed for educational purposes only. There are most likely errors, mistakes, typos, and poorly crafted statements that are not detected yet... www.ntnu.edu/employees/nils.p.vedvik

Copyright 2024, All rights reserved