Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Setting character attributes on a range of characters at once

$
0
0

Illustrator Version CS3-CC

Preferred scripting: Visual Basic (VBScript)

 

In the Adobe Illustrator CS5 Scripting Reference (VBScript), I see the following code for setting character attributes.

 

iCount = textRef.Characters.Count

i = 1

Dim charRef

Do While (i < (iCount + 1))

dSize = dSize * 1.1

textRef.TextRange.Characters(i).CharacterAttributes.HorizontalScale = dSize

textRef.TextRange.Characters(i).CharacterAttributes.VerticalScale = dSize

i = i + 1

Loop

 

Is there a way to set character attributes on a range of characters at once?

 

Iterating through the characters one by one is really slow, especially in higher versions of Illustrator (like CS6).

 

I want to be able to set character attributes, for example, from the third character to the sixth character of a paragraph textrange.

 

Basically, I want to do something like itembyrange in InDesign scripting.

 

Thank you.

Tak Osato


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>