Inspiring
April 22, 2024
Answered
• Select a text by its name and change its size (in points) — Scripting
- April 22, 2024
- 2 replies
- 666 views
Hello -
I try to make a small script to
Select a item by its name and after that
to change its size to a specific size (in points).
the name odf the items is "WeightSansProNormal" (as you can see in the attached screenshot)
But can't make it work 😞
Any help would be appreciate.
Thank you, enjoy your day.
#target illustrator
app.activeDocument.selection = null; // Ensure there is nothing in the document selected already. This way you only get the selection you want.
var thisDoc = app.activeDocument;
var myText = thisDoc.pageItems.getByName('WeightSansProNormal');
myText.textRange.characterAttributes.size = 16.6;
- Dimitri
