A better way to configure Cura to slice objects for your Makerbot Replicator 2 3D printer

**Update** This method has been proven up to Cura 4.10 on Ubuntu Linux. If you’re having problems, first check that it’s a Replicator 2 (I haven’t tested a 2X with the heated bed), then check that your PLA material info is set to printing at 230 degrees C, then double check that you’ve followed all of the instructions directly, skipping no steps (essential parts are the “r2” profile addition, and the GCode for start and stop). Also this method may require that you adjust your bed height on the fly while printing the first layer to get it just squashing onto the plate, but not blocking the nozzle.

I’ve posted previously about using Makerbot Replicator 2 3D printers with Cura, which involved hacking at the X3GWriter plugin, but was frankly a little hacky, and starts to cause problems when you update etc.

With more time on my hands now I’ve had a closer look and spoken to the author of the X3GWriter plugin. It turns out that the printer definition in Cura passes metadata to the plugins you use, and that his X3GWriter plugin was watching for the “machine_x3g_variant” value. When we modify the standard printer definition for Replicator 1 that comes with Cura, it still passes “r1” to the X3Gwriter plugin, which makes it take on values for the Replicator 1 which results of course in incorrect print scaling. For a replicator 2 we actually want “r2”. Makes sense.

So if you’ve been trying to use Cura on your Replicator 2, and getting things that are the wrong size, you’ll need to create or modify your profile for your printer.

Ideally, Cura would come with a Replicator 2 profile, which I’ll put time in to submit to the maintainers via github once I can understand how their provided profiles work, but for now here’s my little how to:

I’m using Cura 4.6 for my example, and this is specifically for the Replicator 2 – you may need to modify some things to make the 2X work

I also assume that you’ve installed the X3GWriter plugin already in Cura’s “marketplace”

1. Open Cura, and add a new printer. Click on non-networked printer, and select “Makerbot Replicator”

2. Once you’ve added this printer, rename the printer to something like “Makerbot Replicator 2” (doesn’t matter what, it won’t affect anything), and go to “machine settings” for this new printer.

3. Make the Gcode flavour “makerbot”, enable origin at center, disable heated bed, select build plate rectangular, and make the dimensions the following:

   x width = 225mm

   y depth = 145mm

   z height = 150mm

Here are my printer settings:


4. We’ll also check settings for “extruder 1”. The standard nozzle size is 0.4mm, and the compatible material diameter is 1.75mm.
Here’s my extruder settings:


5. Add the custom GCode to the printer settings. This is necessary as for some reason by default heated bed info is sent, which makes the printer stop straight away. You can look up what this means and tweak it as needed (maybe you want the bed to drop lower at the end etc).

Contents of my start Gcode:

; -- start of START GCODE โ€“
M73 P0 (enable build progress)
;M103 (disable RPM)
;G21 (set units to mm)
M92 X88.8 Y88.8 Z400 E101 ; sets steps per mm for replicator
G90 (set positioning to absolute)
(**** begin homing ****)
G162 X Y F4000 (home XY axes maximum)
G161 Z F3500 (home Z axis minimum)
G92 Z-5 (set Z to -5)
G1 Z0.0 (move Z to "0")
G161 Z F100 (home Z axis minimum)
M132 X Y Z A B (Recall stored home offsets for XYZAB axis)
(**** end homing ****)
G92 X147 Y66 Z5
G1 X105 Y-60 Z10 F4000.0 (move to waiting position)
G130 X0 Y0 A0 B0 (Set Stepper motor Vref to lower value while heating)
G130 X127 Y127 A127 B127 (Set Stepper motor Vref to defaults)
G0 X105 Y-60 (Position Nozzle)
G0 Z0.6     (Position Height)
; -- end of START GCODE โ€“

Contents of my end GCode:

; -- start of END GCODE โ€“
G92 Z0
G1 Z10 F400
M104 S0 T0
M73 P100 (end  build progress)
G162 X Y F3000
; -- end of END GCODE โ€“

Here’s what it should now look like in your printer settings (the gcode settings of course are longer than the box, so they scroll, don’t copy directly from this image for them):


So we now have the printer defined, but it’s missing the important piece of the puzzle which is the metadata to pass along to the X3GWriter plugin so that we get an X3G file suited for the Replicator 2.

6. Let’s manually edit the printer definition file. Close Cura before continuing. I’m using Ubuntu Linux, so my printer definition file is in:

I use nano, but any text editor (even gnome’s gedit) will be fine to edit this file.

