Code: Select all
var op = new RModifyObjectsOperation(false);
var itm = doc.queryEntity(12),
sh = itm.castToShape();
if (isPolylineShape(sh)
&& !sh.isGeometricallyClosed()) {
var _sh = sh.getFirstSegment();
if (isLineShape(_sh)) {
_sh.setStartPoint(new RVector(1, 2));
op.addObject(itm, false);
}
}
di.applyOperation(op);