Yes
1. add this to the [RS274NGC] section of your ini file
Code:
USER_M_PATH = ./mcodes
2. add this to the [HALUI] section of your ini file
3. create a folder 'mcodes' in your config folder and create a file 'M127' in this folder.
4. mark the file 'M127' as executable
5. copy this into the file 'M127' and save:
Code:
#!/bin/bash
axis-remote /home/user/linuxcnc/configs/sim/axis/nc_files/3D_Chips.ngc &
Note: this is the path/file you would need to adjust to load your specific file, here we load '3D_Chips.ngc' as an example '/home/user/linuxcnc/configs/sim/axis/nc_files/3D_Chips.ngc'
Also note that the '&' at the end is important, as otherwise the load command is blocked because the 'M127' command is still running.
You can now connect the MDI-command to your GUI button in the postgui hal file.