Answered
round number at x and y cordinate,
Dear all, please help me on this
Need Illustrator scipt to round number at x and y cordinate, so that I can export artboards with exact dimension

Dear all, please help me on this
Need Illustrator scipt to round number at x and y cordinate, so that I can export artboards with exact dimension

Thanks @Ton Frederiks. In which case, this should round the left and top positions of artboards.
var ABs = app.activeDocument.artboards;
for (var i = 0; i < ABs.length; i++) {
var ABR = ABs[i].artboardRect;
var dx = Math.round(ABR[0]) - ABR[0];
var dy = Math.round(ABR[1]) - ABR[1];
ABs[i].artboardRect = [
Math.round(ABR[0]), Math.round(ABR[1]),
ABR[2] + dx, ABR[3] + dy
];
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.