@tig said:
If the text is 'fixed', but occasionally editable by the user to customize settings, then a file named 'Gcode.ini' could be kept with the .RB file: the user edits that and your code reads its contents as it loads.
The text is 'fixed' for a single 3D printer.
But one user mey have more then one printer.
@aerilius said:
but load evals in the top level namespace, so you would have to use constants like DFI1::GCode::File_header to access you plugin's namespace (no local variables, no global variables).
Well, I put the load File.join(File.dirname(FILE),'Gcode.ini')
inside the class GcodeExporter - and it works - no need for "::" just use the constants.
That doesn't mean it is good practice nor that it will work in future versions of sketchup
but - 1)it works. 2) it is very simple 3) it gets the job done quickly