hm_getdirectionpanel

Provides a panel to define a direction/vector.

Syntax

hm_getdirectionpanel ?message? ?default_value? ?node_coordinates?

Type

HyperMesh Tcl Query Command

Description

Provides a panel to define a direction/vector. A list with three values is returned from this command when successfully executed:

{dir_x dir_y dir_z}

If the node_coordinates option is enabled, if the user has defined the direction using N1N2N3, the coordinates of those nodes are also returned as: {dir_x dir_y dir_z} {n1_x n1_y n1_z n2_x n2_y n2_z n3_x n3_y n3_z}

Inputs

?message?
Optional string to show in the status bar when entering the panel.
?default_value?
Optional default value to set the entity filter to when entering the panel. message must be specified to use this option.
Valid values are:
  • N1N2N3 (default if not specified)
  • X_AXIS
  • Y_AXIS
  • Z_AXIS
  • AV_VECTOR
  • SCREEN_NORMAL
  • SCREEN_PARALLEL
?node_coordinates?
0 - Do not output node coordinates for N1N2N3 selection (default if not specified)
1 - Output node coordinates for N1N2N3 selection

Example

To get a direction definition from a user:

set direction [hm_getdirectionpanel "Please define a direction"]
foreach {dx dy dz} [lindex $plane 0] {}

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

12.0.110

2017.1 - Added new optional default_value argument.

2020.1 - Added new option node_coordinates.