question

Jouky D avatar image
0 Likes"
Jouky D asked Nil Ns answered

Change Color AGV Path using FlexScript

Hello everyone,

I am trying to change the color of the path using a color palette. However, setcolor does not change the color of the path, neither path.color. I have seen this post https://answers.flexsim.com/questions/52704/agv-path-color-and-width.html . However, it seems the answers are blocked and I need to change to color of the paths by flexScript while the question asked for the AGV Network's Menu. Why it does not work? How can I solve it?

Thank you! :D

FlexSim 23.2.1
agvcolor changeagv paths
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

Nil Ns avatar image
0 Likes"
Nil Ns answered

Hey Jouky,


You can use the Color Class, followed by the code that applies the changes:


Object o = Model.find("AGVNetwork/Path1");
o.color = Color.red;
function_s(o,"finalizeSpatialChanges");


I hope it helps!

5 |100000

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