Operators not snapping back to network node

Operators not snapping back to network node

daniel_a5
Not applicable
121 Views
5 Replies
Message 1 of 6

Operators not snapping back to network node

daniel_a5
Not applicable

[ FlexSim 18.0.2 ]

operatorproblem.fsm

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

0 Likes
Accepted solutions (1)
122 Views
5 Replies
Replies (5)
Message 2 of 6

joerg_vogel_HsH
Mentor
Mentor

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.

10638-clear-operators-reset-position.jpg

Message 3 of 6

daniel_a5
Not applicable

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
Message 4 of 6

joerg_vogel_HsH
Mentor
Mentor

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
Message 5 of 6

joerg_vogel_HsH
Mentor
Mentor

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
Message 6 of 6

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

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)



Matthew Gillespie
FlexSim Software Developer