Plugin Assistance
-
We are exploring the use of plugins instead of rebuilding DWC and have a few questions. Is it possible for a plugin to act on the upload of a gCode job file? Similar to how DWC acts on uploading a system file and prompts to install. If so, does anyone have any pointers on how to implement?
What we want to create is a pre-processor which automatically runs a script on the SBC on all jobs when uploaded by calling a custom mCode with the filename and path as the parameter. This might get tricky if uploading a zip file..
Another idea would be a right click context menu which calls the script (per file) when selected.
-
@oozebot Look into @contextmenu for right click menus/actions. BtnCmd is riddled with right click menus, and it's what I use.
psudo example :
<v-btn @contextmenu="doMenu($event)"></v-btn> doMenu(e){ e.preventDefault(); //prevents the standard right click menu from appearing whatever else you need.... }
-
@oozebot hi, did you ever come to a solution for this? I was thinking to try and use execonmcode to start the plugin when an Mcode is called in the print gcode file, but maybe something even simpler is possible..
-
@pjl Not yet, but moving a lot of our custom code to a plug-in is still our plan - we just had to prioritize other things ahead of it. Hopefully, when we revisit it, there will be many more examples out there for us to learn from.