question

Daniel A5 avatar image
0 Likes"
Daniel A5 asked Matthew Gillespie answered

Operators not snapping back to network node

operatorproblem.fsm

Operators no longer seem to snap back to their network node on reset. See attached example model.

FlexSim 18.0.2
network nodesoperators
operatorproblem.fsm (22.5 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.

Joerg Vogel avatar image Joerg Vogel commented ·

If someone works with the people module, he wants to update the operators at their new positions per default. A flag or switch would be a compromise which behaviour someone prefers.

0 Likes 0 ·
Matthew Gillespie avatar image
3 Likes"
Matthew Gillespie answered

In 18.0 we made objects update their reset position automatically whenever an object's position is updated and the model is reset. This makes models more repeatable by default and eliminates the tedious process of making sure you set the reset position of objects in your model.

This is not a bug, we changed the behavior to improve the software. Snapping to nodes doesn't work exactly the same way it did before, but it provides the same functionality. Wherever you position your operator is the place they will be reset to. If you want them to snap back on top of the node, just position them on top of the node. If you want 6 operators attached to a node you no longer need to have all 6 snap on top of each other. You can position them around the node so they are easier to select individually. Or put them all on top of each other on top of the node if you want. There's really no downside.

If you really want to turn off this behavior (I don't see why you'd want to) clear the reset position as Jorg suggests and set the operator's resetposition variable to 0 like so:

getvarnode(model().find("Operator1"), "resetposition").value = 0;

(We'll update the Clear reset position menu option to also set this variable value in the future)

5 |100000

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

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Joerg Vogel commented

The operator has got a reset position by default. If you delete the position, the old behaviour is back, where the operator is placed at a network node.


· 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.

Daniel A5 avatar image Daniel A5 commented ·

Thank you.

There is still an issue that whenever the operator is moved when the model is reset, the reset position gets updated and hence does not return to the network again.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Daniel A5 commented ·

The Operator inherits from the FlexsimObject of the library the eventfunction "onClick" wherein the function updateResetPosition is called. Each time you set a location from QuickProperties the Reset Position is updated, too. If you insert a different onClick eventfunction to the Operator attributes tree, wherein the updateResetPosition isn't called, the operator snapps back to the network node, even if you drag the operator. You can place the operator to a user library and drag new operators only from this user library. For the Quick Properties I haven't found a workaround.operator-snap-back-to-nn.fsm

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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