The area selected in the illustrator script does not have a bottom center line. What could be the problem.
var aDoc = app.activeDocument;
var aSel = aDoc.selection;
var len = 10;
var line = null;
for (i=0; i<=aSel.length-1; i++)
{
var pI = new Array (2);
pI[0] = aSel[i].left + aSel[i].width/2,0;
pI[1] = aSel[i].top - aSel[i].height/2,0;
line = aDoc.pathItems.add();
line.setEntirePath ( new Array( new Array ( pI[0], pI[1] ), new Array( pI[0]+len, pI[1]+len )));
line.pathPoints[1].rightDirection = new Array( pI[0]+len, pI[1]+len);
//line.pathPoints[1].anchor = new Array( pI[0]+len*1.2, pI[1]+len*0.8);
line.rotate(45-i, true, true, true, true, Transformation.BOTTOMLEFT);
line.filled = false;
line.stroked = true;
line.strokeWidth = 1;
line.strokeColor = aDoc.swatches[1].color;
}
line.setEntirePath ( [[ pI[0], pI[1] ], [ pI[0]+len, pI[1]+len ]]);
is slightly more readable because it fits in smaller area.