As with dictionaries, you can refer to an object in a repository using its key. The key is typically the name you provided in the constructor command when the object was created. For example, the Viewport constructor creates a new Viewport object in the viewports repository. session.Viewport(name='Side view', origin = (10,10), width=50, height=50) The key to this new Viewport object in the viewports repository is session.viewports['Side view'].viewportAnnotationOptions.\ setValues(legend=OFF, title=OFF) You can make your scripts more readable by assigning a variable to an object in a repository. For example, you could rewrite the previous statement after assigning the Viewport object to the variable myViewport = session.viewports['Side view'] myViewport.viewportAnnotationOptions.setValues( legend=OFF, title=OFF) In general, if the user can create the object, its repository key is a string. In some cases Abaqus/CAE creates an object, and the key can be a string, an integer, or a SymbolicConstant. As with dictionaries, you can use the >>> session.Viewport(name='Side view') >>> session.Viewport(name='Top view') >>> session.Viewport(name='Front view') >>> for key in session.viewports.keys(): ... print(key) Front view Top view Side view You can use the You can use the myPart = mdb.models['Model-1'].Part(name='housing', dimensionality=THREE_D, type=DEFORMABLE_BODY) mdb.models['Model-1'].parts.changeKey(fromName='housing', toName='form') |