poITracingCtrl SetEntityColor

Sets the entity color.

Syntax

poITracingCtrl_handle SetEntityColortype id colorStr

Application

HyperWorks Tcl Modify

Description

Tracing control entities can have individual colors, or inherit the global color setting from the tracing control itself. This command sets the color for the specified entity.

Inputs

type
The entity type.
id
The entity identifier.
colorStr
The desired color. This should be a series of three RGB values from 0 to 255, or the word “GLOBAL” to indicate that the entity should inherit the color specified by SetColor.

Example

Creates several node traces, and also sets and gets their color:
hwi OpenStack
if {[catch {
    hwi GetSessionHandle session_handle
    ::post::GetPostHandle client_handle
    client_handle GetModelHandle model_handle [client_handle GetActiveModel]
    model_handle GetTracingCtrlHandle tc_handle
    tc_handle AddEntity node "Node 251"
    tc_handle AddEntity node "Node 197"
    tc_handle SetEntityColor node "Node 251" "GLOBAL";
    tc_handle SetEntityColor node "Node 197" "255 0 0";
    set traceColor [tc_handle GetEntityColor node "Node 251"];
    set traceColor2 [tc_handle GetEntityColor node "Node 197"];
} result]} {
    global errorInfo;
    puts stderr $result;
    puts "[session_handle GetError]";
    puts stderr "*** Tcl TRACE ***";
    puts stderr $errorInfo;
} else {
    puts "********";
    puts "Trace color 1 = $traceColor";
    puts "Trace color 2 = $traceColor2";
    puts "********";
    puts "No errors.";
    puts "Warnings: ";
    puts "    [session_handle GetError]";
}   
hwi CloseStack
Console Output:

********
Trace color 1 = GLOBAL
Trace color 2 = 255   0   0
********
No errors.
Warnings:

Errors

Returns HW_InvalidHandle if the tracing control handle is invalid.