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!

31 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?

  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?

Leave a Reply

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