Resize Object with Variable Data
Hi there,
Is there any way to resize objects with variable data in Illustrator? I have a pdf file with rectangles. I want to change rectangle dimensions with variable data. Is this possible to do?
Thanks!
Hi there,
Is there any way to resize objects with variable data in Illustrator? I have a pdf file with rectangles. I want to change rectangle dimensions with variable data. Is this possible to do?
Thanks!
That would be great if you can help with select dialog. I'll be waiting, thank you very much again!
To get the csv file at runtime with a modal dialog, use this:
var csvFile = File.openDialog("Select CSV File");
To convert mm to points, use this:
function mmToPt(mm)
{
return mm * 2.834645669391;
}
var myObj = app.activeDocument.pageItems[0];
myObj.width = mmToPt(50); // set width to 50 mm
myObj.height = mmToPt(100); // set height to 100mm
updated code on github:
https://github.com/wdjsdev/public_illustrator_scripts/blob/master/resize_with_variable_data.js
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.