Start and end Gcode for Bambu H2D printers

Hi,

I wanted to try using Grasshopper to create gcode for 3D printing and see if it is possible with a Bambu H2D with an AMS. I copied the start and end gcodes but the printer first unloads the filament I already loaded using the AMS and then tells me to manually load the filament. I wonder if it is possible to use the filament I already loaded. I think the part related to this is under “prepare print temperature and material” but since there is no documentation for Bambu custom gcodes I was wondering if anyone might have an idea how to make this work. Here is the gcode with start and end sections:

another thread related to this not specific to H2D: Printing Custom 3d Model G-Codes from Grasshopper(Rhino 8) - #6 by tncrdn