question

SeongWeon HONG avatar image
0 Likes"
SeongWeon HONG asked SeongWeon HONG commented

How to change property of processflow activity by flexscript?

How to change the Enabled property of Event-Triggered Source activity using flexscript?

Thanks in advance.

event-triggered-source.png

FlexSim 24.2.3
processflowproperty of activity
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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered SeongWeon HONG commented
  1. setvarnum(activity, "enabled", 1 / 0);
  2. // optional, to refresh the activity's icon without having to re-open the process flow
  3. function_s(activity, "updateIcon");

For this particular option you can find this code when you link the source to a model parameter and choose the "Enable or Disable" option.

capture1.png

In general, most properties are stored in the variables attribute node of objects, whose value gets changed with the command above.

capture2.png

For objects in the 3d model you can check the available columns in a property table to find what can be changed with the "object.setProperty()" method.


capture1.png (14.4 KiB)
capture2.png (6.4 KiB)
· 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.