• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Text problem

New Here ,
Dec 09, 2008 Dec 09, 2008

Copy link to clipboard

Copied

ASErr result = kNoErr;

AIArtSuite *aiArt;
sBasic->AcquireSuite( kAIArtSuite, kAIArtSuiteVersion13, (const void**)&aiArt );

AITextFrameSuite *aitext = NULL;
sBasic->AcquireSuite( kAITextFrameSuite, kAITextFrameSuiteVersion, (const void**)&aitext );

// Get the group art that contains all the art in the current layer.
AIArtHandle artGroup = NULL;
sAIArt->GetFirstArtOfLayer(NULL, &artGroup);
// Add the new point text item to the layer.
AITextOrientation orient = kHorizontalTextOrientation;
AIRealPoint anchor = {10,10};
AIArtHandle textFrame = NULL;
result = aitext->NewPointText(kPlaceAboveAll, artGroup, orient, anchor, &textFrame);

// Set the contents of the text range.
TextRangeRef range1 = NULL;
result = aitext->GetATETextRange(textFrame, &range1);

ATE::ITextRange needtoBe(range1);
---------------->>>>>> Seem to stuck here <<<<<<-----------------------

needtoBe.InsertAfter("EWEWEW");

Anyone could help me see what is wrong with my coding??? I am able to create the textFrame but could not able to write the text inside...
TOPICS
SDK

Views

663

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Guide ,
Dec 11, 2008 Dec 11, 2008

Copy link to clipboard

Copied

LATEST
I just checked what I do and I'm doing pretty much the same thing. The only things I seem to do differently are these:

1) I clear the text range first with 'needtoBe.Remove()'

2) I assign the text using ASUnicode* not char*. You could try creating an ai::UnicodeString and using that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines