The Boolean object is used in a similar way to the SymbolicConstant object. If you pass a Boolean object to the Python repr() function, the function returns the text without quotes. In effect, the text is the variable that, by convention, refers to the Boolean object.
A Boolean object has a value of 0 or 1, and a Boolean object can be tested in an if statement. You can use a Boolean object as an argument to a method in place of 1 or 0. Conversely, you can pass a 0 or a 1 to an Abaqus Scripting Interface method that expects a Boolean argument, and the 0 or 1 will be coerced to the appropriate Boolean value.
There are only four possible values for a Boolean: ON, OFF, True, and False. You can import all four values from the symbolicConstants module, or from the abaqus module. You can also construct the four values using the Boolean constructor.
from symbolicConstants import * from abaqusConstants import *
The Boolean method creates a Boolean object. The Boolean method does not use keyword arguments.
Boolean
Required argument
An Int specifying whether the Boolean object will test true or false. Possible values are 0 and 1.
Optional argument
A SymbolicConstant specifying whether the Boolean object has the values ON/OFF or True/False. Possible values are ON_OFF and True_False. The default value is ON_OFF.
Return value
A Boolean object.
Exceptions