Hi!
You can do this quite easily with a script.
Run this script from a python tab in the Script Editor:
import maya.cmds as mc
def createJointChain(start = None, step = None, number = None, direction = None, prefix = None):
par = None
for i in range(0,number):
mc.select(cl = True)
jnt = mc.joint(n = "{0}_{1}_JNT".format(prefix, i))
if direction == "X":
mc.xform(jnt, t= (start, 0,0), ws = True)
elif direction == "Y":
mc.xform(jnt, t= (0, start,0), ws = True)
elif direction == "Z":
mc.xform(jnt, t= (0, 0,start), ws = True)
if par != None:
mc.parent(jnt, par)
par = jnt
start = start + step
createJointChain(start = 0, step = 2, number = 10, direction = "X", prefix = "Line")
You can change the prameters in the last line to your liking. "start" is the position of the first joint, "step" is the length of the joints, "number" is the number of joints, "direction" is the direction your chain builds in (takes values "X", "Y", "Z") and "prefix" is what the name of the joint should start with.
I hope it helps!