hmbrapi

Returns information about hmbr3 browser views and selections.

Syntax

hmbrapi mode ?-option1 <value1>? ?-option2 <value2>? … ?-optionN <valueN>?

Type

HyperMesh Tcl GUI Command

Description

Returns information about hmbr3 browser views and selections.

Inputs

mode ?-option1 <value1>? ?-option2 <value2>? … ?-optionN <valueN>?
The mode of query and any relevant options. Valid values and options are:
  • views - Returns a list of hmbr3 views. Common view names include "content" for model browser, and "includecontent" for include browser.
  • selectedtypes -view <name> ?-recursive <value>? - Returns a list of selected data types from the specified view.
    • -view <name> - The name of the view to query (mandatory). Uses one of the views returned by the views mode.
    • -recursive <value> - Optional specification of recursion (1) or not (0, default).
  • selection -view <name> ?-recursive <value>? - Returns a list of lists, containing the selected data types and IDs from the specified view.
    • -view <name> - The name of the view to query (mandatory). Uses one of the views returned by the views mode.
    • -recursive <value> - Optional specification of recursion (1) or not (0, default).

Example

Assuming the "Component" and "Property" folders have been selected in the model view ("content"), query the selected types:

hmbrapi selectedtypes -view content
{Components Properties}

Assuming the "Component" and "Property" folders have been selected in the model view ("content"), query the selection:

hmbrapi selection -view content
{Components {2233 2243 2250 2267 255}} {Properties {31 421 43}}

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

2017.1