enspyqtgui_int module
This module includes methods to examine and upgrade the current EnSight license. At all times, the EnSight client has a current license state called its 'capability'. Each level of capability has a specific set of 'features' that are allowed. Most users select the 'capability' level by selecting a different icon at startup or using a command line flag. The actual checking out of a license is done based on 'capability' levels. It is important to note that during an EnSight session, the capability level can be increased (more features enabled), but it can never be downgraded. The enspyqtgui_int module provides a number of value and methods for querying the license state and requesting a new capability level.
A simple example to get the current license capability would be:
import enspyqtgui_int
cap = enspyqtgui_int.licensecapability()
if (cap == enspyqtgui_int.LICENSE_GOLD):
print("You have an EnSight Gold license checked out!")
There are a number of capability levels defined in this module. The common ones include:
- LICENSE_ENSIGHT_FREE
- LICENSE_ENSIGHT_DESKTOP
- LICENSE_ENSIGHT_DR
- LICENSE_ENSIGHT_GOLD
- LICENSE_ENSIGHT_STANDARD
- LICENSE_ENVISION_PRO
- LICENSE_ENVISION_STANDARD
- 'LICENSE_ENSIGHT_BATCH_GOLD
- 'LICENSE_ENSIGHT_BATCH_STANDARD
- LICENSE_NONE
There are some licensing states that have been deprecated or are used for internal purposes. These include:
- LICENSE_ENSIGHT_CPFD
- LICENSE_ENSIGHT_FLOWSCIENCE
- LICENSE_ENSIGHT_CSI_DESKTOP
- LICENSE_ENSIGHT_CSI_STANDARD
- LICENSE_ENSIGHT_GOODYEAR
personality = enspyqtgui_int.licensepersonality([full=0])
There are a number of personalities (i.e. main product name):
- "Undefined!"
- "EnSight"
- "EnVision"
- "CEI Task"
- "Nexus"
- "Auto Post"
There are also a long list of supported features:
- FEATURE_ARCHIVE
- FEATURE_BOUNDARY_LAYER
- FEATURE_BOUND_REP
- FEATURE_CALCULATOR
- FEATURE_CLIENT_THREADS
- FEATURE_CLIP
- FEATURE_COLLAB
- FEATURE_CONTEXT
- FEATURE_CONTOUR
- FEATURE_DEV_SURF
- FEATURE_DR_RENDERING
- FEATURE_ELEV_SURF
- FEATURE_EXTRUDE
- FEATURE_EXT_CMD_DRIVER
- FEATURE_FLIPBOOK
- FEATURE_FRAME_MODE
- FEATURE_FREE_FONTS
- FEATURE_FX
- FEATURE_GUI_CHANGE
- FEATURE_HUM
- FEATURE_ISOSURFACE
- FEATURE_KEYFRAME
- FEATURE_LIMIT_MODEL_SIZE
- FEATURE_LIMIT_READERS
- FEATURE_MATERIALS
|
- FEATURE_MAX
- FEATURE_MIN
- FEATURE_MULTI_CASE
- FEATURE_MULTI_PIPE
- FEATURE_PARALLEL_RENDERING
- FEATURE_PARTICLES
- FEATURE_PLOTTING
- FEATURE_POINT_PART
- FEATURE_POVRAY
- FEATURE_PROBE
- FEATURE_PROFILE
- FEATURE_REMOTE_SERVER
- FEATURE_SEP_ATT
- FEATURE_SERVER_THREADS
- FEATURE_SHOCK
- FEATURE_SOS
- FEATURE_SUBSET
- FEATURE_SURF_RESTRICT
- FEATURE_TENSORS
- FEATURE_TEXTURES
- FEATURE_UDG
- FEATURE_UDI
- FEATURE_VECTOR_ARROWS
- FEATURE_VORTEX_CORE
|
There are also a number of methods in the module including:
- bool = licensehasfeature(feature|[features]) - This method takes a feature or a list of features and checks to see if that feature is enabled for the current license capability. It returns a boolean or a list of boolean values (one for each feature passed).
- bool = licensecaphasfeature(capability,feature|[features]) - This method takes a capability level and a feature or a list of features and checks to see if that feature is enabled for that license capability. It returns a boolean or a list of boolean values (one for each feature passed).
- cap = licensedefault() - Returns the capability that was specified when the EnSight session was started. For example, based on the command line parameters specified.
- cap = licensecapability([name=0]) - Returns the current capability level. If name != 0, then a string name is returned instead of the integer enum.
- personality = licensepersonality([full=0]) - Returns the current personality as a string. If full != 0, then the full name is returned (personality + flavor "EnSight HPC").
- newcap = licenseupgrade(cap) - Requests that the current capability level be raised to at least the level specified by 'cap' (basically that all the features enabled by 'cap' are available). If the call fails to upgrade the license, this method throws an exception, otherwise, it returns the resulting capability level, which may be higher than the requested level (e.g. you request LICENSE_LITE but the session already has LICENSE_GOLD, no license change is made and the returned capability is LICENSE_GOLD).
An example (which prints [False, False]):
cap = enspyqtgui_int.LICENSE_LITE
feats = [enspyqtgui_int.FEATURE_FX,enspyqtgui_int.FEATURE_PARALLEL_RENDERING]
print(enspyqtgui_int.licensecaphasfeature(cap, feats))