If you’re in windows, try a system-wide search for the location (sorry I don’t know where it lives in Windows)

We are looking for the heading “[metadata]”, and anywhere under this heading block we’re going to put “machine_x3g_variant = r2”. For example, here’s what mine looks like (some details will be different for yours):

version = 4
name = MakerBotReplicator2
id = MakerBotReplicator2

setting_version = 13
machine_x3g_variant = r2
type = machine
group_id = 993612c3-052e-42e2-bb6b-c5c6b2617912

0 = MakerBotReplicator #2_user
1 = empty_quality_changes
2 = empty_intent
3 = normal
4 = empty_material
5 = empty_variant
6 = MakerBotReplicator #2_settings #2
7 = makerbotreplicator

Notice where “machine_x3g_variant = r2” is?

Save this file where it is, and reopen Cura.

That should be it. You’ll be able to directly choose your printer in the normal way, choose your settings and object, and export. If you find it doesn’t successfully create a file, there’s something up with your config, so double check any syntax problems etc.

You can also check the output of Cura’s errors in (again I’m in Linux):


So if you tweak Gcode and tinker with those bits and pieces you can see if X3GWriter is unhappy about any of it.

Quick note about filament: I should mention here, that I use PLA filament, and I set (under the materials profile settings) the nozzle to print at 230 degrees (celcius) because that’s what I find works well. I find that going too much lower than 220 degrees (Cura seems to default to 200!) tends to jam the nozzle. It could be that my filament needs this, or just the temp of the head is always slightly off on these printers, but that is what works for me, and could be the cause of problems I’m asked about where the head seems to not be extruding. Worth checking..

Happy printing!

