question

Willie Chung avatar image
0 Likes"
Willie Chung asked Willie Chung edited

Change the name of the original machine


I use a For loop to execute the logic of copying the machine in OnModelReset, and directly change the name of the copied machine in the GlobalTable.

However, as mentioned earlier, I want the names of the original machine and the Queue to also change accordingly. The following error occurred while writing the code.

Thank you for your assistance.

1709607049602.png

File:Question.fsm


FlexSim 23.0.0
onmodelresetcopy machineerror code
1709607049602.png (329.9 KiB)
question.fsm (69.9 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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Willie Chung edited

Line 4 is missing a semicolon.

You declare the variable Obj, then proceed to use obj, which is only declared further down and thus not valid at that point in the code.

· 7
5 |100000

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