Custom Kernel¶
The customKernel module augments the mdb, odb, and session objects with an object called customData. The customData object can contain custom data that you created using standard Python objects; for example, dictionaries, strings, numbers, and classes. In addition, the customData object can contain objects that you created using the classes described in this section.
All objects that you create under the mdb.customData and odb[odbName].customData object will be stored in the Abaqus/CAE model and output database, respectively, when you save the database; all objects that you create under the session.customData object will be lost when you exit Abaqus/CAE.
The customData object is an instance of the RepositorySupport class; for more information, see RepositorySupport. The classes described in this section register with the GUI infrastructure when you create the class. As a result, if you write a custom GUI script, you can query these objects from the GUI, and you can also be notified when the contents of these objects change so you can update the GUI accordingly. For more information, see Extending the Abaqus Scripting Interface and Accessing kernel data from the GUI.
Other Classes¶
- class CommandRegister[source]¶
Bases:
object
This class allows you to derive a general class that can be queried from the GUI and is capable of notifying the GUI when the contents of the class change.
Note
This object can be accessed by:
import customKernel
Note
Member Details:
- class RegisteredDictionary[source]¶
Bases:
CommandRegister
,dict
This class allows you to create a dictionary that can be queried from the GUI and is capable of notifying the GUI when the contents of the dictionary change. The keys to a RegisteredDictionary must be either strings or integers. The RegisteredDictionary object is derived from the CommandRegister object.
Note
This object can be accessed by:
import customKernel
Note
Member Details:
- class RegisteredList[source]¶
Bases:
CommandRegister
,list
This class allows you to create a list that can be queried from the GUI and is capable of notifying the GUI when the contents of the list change. The RegisteredList object is derived from the CommandRegister object.
Note
This object can be accessed by:
import customKernel
Note
Member Details:
- class RegisteredTuple(tuple)[source]¶
Bases:
CommandRegister
,tuple
This class allows you to create a tuple that can be queried from the GUI and is capable of notifying the GUI when the contents of any of the tuple’s members change. The RegisteredTuple object is derived from the CommandRegister object.
Note
This object can be accessed by:
import customKernel
Note
Member Details:
- class RepositorySupport[source]¶
Bases:
CommandRegister
The class from which you can derive your own classes that are designed to contain custom repositories. Instances of this class can be queried from the GUI and are capable of notifying the GUI when the contents of the instance change. The RepositorySupport object is derived from the CommandRegister object.
Note
This object can be accessed by:
import customKernel mdb.customData session.customData session.odbs[name].customData
Note
Member Details:
- Repository(name, constructors)[source]¶
This method installs a repository on the class. The repository is an instance of a RegisteredDictionary class. Refer to RegisteredDictionary for details on its methods. The objects stored in the repository are assumed to have an attribute called name that stores the key used to access the object in the repository. The name attribute will be modified by the changeKey method.
Note