ctx::manager

Contains basic methods to manage contexts.

Syntax

ctx::manager method ?value1 value2 … valueN?

Type

HyperWorks Context

Description

Contains basic methods to manage contexts. For example, entering a specified context, exiting the active context, and registering itcl class with a scripted context.

Methods

enter context_name
Enters the specified context.
exit
Exits the active context.
register client context_name class_name
Registers the itcl class with the scripted context for the specified HyperWorks client. Valid client values are:
hm: HyperMesh client.
hw: Other HyperWorks clients.

Examples

To enter a context with name tag “2DMeshRebuild”:
ctx::manager enter 2DMeshRebuild
To exit the active context:
ctx::manager exit
To register an itcl class ::demo::CopyTranslateCtx with the context named CopyTranslateCtx in HyperMesh:
ctx::manager register hm CopyTranslateCtx "::demo::CopyTranslateCtx"

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