How to remotely print custom G-code with Bambu Studio?

I wrote a simple slicer for my special needs which generates .gcode file to print on my Bambu X1E. And I am trying to figure out if I can remotely print this file.

Luckily, Bambu printers support printing .gcode files with SD card. And following the instruction
We can now connect to FTP on the P1 and A1 Series, I can send .gcode file to SD card through LAN.

However, the custom .gcode file cannot be seen on the Bambu Studio. Therefore, to start the printing, I still need to be in front of the printer, tapping on the screen, and selecting the .gcode file to start print.

Is there a way to start the print with a custom .gcode file remotely on Bambu Studio?

Thanks!

Welcome to the forum.

You might want to look into creating a “dummy” .gcode.3mf file. Export a gcode file for a cube from Bambu Studio so it will generate the .gcode.3mf file structure. Then check out this post about replacing the gcode inside of the 3mf file. This will allow you open this modified .3mf file in studio and remotely send it to your printer. You can then also start it remotely from the SD card.

1 Like

Thanks for sharing the post!

I am working on a Mac so 7zip is not an option for me. But as Ukdavewood mentioned in the post, Python script with zipfile library works very well.

Here I post my little piece of script in case anyone is interested:

import zipfile
with zipfile.ZipFile('./filename.gcode.3mf', 'a') as z:
    z.write('./path/to/your/new.gcode', 'Metadata/plate_1.gcode')
5 Likes

I found this post while searching for the same solution. Just figured, you can drag the gcode file into the “preview” window in Bambu studio and then send it to the printer. Not sure if this has been enabled by a new software version recently but at least it does the job.

1 Like

Thanks! That is definitely the quickest solution! Works like a charm. My use case is to merge some .gcode files with different settings into one to enhance a couple of layers instead of all - making the overall result print more quickly.