HyperView User's Guide

Measure Templex Expressions

Measure Templex Expressions

Previous topic Next topic Expand/collapse all hidden text  

Measure Templex Expressions

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

Evaluating Expressions

The following methods can be used to evaluate measure Templex expressions in HyperView:

hmtoggle_plus1TCL console

To evaluate measure expressions using the TCL console:

1.Type the following commands into the TCL Command Window:

hwi GetSessionHandle sess

sess GetProjectHandle proj

proj GetTemplexHandle tmplx

tmplx Evaluate <expression> false

2.The values are output to the console.
hmtoggle_plus1HyperView Notes

To evaluate measure expressions using notes:

1.Enter the Note panel by clicking the panel button annotateNotes-24 on the Annotations toolbar, or by selecting Annotations > Notes from the menu bar.
2.Type in the expression (enclosed in curly braces) into the Description box.
3.Click the Apply button.
4.The values show up as the note text.
hmtoggle_plus1TextView

To evaluate measure expressions using TextView:

1.Click the arrow next to the Client Selector icon and select TextView from the drop-down menu.
2.Type in the expression (enclosed in curly braces) into the text window.
3.Click the Evaluate Text button textEdit-24 on the toolbar to evaluate the expression.

Expression Types

hmtoggle_plus1Non-Grouped Measures

The expression below will return the default x vector for the measure item specified by item_index.

"p" <page_id> "w" <window_id> "measure" <measure_id> . item_index . x_option . y_option . "x"

For example, p1w1measure3.7.0.3.x will return the x vector (time in this case) for item 7 in measure group 3.

Where:

Page ID = 1

Window ID = 1

Measure ID = 3

Item Index = 7

X Option = 0 (Default)

Y Option = 3 (Magnitude for a Distance Between measure, for example)

In addition, the expression below will return the y vector specified by y_option for the measure item specified by item_index.

"p" <page_id> "w" <window_id> "measure" <measure_id> . item_index . x_option . y_option . "y"

For example, p1w1measure3.7.0.3.y will return the magnitude values for item 7 in measure group 3, across all time steps.

Where:

Page ID = 1

Window ID = 1

Measure ID = 3

Item Index = 7

X Option = 0 (Default)

Y Option = 3 (Magnitude for a Distance Between measure, for example)

NoteThe x_option must always be zero.
hmtoggle_plus1Grouped Measures

The expression below will return the x vector specified by x_option for all of the items in a measure group.

"p" <page_id> "w" <window_id> "measure" <measure_id> . "all" . x_option . y_option . "x"

For example, p1w1measure3.all.2.3.x will return the Y coordinate values of all items in measure group 3, at a particular time step.

Where:

Page ID = 1

Window ID = 1

Measure ID = 3

X Option = 2 (Y Coordinate)

Y Option = 3 (Magnitude)

In addition, the expression below will return the y vector specified by y_option for all of the items in a measure group.

"p" <page_id> "w" <window_id> "measure" <measure_id> . "all" . x_option . y_option . "y"

For example, p1w1measure3.all.2.3.y will return the magnitude values of all items in measure group 3, at a particular time step.

Where:

Page ID = 1

Window ID = 1

Measure ID = 3

X Option = 2 (Y Coordinate)

Y Option = 3 (Magnitude)

NoteIn this example the keyword "all" is used for the item index, in order to indicate that the returned values are for all items in the measure group.

Measure Values at a Particular Time Step

The expression below will return all values for measure item specified by item_idx, at a particular timestep.

"p" <page_id> "w" <window_id> "measure" <measure_id> . item_idx . "vals"

For example, p1w1measure3.2.vals will return all values (for example:  X, Y, Z and Magnitude for a Distance Between measure or X, Y, Z for Position measures) for measure item 2 in measure group 3.

Where:

Page ID = 1

Window ID = 1

Measure ID = 3

Item Index = 2

Min, Max, and Extreme Values

hmtoggle_plus1Min

The expression below will return the least value (minimum) across all time steps and measure items, for the given x and y options.

"p" <page_id> "w" <window_id> "measure" <measure_id> . x_option_idx . y_option_idx . "min"

hmtoggle_plus1Max

The expression below will return the greatest value (maximum) across all time steps and measure items, for the given x and y options.

"p" <page_id> "w" <window_id> "measure" <measure_id> . x_option_idx . y_option_idx . "max"

hmtoggle_plus1Extreme

The expression below will return the greatest absolute value (extreme) across all time steps and measure items, for the given x and y options.

"p" <page_id> "w" <window_id> "measure" <measure_id> . x_option_idx . y_option_idx . "extreme"

For example, p1w1measure3.0.3.min will return the least value of magnitude across all measure items and time steps, the time/frequency at which this value is attained, and the time step/frame at which this value is attained.  Similarly max will return the largest value, and extreme will return the largest absolute value.

Where:

Page ID = 1

Window ID = 1

Measure Group = 3

X Option = 0

Y Option = 3

Other Measure Information

hmtoggle_plus1IDs

The following expression can be used to return all of the IDs in the measure group specified by measure_id:

"p" <page_id> "w" <window_id> "measure" <measure_id> . "ids"

For example, p1w1measure3.ids would be used to return the IDs of all measure items in measure group 3.

Where:

Page ID = 1

Window ID = 1

Measure Group = 3

hmtoggle_plus1Label

The following expression can be used to return the label for the measure group specified by measure_id:

"p" <page_id> "w" <window_id> "measure" <measure_id> . "label"

For example, p1w1measure3.label would be used to return the label for measure group 3.

Where:

Page ID = 1

Window ID = 1

Measure Group = 3

Measure Options

The tables below contain the expressions for the measure options currently available in HyperView:

hmtoggle_plus1Distance Between, Incremental Distance, and Relative Displacement

Val

X Option

Y Option

0

Default (time, frequency)

X Coordinate

1

X Coordinate

Y Coordinate

2

Y Coordinate

Z Coordinate

3

Z Coordinate

Magnitude

4

Entity ID

-

5

Distance

-

hmtoggle_plus1Position

Val

X Option

Y Option

0

Default (time, frequency)

X Coordinate

1

X Coordinate

Y Coordinate

2

Y Coordinate

Z Coordinate

3

Z Coordinate

-

4

Entity ID

-

5

Distance

-

hmtoggle_plus1Angle Between, Incremental Angle, and Relative Angle

Val

X Option

Y Option

0

Default (time, frequency)

X Projection

1

X Coordinate

Y Projection

2

Y Coordinate

Z Projection

3

Z Coordinate

True Angle

4

Entity ID

-

5

Distance

-

hmtoggle_plus1Yaw Pitch Roll

Val

X Option

Y Option

0

Default (time, frequency)

Yaw

1

X Coordinate

Pitch

2

Y Coordinate

Roll

3

Z Coordinate

-

4

Entity ID

-

5

Distance

-

hmtoggle_plus1Node Path, Nodal Contour, Elemental Contour, and Component Contour

Val

X Option

Y Option

0

Default (time, frequency)

Value in the case of a single layer plot.

Bottom value in the case of a top/bottom plot.

1

X Coordinate

Top value in the case of a top/bottom plot.

1mn(101, 102, etc.)

-

Value in the case of a single layer plot.

Bottom corner value in the case of a top/bottom plot, where mn is the corner node index number.

2

Y Coordinate

-

2mn(101, 102, etc.)

-

Top corner value in the case of a top/bottom plot, where mn is the corner node index number.

3

Z Coordinate

-

4

Entity ID

-

5

Distance

-

Notes

Any invalid expression will return “N/A”.

See also

Measure Panel

Notes Panel