question

Adarsh Jeyes avatar image
1 Like"
Adarsh Jeyes asked Adarsh Jeyes commented

State (State_Breakdown) - Change yellow color

PFA an image that shows a processor in STATE_BREAKDOWN.

state-breakdown-color.png

During this state (and any other), a rectangular box colored in yellow appears at the periphery of the FR (here, processor). Is it possible to change this color?

FlexSim 17.0.2
breakdowngraphicscolor changestateyellow rectangular box
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Phil BoBo avatar image
6 Likes"
Phil BoBo answered Adarsh Jeyes commented

Add the following code to your object's Custom Draw Trigger and set whatever red/green/blue values you want:

if (getvarnum(current,"nrofstops") > 0) {
	fglDisable(GL_LIGHTING);
	double r = 138;
	double g = 43;
	double b = 226;
	drawrectangle(-0.2,0.2,0, 0.1,1.4, 0,0,0, r,g,b);
	drawrectangle(1.1,0.2,0, 0.1,1.4, 0,0,0, r,g,b);
	drawrectangle(-0.1,0.2,0, 1.2,0.1, 0,0,0, r,g,b);
	drawrectangle(-0.1,-1.1,0, 1.2,0.1, 0,0,0, r,g,b);
	fglEnable(GL_LIGHTING);
}
return 1; // skip the default draw code (don't draw the yellow rectangle)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Adarsh Jeyes avatar image Adarsh Jeyes commented ·

It worked.

Thanks a lot, @phil.bobo!

0 Likes 0 ·