March 21, 20215 yr Hi guys, does anyone know if there is a way to use a method like Dispose () as in the plugin, only in the quester, namely in a custom script, when the product stops, I need to reset some custom settings that I write in an xml file. In general, i just need a method that will be triggered before the Quester stops.
March 21, 20215 yr You can hook onto the https://wrobot.eu/byme/doc/html/E-robotManager.Products.Products.OnChangedIsStarted.htm event and run whatever you need to in there
March 21, 20215 yr Author public class MyCustomScript { static MyCustomScript() { robotManager.Events.ProductEvents.OnProductStopping += OnProductStopping;//subscribe } public static void OnProductStopping(string str) { //code when product stopping Logging.Write("Stopping " + str); robotManager.Events.ProductEvents.OnProductStopping -= OnProductStopping; //unsubscribe } }
Create an account or sign in to comment