Notifications
Clear all

Changing filament type in a compiled G-Code file  

  RSS
rick_petrin
(@rick_petrin)
New Member
Changing filament type in a compiled G-Code file

I am going to be building the Mark 2 Lack enclosure, and the file download only has the compiled G-Code file.

 

It appears that the normal build is using PLA for the parts, but I want to use PETG instead. I am sure there is a way to edit the G-Code directly, but I was hoping to import the print in the Prusa slicer, make the changes, and then export to new G-Code. 

 

Can anyone give me some tips on this?

Posted : 27/05/2020 3:19 pm
Nikolai
(@nikolai)
Noble Member
RE: Changing filament type in a compiled G-Code file

There is no easy way to reslice from the gcode file. You can edit gcode file with any text editor and change the nozzle temperature. Search/Replace any occurrence of M104/M109 with the PETG value (something like this: M104 S250)

If you're lucky, it will print perfectly fine. But it highly depends for which printer the gcode was generated and which one you want to use. Feel free to provide more information and we can check for you.

Often linked posts:
Going small with MMU2
Real Multi Material
My prints on Instagram

Posted : 27/05/2020 5:41 pm
rick_petrin
(@rick_petrin)
New Member
Topic starter answered:
RE: Changing filament type in a compiled G-Code file

@nikolai-r

Thanks for the reply. I went back through the code and looked more closely. Turns out it was already designed to work with PETG. There was just no where in the build information I had that showed what filament type to use, and I assumed if nothing was stated it was going to be PLA. 

Things are printing now and look great. 

Posted : 27/05/2020 5:52 pm
Nikolai liked
Share: