question

Julio R avatar image
1 Like"
Julio R asked Matthew Gillespie answered

Change conveyor type color

Is there an instruction to change the color of a conveyor type with code or on a trigger?

I am changing it setting the three corresponding nodes value but I was wandering if there is an easier way.

FlexSim 17.1.4
conveyor system
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

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered

No, this is the easiest way I could think of:

Color col = Color.red;
treenode conv = model().find("Conveyor1");
treenode typeColor = getvarnode(conv, "type").find("+/drawColor");

typeColor.subnodes[1].value = col.r;
typeColor.subnodes[2].value = col.g;
typeColor.subnodes[3].value = col.b;
5 |100000

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