I think I have encountered a bug in the SimTalk syntax. I am trying to set the eventcontroller end time attribute in a switch case.
The example code below demonstrates the possible bug (in my real code there are many cases involved):
switch true case true EventController.End := 10 case false EventController.End := 5 end
It is clear that this code should set the eventcontroller end time to 10. When I try to apply this code, i get a syntax error saying "Error in line 2: Constant of type real expected." .
I am pretty sure that SimTalk confuses the ".End" attribute of the EventController with the end of the switchcase. This can be proven if you fold this switch case as in the following picture:
Am I doing something wrong? Or is this really a bug. If so, is there a workaround? I did not download the brand new update yet and I am running Tecnomatix Plant Simulation 13 (I try to avoid updates during the development of a large model).
Thank you in advance,
Solved! Go to Solution.
Thank you for your reply, my code actually is with integers. I just made that code to illustrate what I thought the problem was. Although I must have made a mistake in my main code elsewhere it seems, as it indeed works when I try a simple example with integers. I was confused by the way the folding works.