Copy link to clipboard
Copied
I work with the script and it works very well. But I can only use one Active Artboard at a time. Can someone help me so that all artboard names are automatically written into the content
1000 Thanks
#target illustrator function test(){ if (app.documents.length == 0) { return; } var doc = app.activeDocument; var newText = doc.activeLayer.textFrames.add(); var idx = doc.artboards.getActiveArtboardIndex(); var currentArtboard = doc.artboards[idx]; newText.contents = currentArtboard.name; newText.top = currentArtboard.artboardRect[1] + 10; newText.left = currentArtboard.artboardRect[0] + 10; newText.textRange.characterAttributes.size = 20; }; test();
Hi,
Try following version
#target illustrator
function test() {
if (app.documents.length == 0) {
return;
}
var doc = app.activeDocument;
for (var a = 0; a < doc.artboards.length; a++) {
var newText = doc.activeLayer.textFrames.add();
var currentArtboard = doc.artboards[a];
newText.contents = currentArtboard.name;
newText.top = currentArtboard.artboardRect[1] + 10;
newText.left = currentArtboard.artboardRect[0] + 10;
newText.
...
Copy link to clipboard
Copied
Hi,
Try following version
#target illustrator
function test() {
if (app.documents.length == 0) {
return;
}
var doc = app.activeDocument;
for (var a = 0; a < doc.artboards.length; a++) {
var newText = doc.activeLayer.textFrames.add();
var currentArtboard = doc.artboards[a];
newText.contents = currentArtboard.name;
newText.top = currentArtboard.artboardRect[1] + 10;
newText.left = currentArtboard.artboardRect[0] + 10;
newText.textRange.characterAttributes.size = 20;
}
};
test();
Copy link to clipboard
Copied
Wow, it works really really good Thank you. Happy Happy day