Hi,
What is the recommend way of changing the default conveyor speed in FlexSim 2021? In 2020 we used the OnModelReset trigger to change the speed of a conveyor OnReset by setting the speed property in the conveyor type. Something like this:
Model.find("ConveyorSystem>variables/conveyorTypes/ConveyorTypeWassen/speed").value = newSpeed;
What is the best option to do this now? I understand that we need a for loop to loop over all the conveyors of that type (since they are now in a group and don’t have a conveyor type property anymore). I thought of doing something like this:
double newSpeed= someValue; Group conveyorWassenGroup = Group( "ConveyorTypeWassen" ); for( int i = 1; i <= conveyorWassenGroup.length; i++ ) { Conveyor conveyor = conveyorWassenGroup[ i ]; conveyor.default= newSpeed; //Not working, throws error, can't set this property conveyor.targetSpeed = newSpeed; //Not working }
But that is not allowed, since we can’t set the defaultSpeed. Do we still need to go in the tree and change the speed variable or is there an option that I am missing here?
Thank you for your time