question

Fiona Kattenstroth avatar image
1 Like"
Fiona Kattenstroth asked Fang J commented

How can I change the visual of a source by FlexScript?

Does anybody have an idea how I can change the visual of an event triggered source in the Processflow when I'm using FlexScript to enable/ disable it? To fill the checkbox I used these expressions and they worked properly:

setvarnum(Model.find("Tools/ProcessFlow/ProcessFlow/Source"), "enabled", 0);

setvarnum(Model.find("Tools/ProcessFlow/ProcessFlow/Source"), "enabled", 1);

But even if the source is enabled, the event triggered source is crossed out:

Thank you in advance!

FlexSim 20.2.2
flexsim 20.2.2visualevent-triggered sourceprocessflow icon
1600264245825.png (2.4 KiB)
· 2
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
4 Likes"
Matthew Gillespie answered Fang J commented

To get the icon to update you need to call the "updateIcon" function on the activity as well.

  1. treenode source = Model.find("Tools/ProcessFlow/ProcessFlow/Source");
  2. setvarnum(source, "enabled", checked);
  3. function_s(source, "updateIcon");

example_1.fsm


example-1.fsm (30.3 KiB)
· 3
5 |100000

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