Ability to feed the code view from a marco

I would like to get a way to inject a gcode content in the code view from a macro instead of passing by a "temporary file".
It will help to implement CAM feature inside UCCNC like CAM wizard, ... and visualize the result in the toolpath viewer, and see the resulting gcode before starting the process
It will help to implement CAM feature inside UCCNC like CAM wizard, ... and visualize the result in the toolpath viewer, and see the resulting gcode before starting the process