46 thoughts on “A better way to configure Cura to slice objects for your Makerbot Replicator 2 3D printer”

  1. Hi, I had this thought to use different software today out of the blue. It looks like you wrote this just last week and I’m glad you did. I followed your instructions and it’s working great. It took less than 30 min!

    For the location of the config file:
    1. In a Windows Explorer window type: %appdata% and press enter.
    2. Navigate to: \Roaming\cura\4.6\machine_instances
    3. Make the changes as recommended above.

          1. Hmmm I’m not quite sure what you’re asking sorry. I mean it handles the same kind of x3g files, but there are extra commands to operate the heated bed etc. This is all done with the variant type given in the profile. For the 2x replicator, instead of “r2” you will probably need “r2x”. This may make my instructions work with a Replicator 2X.

            Hope that helps!

  2. Thanks for this guide! I posted on your thread at the Ultimaker Forums but maybe it’s easier to ask here.

    “I’ve followed the steps and Cura will now slice my STL and spit out an X3G file, but I’m having a problem. When I start my print, the machine heats up and then starts along the printing path. The issue?
    It doesn’t extrude any filament. It seems like the motor is not running…
    To troubleshoot I’ve use the “load filament” feature and printed other files sliced in the Makerbot software with no issues.

    Any idea of what could be happening? Thanks!”

    1. Sorry about that – there are so many forums I’ve posted things in over the years I forget to check back and don’t appear to get notifications emailed to me about them.

      In terms of your problem, did you previously set up your system using my older method where you had to actually modify the X3GWriter plugin? If so, you may need to remove the plugin and install it again.

      Otherwise, is it a Replicator 2 you’re using? Or is it a 2X?

      1. -No, I didn’t have X3GWriter installed until after I saw your updated tutorial.
        I’ll try the process on an OS X computer and see if I get better results. My printer is a Replicator 2 (not 2X).

        -I manually set my temperature to 190 in Cura (the same that I use on the Makerbot software with no issues). I can see the machine heat up to that temperature but it’s just not wanting to extrude anything

        I don’t want to waste too much of your time, but do you have an X3G file sliced in Cura that you know for a fact works with your Replicator 2? I wonder if I can try printing that file to see if it’s software or printer related.

        Thanks again! ๐Ÿ™‚

        1. I too would be interested. Ive been having issues getting this to work on my machine.

          M.B. idk about you, but my first layer seems to me much to close to the print bed to even extrude material, subsequent layers print fine.

          Oddly enough, I have uninstalled and restated this whole process when the output file was giving me a list of errors. I did not remember to edit the X3GWriter after reinstalling, and this resulted in a successfully printable file (minus the first layer) until the extruder failed when the printer was about 1cm tall. Going back to add the “machine_x3g_variant = r2” again results in all sorts of errors

          1. Hmmmm…

            I know that the first layer is pretty squashed to the plate, I assumed to create the adhesion it requires which is how other printers I’ve had over the years and using Slic3r made the first layer. If too close, I manually adjust the plate until it’s comfortably squashed and leave it there.

            I don’t recommend editing X3GWriter anymore, as this method (placing the machine variant in your profile) effectively does the same thing (the old method editing the plugin simply forced “r2” to be chosen as a profile no matter what).

            Though you may get a successful print without the proper profile, it’ll be the wrong size (because of the different number of steps).

            What are the “all sorts of errors”? Which operating system are you using?

    2. Another super quick thought, have you adjusted your filament temperature to around 220 degrees in cura? I had mine with a default filament setting which was 185 degrees (celsius) so the head jammed because the filament wasn’t liquid enough for the machine.

    3. Hi M.B., maybe it’s too late, but I wanted to try Cura with my old Replicator 2 yesterday and I was having the same problem. I’ve read other comments and apparently it’s a common issue so maybe we can help others. In my case I had the impression that the nozzle was too close to the build plate (I checked calibration and everything was fine). So I remembered there was a setting for custom profiles in Makerware called “bedZOffset”, where you could add some distance between the nozzle and and the build plate. I tried to find the same option in Cura and after a while I found out that it doesn’t exist by default. But there is a plugin you can find on Cura’s marketplace called “Z Offset Setting”. I installed it, add 0,3mm distance and now it works. I didn’t have time to keep testing but 0,3 was too much (maybe 0,15 will do it) and the filament wasn’t sticking but I think you might be having the same problem and this worked for me. Hope it helps.

  3. Thank you for publishing the procedure.
    I followed a similar procedure with Cura 4.7.0.
    The following error occurred when outputting x3g.
    “UnicodeEncodeError:’cp932′ codec can’t encode character’\u2013′ in position 124: illegal multibyte sequence”
    This was resolved by removing the hyphen in the Start/End Gcode.
    I’m not sure why this fix cures the error, but I would like to tell you.

    1. I was having the same problem, with a slightly different message. Deleting the hyphen in the Start/End Gcode allowed me to save the file, but the file is empty–zero bytes, no information. Anyone have any ideas?

      1. Hmmm this all sounds quite odd – perhaps there are problems with editors in different operating systems?

        I haven’t actually returned to this for a while or changed any of this since last year, so I’ll probably have to update and check out what’s wrong in newer versions causing these errors.

        Sorry I couldn’t be more helpful right now.

      1. I just updated my MacBook to Mac OS High Sierra 10.13.6, and am still having the problem. It will write the .x3g file but the file is blank, zero bytes.

          1. I had this problem and it was that the file name was too long or contained illegal characters. Try that maybe?

  4. Can you please help me to run this Printer on my MAC ?

    Sorry for that , but i have no idea how it works with My Macbook.

    Iยดve installed everything and try to find the right type of container where i can write the Metadata for the Replicator !

    Sorry for the bad English

    Cheers Daniel

  5. Looks like updating from Cura 4.6 to 4.7 broke the configuration file.
    There is now a folder for each version with a CFG file that was automatically modified during the update.


    You will once again need to add this line to [metadata]:
    machine_x3g_variant = r2

    1. Thanks for this – you’re more onto it than I am lately! I’ll have to update and check it all out again

  6. Has anyone figured out how to use a heated bed in CURA with the Makerbot?
    I am using a Replicator 2x, and I have gotten everything working great but the heated bed. I have tried ticking the heated bed box, removing the entire start code, and even manually adding (M140 S110) Gcode at the start to start the heated bed, but nothing seems to work.
    Any ideas? And possibly any idea to get dual extrusion working? I am doubtful it is possible, but if anyone knows any resources I’d love to know them.

    1. Hi Dillon, just a thought – perhaps there is a variant for the rep2x? I would assume it would be instead of ‘r2’ for the machine variant it could be ‘r2x’? (and sorry for the slow reply – I didn’t get notified)

    2. This worked fine for me in 4.6 but is now broken in 4.9. I’m trying to figure it out too

  7. i’m having the same issues with files being written with xero bytes on macos (latest version).

    + i cant find the printer definition file to edit it, anyone know where to look on a mac?


  8. ok i found the .cfg file in user/library/application support/cura/4.8/machine_instances
    and was able to edit it
    however i am now getting an error from cura:
    Your configuration seems to be corrupt. Something seems to be wrong with the following profiles:
    -makerbot replicator 2
    -makerbot replicator #2_settings #2

    any idea?

    1. My suggestion it to only make the ONE change to the file, and add ONLY the line:

      machine_x3g_variant = r2

      to the global.cfg file. I had the same issues. When I restarted Cura 4.10, it choked so bad on the config that it started the first-time wizard, and thought there were no printers installed. Removing the comments & other changes I had done to the global.cfg file, having the machine_x3g_variant line be the only change, that allowed Cura to run at that point.

      I am having the same issue some others are, in that the machine does not extrude filament during the print.

      1. This is all quite odd – I recently on a fresh machine installed the latest Cura and followed the procedure again and was able to get a completely functional print straight up.

        John are you modifying the “name of profile”.global.cfg when you add the changes?

        What operating system and what editor are you using to edit this file?

        Are you using a Replicator 2 or a Replicator 2X?

        To mind I wonder if people are using a windows text editor that isn’t saving the profile file in the right format with the right kind of carriage returns?

        To reiterate I’m using:
        – Ubuntu 20.04
        – Makerbot Replicator 2 (not 2X)

        As mentioned in other comments, the Cura software does tend to push pretty close on that first layer, so try winding your bed down a bit to see if it’s simply jamming the nozzle on that first layer and then misfeeding after that.
        When you use the menus on the printer to “change filament” does it nicely suck the filament in and press it out the bottom then?

        I’m having quite a few people asking questions but not hearing back when I respond, so please let me know and we’ll see if we can get to the bottom of this and update the above if there’s any new info.

  9. Hi,
    Just trying to make this work with a Replicator+
    Not sure if all of the G-Code is correct for this printer…
    I can export X3G files, but the makerbot doesn’t seem to recognise them off the USB stick when I plug it in.
    Any thoughts?

  10. Still haven’t been able to get this to work properly with my R2 with heated bed plate and Cura 4.9. Works fine with the 4.4 using the previous method so looks like I will be stuck there until we figure it out. The size appears fine at 4.9 and the bed plate heats up initially but then does not make any attempt to maintain heat after initially reaching the 60 degree setting. This results in the print popping off the bed plate about 10 minutes in once the plate cools. Any thoughts on how I can attempt to troubleshoot?

    1. Hey there, I’m just returning to some of this – is there something in your filament profile regarding this? I’m pretty sure there’s something about heated bed. Also is your profile using the tick box for heated bed?

  11. Hey great tutorial thanks, this worked great but I have the rep2x, I’m having the same issue with the heated bed not retaining its heat after the print starts although it heats up well enough pre-print. I tried changing the metadata tag from “machine_x3g_variant = r2″ to machine_x3g_variant = r2x” and oddly enough it worked just as before without any error however the heated bed still didn’t work. Even tried using an uppercase X like this “machine_x3g_variant = r2X” but that stopped the printer from working altogether. Has anyone found the solution to this?

    1. No problem at all.

      Just a quick question (I can’t test this as I don’t have a Rep2X) – did you tick the “heated bed” option in the printer profile?

      I would imagine that the X3GWriter plugin would take this info and re-interpret it for the commands required to run the Rep2X.

      1. Yes I ticked the box and the heated bed does work in the startup procedure. However once the print starts, the heated bed just stops heating and after a few minutes, its cooled back down and the print looses adhesion to the bed causing it to fail. Its almost as if there’s something telling the printer to just stop heating. Maybe by adding to the gcode could remedy this problem however I’m not sure if the problem is with the gcode itself or with the X3GWriter plugin.

        1. Hmmm… I wonder if the additions I suggest to add to the start GCode are causing the bed to stop working. I’ll have to look them up to remind myself what each of them are there as it’s been a while. Perhaps you could also check?

          1. I did a little bit of digging and all of the gcode commands that have something to do with the heated bed and it’s temperature are as fallows – M140: Set Bed Temperature, M144: Bed Standby, M190: Wait for bed temperature to reach target temp. Your starting gcode doesn’t have any of these perimeters so I’m not sure if that’s the problem. It could however be that some of these parameters must be included for the bed to work so leaving them blank may make Cura set them off by default. I’ll do some testing later to see if maybe I can come up with a solution.

          2. Ah that all sounds familiar now.

            I just remembered – there is a setting in Cura itself for a heated bed with some parameters – have you checked your printer profiles to make sure that this is enabled? I wonder if Cura is doing as it’s told and X3GWriter is also following this – so once enabled it will pass through the correct GCode to enable the bed to stay heated?

  12. I’ve checked through all of Cura’s settings and made sure that those related to the heated bed were turned on. By default they were and I haven’t really found any other settings in Cura that might help. I did find this GitHub page- https://github.com/rpavlik/cura-rep2x , where someone got the rep2x to work although I think he was using octoprint. I’ll look into his config files to see if I can dig something up.

    1. In the past when I was getting started with the X3GWriter plugin, I contacted the author through their Github, it might be worth asking them directly about this problem even when using the r2x profile – perhaps they might have insight as to why, or fix a fault if there is one.

      Keep me posted so I can update this blog to help others (I don’t have an R2X to test with here)

  13. Alright great news, I finally got it working. By modifying the starting gcode, I can tell the bed to heat to it’s selected temperature and stay there using this addition to the gcode-

    G130 X20 Y20 A20 B20 ;(Lower stepper Vrefs while heating)
    M109 S{material_bed_temperature} T0 ;(Set build platform temperature in degrees Celsuis)
    M134 T0 ;(Wait for platform to heat up)
    M135 T0 ;(Set the extruder as the current Extruder)
    M104 S{material_print_temperature} T0 ;(Set extruder temperature in degrees Celsius)
    M133 T0 ;(Wait for extruder to heat up)
    G130 X127 Y127 A127 B127 ;(Set Stepper motor Vref to defaults)

    I added this before the homing sequence so before the line that says (**** begin homing ****)
    I also added a purge line to the end of the gcode to clear out the filament before stating the print-

    G1 Z0.5 F900 ; Bring the printbed up before purge line
    G92 A0 ;zero the extruded length
    G1 Y30.0 E10 F500;extrude 20 mm of feed stock
    G1 Y30 F3300.0 ; Tear off purge line
    G92 A0 ;zero the extruded length again

    The entire starting gcode looks like this-

    ; — start of START GCODE โ€“
    M73 P0 (enable build progress)
    ;M103 (disable RPM)
    ;G21 (set units to mm)
    M92 X88.8 Y88.8 Z400 E101 ; sets steps per mm for replicator
    G90 (set positioning to absolute)
    G130 X20 Y20 A20 B20 ;(Lower stepper Vrefs while heating)
    M109 S{material_bed_temperature} T0 ;(Set build platform temperature in degrees Celsuis)
    M134 T0 ;(Wait for platform to heat up)
    M135 T0 ;(Set the extruder as the current Extruder)
    M104 S{material_print_temperature} T0 ;(Set extruder temperature in degrees Celsius)
    M133 T0 ;(Wait for extruder to heat up)
    G130 X127 Y127 A127 B127 ;(Set Stepper motor Vref to defaults)
    (**** begin homing ****)
    G162 X Y F4000 (home XY axes maximum)
    G161 Z F3500 (home Z axis minimum)
    G92 Z-5 (set Z to -5)
    G1 Z0.0 (move Z to “0”)
    G161 Z F100 (home Z axis minimum)
    M132 X Y Z A B (Recall stored home offsets for XYZAB axis)
    ;(**** end homing ****)
    G92 X147 Y66 Z5
    G1 X105 Y-60 Z10 F4000.0 (move to waiting position)
    G0 X105 Y-60 (Position Nozzle)
    G0 Z0.6 (Position Height)
    G1 Z0.5 F900 ; Bring the printbed up before purge line
    G92 A0 ;zero the extruded length
    G1 Y30.0 E10 F500;extrude 20 mm of feed stock
    G1 Y30 F3300.0 ; Tear off purge line
    G92 A0 ;zero the extruded length again
    ; — end of START GCODE โ€“

    Fixed the issue with the heated bed and now prints perfectly with the Rep2x.
    Hope this helps anyone who had the same problem.

    1. In the “MakerbotReplicator2.global.cfg” under metadata what are you placing for the heated build plate?

      machine_x3g_variant = r2


      machine_x3g_variant = r2x

      Just wanted to make sure I am following the instructions correctly. Sorry I have a modded Replicator 2 with HBP. So I have to mix and match.

      1. Hmmm I’m not sure sorry for the heated build plate, but please do share how you did it (I’d love my 3 to be able to not fail that first layer so much). I’d say try the r2x, as long as the firmware thinks that it’s a 2x I guess? I think that the regular Rep2 will complain if you try and send it build plate temperature commands…

Leave a Reply

Your email address will not be published. Required fields are marked *