ctx

Controls the active context.

Syntax

ctx method ?option? ?value?

Type

Context

Description

Controls the active context.

Methods

exit
Exits the active context.
Undo
Reverts the last change. Valid only for the HyperMesh client.
Redo
Repeats the last change. Valid only for the HyperMesh client.
SetOption option_name value
Updates the value of the specified option to the provided.
GetOptions
Returns the list of option names available. Valid only for the HyperMesh client.
GetValuesList option_name
Returns the possible values for the given option. Valid only for the HyperMesh client.
OptionExists option_name
Returns 1 if specified option exists.
GetNumSelected
Returns the number of selected entities in the active selection. Valid only for the HyperMesh client.
SetActiveSelection selection_name
Sets the given selection as the active selection in the active context. Valid only for the HyperMesh client.
GetActiveSelectionName
Returns the name of the active selection. Valid only for the HyperMesh client.

Examples

To get a list of all available options in the active context:
ctx GetOptions
To set the element size in the Mesh Rebuild context (must be active) to 4.5:
ctx SetOption TARGET_ELEMSIZE 4.5
To get the name of the active selection in the active context:
ctx GetActiveSelectionName

Errors

Incorrect usage results in a Tcl error. To detect errors, you can use the catch command:
if { [ catch {command_name...} ] } {
   # Handle error
}

Version History

2022.1