poITracingCtrl GetEntityColor
Gets the entity color.
Syntax
poITracingCtrl_handle GetEntityColor type id
Application
HyperView Tcl Modify
Description
Tracing control entities can have individual colors, or inherit the global color setting from the tracing control itself. This command retrieves the color of the specified entity as a trio of RGB values, or "GLOBAL" if the entity's color is inherited.
Inputs
- type
- The entity type.
- id
- The entity identifier.
Example
hwi OpenStack
if {[catch {
hwi GetSessionHandle session_handle
hwi GetActiveClientHandle 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 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.