question

Visakh Sakulan avatar image
0 Likes"
Visakh Sakulan asked Arun Kr edited

How to change the color of the surrogate in flow item as per its item type?

jig-1.fsm

In the model I have created 4 surrogate planes for the box flow item (with color red). I want to change the color of these surrogates according the item type of the flow item.

FlexSim 17.0.3
flowitemsvisualssurrogate objects
jig-1.fsm (19.5 KiB)
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

·
Arun Kr avatar image
0 Likes"
Arun Kr answered Arun Kr edited

Hi @Visakh Sakulan

You can use a decision point and inside the on arrival trigger. You can try the following code.

treenode Surrogate = drawsurrogate(item);
for(int k =1;k<=Surrogate.subnodes.length;k++)
{
 Object SurrogatePlane = Surrogate.subnodes[k];
 SurrogatePlane.color = item.color;
}

vishak-support.fsm

Regards,

Arun KR


vishak-support.fsm (20.6 KiB)
5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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