I'm new to illustrator, how to I put a text string on a document.
I did, and got it to work.....sort of
. My problem is, as I make changes to the "setup" on the panel, and I update the document, the text writes over top what is already there, so I see both (and all subsequent) updates, such that after 5 or 6, it's all a solid line. What I want to do is as I refresh parameters, the new text should "replace" what is already there.
Thanks
The snippet panel is kind of simplistic, and I suspect its dropping new version of text on top of one another so you're probably looking at a pile of text objects (you've probably figured that out though).
To change the text of existing text, you'll need to the handle of the text you want to change. I don't reccommend hanging on to these handles outside of a 'session' -- there are things that cause handles to change, and the object might be deleted after all. Still, assumg you've got the handle, maybe by pulling it from the set of selected art. Then you'd do something like this:
void SetText(AIArtHandle handle, const ASUnicode* text, int length)
{
TextRangeRef ref = 0;
sAITextFrame->GetATETextRange(handle, &ref);
ATE::ITextRange range(ref);
// clear it first
range.Remove();
// now set it
range.InsertAfter(text, length);
}
North America
Europe, Middle East and Africa
Asia Pacific