hgtrans control AddLabelAliasRule

Sets an aliasing rule for channel labels.

Syntax

hgtrans control AddLabelAliasRule pattern, replacement, subcase, datatype, level

Application

HyperGraphTrans Tcl Set

Description

This command sets an aliasing rule for channel labels. The labels at the specified level (“datatype”, “request”, or “component”) are altered by replacing the text matching pattern with the string replacement. The subcase and datatype fields limit replacement to labels within a specific scope (for example, all requests in the “Displacement” datatype).

Inputs

pattern
A pattern of characters to be matched. The pattern can contain two different wildcard characters. An “*” (asterisk) will match any substring, whereas a “?” (question mark) will match any single character.
replacement
A string of characters to be substituted for the pattern if it exists in the label.
subcase
The name of the subcase in which to apply the rule.
datatype
The name of the datatype in which to apply the rule. (Does not apply if the level is “subcase”.)
level
The level of labels at which to apply the rule.
datatype
request
component

Example

Cause hgtrans to read everything from a MADYMO file called “displacement.dat” and save it to “displacement.abf”, changing the word “head” in all request names to its Spanish equivalent “cabeza” .
hgtrans control SetFile “displacement.dat”
hgtrans control SetOutputFile “displacement.abf”
hgtrans config SetAllChannelsSelected
hgtrans control AddLabelAliasRule “head” “cabeza” “Subcase 1” “Displacement” request
hgtrans control StartTranslation

Errors

None.

Keywords

set channel alias