-
1. Re: Lorem text insertion
Muppet Mark-QAl63s Sep 20, 2010 1:52 AM (in response to Kristtee)The method textFrames.add(); by default create point text. If you want to create area text you need to create a rectangle an pass this to area text. The guide contains samples of all these…
-
2. Re: Lorem text insertion
CarlosCanto Sep 22, 2010 2:33 PM (in response to Kristtee)enclose each line in quotations and add a carriage ruturn code at the end
not familiar with JS (I think the code is "\n"), in VB it is Char(13), it would be like this
myTextFrame.contents = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam est neque, vulputate sed consectetur eget," & Char(13) &_
"laoreet sed ipsum. Sed egestas elit tellus. Vestibulum sagittis iaculis ante, vel viverra nibh accumsan a. In a felis ut enim facilisis facilisis." & Char(13)_
sample:
Illustrator.ActiveDocument.TextFrames(1).Contents = "123" & vba.Chr(13) & "456"
result:
-
3. Re: Lorem text insertion
Muppet Mark-QAl63s Sep 23, 2010 6:27 AM (in response to CarlosCanto)I was thinking more like…
#target illustrator if (app.documents.length > 0) { var w = app.activeDocument.width; var h = app.activeDocument.height; var myTextRect = app.activeDocument.pathItems.rectangle(h, 0, w, h); var myTextFrame = app.activeDocument.textFrames.areaText(myTextRect); myTextFrame.contents = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam est neque, vulputate sed consectetur eget, laoreet sed ipsum. Sed egestas elit tellus. Vestibulum sagittis iaculis ante, vel viverra nibh accumsan a. In a felis ut enim facilisis facilisis. Sed a velit et urna sodales hendrerit eu sed metus. Morbi sed nunc urna. Nulla euismod est et tortor varius mattis. Donec vel lorem vel eros mollis placerat ut eget augue. Donec nisi dui, placerat et iaculis vel, fermentum nec ligula. Nullam vehicula aliquam mauris, eu viverra odio consectetur sed."; myTextFrame.wrapped = true }resulting in… Area text frame that the contents flow inside…
-
4. Re: Lorem text insertion
CarlosCanto Sep 23, 2010 9:15 AM (in response to Muppet Mark-QAl63s)that works too, now there's point text and area text samples to chose from.
-
5. Re: Lorem text insertion
qdesign8 Oct 1, 2010 4:22 AM (in response to Kristtee)In applescript this could work:
tell application "Adobe Illustrator"
activate
make new document
make new rectangle in document 1 with properties {position:{100, 400}, width:400, height:200}
set areaText to make new text frame in document 1 with properties {kind:area text, text path:the result, contents:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam est neque, vulputate sed consectetur eget, laoreet sed ipsum. Sed egestas elit tellus. Vestibulum sagittis iaculis ante, vel viverra nibh accumsan a. In a felis ut enim facilisis facilisis. Sed a velit et urna sodales hendrerit eu sed metus. Morbi sed nunc urna. Nulla euismod est et tortor varius mattis. Donec vel lorem vel eros mollis placerat ut eget augue. Donec nisi dui, placerat et iaculis vel, fermentum nec ligula. Nullam vehicula aliquam mauris, eu viverra odio consectetur sed."}
end tell


