The Abaqus Scripting Interface and methods

Most Abaqus Scripting Interface commands are methods. For example,

session.viewports['Viewport-1'].setValues(width=50)
In this example setValues() is a method of the Viewport object.

A constructor is a method that creates an object. By convention, all constructor names and all objects start with an uppercase character in the Abaqus Scripting Interface. The name of a constructor is usually the same as the name of the type of object it creates. In the following example Viewport is a constructor that creates a Viewport object called myViewport:

myViewport = session.Viewport(name='newViewport',
    width=100,height=100)

Some objects do not have a constructor. The object is created as a member of another object when the first object is created. For example, Abaqus creates the vertices of a part when you create a part's geometry, and the coordinates of the vertices are stored as Vertex objects. The Vertex objects are members of the Part object. The following statement prints the coordinates of the first vertex of a part:

print
mdb.models['Model-1'].parts['Part-1'].vertices[0].pointOn

The standard Python statement object.__methods__ lists all the methods of an object. For example, the following statement lists all the methods of a Viewport object:

session.viewports['myViewport'].__methods__ 

See the Abaqus Scripting Reference Guide for a description of each method of the Abaqus Scripting Interface objects.