Sg2.9
link path text
Recent RSS
link path text
From:  locke
Date:  13. January 2013, 12:37

hi,
i try to make a script which allows me first to draw multiple paths in the illustrator workspace an then, apply pathtext on these paths.
now, it works easily for one drawed path, but i wonder, if its possible to link multiple paths together, making the text swap to the next path if the end of the first is reached?
i read something with link(next), but i dont know how to apply it.
is it something like textItem.link(name); ?
but what to put in for name?
thanks for your help

Re: link path text
Date:  14. January 2013, 11:15

Sure it is, is this what you're after?
Just use this to link selected paths together as AreaText Objects.

var sel = document.getItems({type: Path, selected: true})
var currentTextItem = new AreaText(sel.pop())

while(sel.length){
	currentTextItem.link(new AreaText(sel.pop()))
}
Re: link path text
From:  pqbd
Date:  14. January 2013, 21:41

If you want to use PathText items instead of AreaTexts, you'll need to use the visibleRange property. Just add the entire text content to the first PathText item, then compare the visibleRange.length with respect to the range.length. If the range.length is longer, splice the excess text into the next pathText item and repeat.

Re: link path text
From:  locke
Date:  17. January 2013, 12:40

cool thank you! works great.
i try to do something like the text-pencil tool, but with pathtext. with text-pencil script, every letter is in its own textarea, which makes it hard to edit text, change spacing etc.
the only advance in the text pencil script is, that you see the text immediately and dont have to draw the line first and then apply the text.
is this also possible when i use path text? ( like drawing the path an the letters are applied to the path at the same time )
thanks!

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19
Script of the Moment
L-System 26.10.11