Jump to content

Makerbot Replicator 2 and X3GWriter plugin howto

Recommended Posts

Posted · Makerbot Replicator 2 and X3GWriter plugin howto

Hi folks,


I'm new to Cura, but after finally upgrading my OS (I use Ubuntu Linux) I found that Makerware is no longer offered for Linux, which means suddenly I couldn't drive the 3 Replicator 2's that I have. This gave me the push I needed to get into Cura as I'd heard such great things about it.


The only problem is, is that it seems not many who use Cura have Replicator 2's, and the built in profile is for a Replicator 1 and needs some tweaking. Furthermore, the X3GWriter seems to want to detect it only as a Replicator 1, which has different numbers of steps per mm so all printed items were turning out a little bigger than they should have been.


I've written a blog about it step by step for those in the same boat as me here:


But to also make sure in case my blog disappears etc to help others I'll put the steps here:


First up, I’m using it in Ubuntu Linux (18.04) so locations of files might need to be changed for your config files as needed. This is for Cura v4.3.


Step 1: Set up your printer

I chose Makerbot Replicator from the printers page, and made a couple of changes to the settings:


xwidth: 225mm

ydepth: 145mm

xheight: 150mm

build plate shape: rectangular

origin at centre: yes

heated bed: no

heated build volume: no

gcode flavour: makerbot


I also renamed the machine name to “Replicator 2” just so I would remember.


Step 2: Start and end GCode

You’ll need some custom Gcode so here it is (picked from various places and organised after some testing).

Start Gcode:


; — start of START GCODE –
M73 P0 (enable build progress)
;this next line won’t work, but has the steps command
M92 X88.8 Y88.8 Z400 E101 ; sets steps per mm for Rep2
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 –


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 –


This of course all assumes you don’t have a heated bed (also makes sure it doesn’t send heated bed commands which make the machine complain).


Step 3: Install X3G file converter

Go to the “Marketplace” button at the top right of your Cura window and in the marketplace search for “X3GWriter” and install it. Restart Cura so that it comes live.


Step 4: Modify X3GWriter so that it always detects “Replicator 2”

There seems to be a problem with X3GWriter in that with the above setup it always detects the machine to be a replicator 1, which is a problem as they have different amounts of steps per mm. You’ll know this because if you have a Replicator 2 and you try to print an object, it’ll keep printing larger than it should be. I’m sure there’s another way to make it detect “Replicator 2” but in the mean time I just changed it to always be Replicator 2 as that is all I have.

Locate your plugins folder – for me it’s in /home/username/.local/share/cura/4.3/plugins (where username is your username).

Go into the X3GWriter folder (and again into it, it’s nested twice – the path for me is: /home/username/.local/share/cura/4.3/plugins/X3GWriter/X3GWriter/)

Open “X3GWriter.py” with your favourite text editor. Be careful in here, it’s a python script so you want to use spaces, not tabs to indent, and indents matter. If you destroy it you may have to just remove the plugin and install it again.

We’re looking for the line like this:
return machine if machine in X3GWriter.known_machines else None

Note again that it’s indented with spaces in front. Put a # in front of this line to comment it out so it doesn’t get read like this:
#return machine if machine in X3GWriter.known_machines else None

Now go to the next line, press space until you’re lined up with the line above and put in:
return “r2”

Save the file and close Cura, then restart it. If all is well, you’ll find you can now export files that will print properly and be read by your Replicator 2.

If you find the X3G file option has disappeared from your list, then the plugin is broken. Check your syntax in the plugin file and try again.


Is this a little hacky? Yes, and I realise it may not be for everyone, especially if you're working with multiple printers, but until I can find a way to pass along to X3GWriter to filter the output through a Replicator 2 profile, this has been the only way I've been able to make it all work.


Funnily, using Cura has massively improved the reliability and quality of the printers and improved my faith in them again. It seems Makerware wasn't doing as good a job as I thought it was, and was leaving these older Gen4 printers behind a little with their slicing algorithms.


I hope this has been useful for people like me that were pulling their hair out trying to make it happen - don't throw that printer away!



  • Like 3
  • Thanks 1

Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

you say to go thru the marketplace button in Cura and search in the marketplace, but I don't see an option to search for anything.  Did something change?


Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

Thanks to your write up, I was able to get x3g files written!   I'm on Windows 10 and used Notepad to edit the py file.  Note, I had to make sure that when I commented out the "return machine if machine..." line the '#' symbol was lined up with other lines that were being commented out, and got the text of the line lined up with other such lines.


You helped a ton, kind human.



Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

Sorry DarthJenius, I should have said look for the plugin because yes it appears there's no search function in there. No problem - I like to help where I can. Especially when it comes to being able to use equipment that has been orphaned by the company that made it.


I've gotten a response from the developer of the plugin with some further info on how to force the plugin to use the Replicator 2 profile so will write another post when I've got a chance to do that so that people don't have to hack up the plugin to make it work.


In the mean time I'm happy to have been able to help


Happy printing!


Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

Can't seem to find the x3g plugin within my plugins folder im checking under program files/Ultimaker Cura 4.3/Plugins.

Share this post

Link to post
Share on other sites
Posted (edited) · Makerbot Replicator 2 and X3GWriter plugin howto

oh man, if i would have had this months ago it would have saved me a lot of time. anyway, i am using similar settings and got Cura to work and love it other than the larger than actual print size. used your fix and now my prints are the exact size they should be which i have been trying to fix for months, thanks for sharing!


took some searching but the X3gwriter.py file is located at:


C:\Users\user name\AppData\Roaming\cura\4.4\plugins\X3GWriter\X3GWriter


for me on windows 10. ended up having to search through the whole comp to find it. hope this helps someone else save some time.



Edited by pmullins

Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

Hi Jessecake,


Thanks for the detailed writeup.

I'm reviving an 'old' replicator2.

The files that were on the SD-card still print nice enough, but I can't seem to find a method to make it print new files...


I love cura, and I found the plugin. I tried uploading with and without adaptations on gcode(begin, end) and the ones in the .py file.


The replicator recognizes the x3g-file, but when I try to pint the file, it just ignores it.

Anyone any ideas?



Share this post

Link to post
Share on other sites
Posted · Makerbot Replicator 2 and X3GWriter plugin howto

hey iv'e been wrestling with this printer for about a year now and you just solved all my problems, thank you very much🙏

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!