A want to "Pause" and "Start" a job from a command inside a plugins

edited August 2015 in Feature Requests
I'm writing a plugins that use the virtual printer, every change of Z I need to "pause" the virtual printer and then start again from a function inside a plugin, I already try this but not work:

  host.Connection.connector.PauseJob("wait:");  <-----the pause windows appears but it's only a void frame and it's not clickable
"..............HERE PLUGIN ACTIONS........................"
                     host.Connection.connector.RunJob();<-----not start..
                     host.Connection.connector.Activate() ;<-----not start..
Any Advice on how do that?

Thank you


  • That is hard to do. You can analyse analyser and trigger on changes but that is always after the command or even more were send, so your timing is not ideal. If you need exact timings you would currently need a own connector that handles it. One idea would be to have own host commands. I will add a event for that for 1.5.5 so you could change gcode before printing to get your plugin called by connector when that host command is reached. Then a simple post processing filter could add your host commands and then your plugin gets called with correct timings.

    Make sure you call pause only on main thread. All gui actions only work in main thread.
  • Thank you for the quick reply,
    I tried this:  

    host.Connection.ConnectionPaused = false;    or
    host.Connection.ConnectionPaused = true

    For my application (using the vitual printer mode) its seems ok for now.
    I have another question, but I'll open a new Post.

    Thank you very much for the support.
  • ConnectionPaused will stop all communication until set to true without running pause commands/showing pause window. Main purpose is to stop if printer wants it, but of course you can also use it internally.
Sign In or Register to comment.