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

Tagging text ranges

Engaged ,
Nov 28, 2018 Nov 28, 2018

Copy link to clipboard

Copied

Is it possible to tag text ranges to save a reference to them? I suspect not, but figure it’s worth asking. I have a plugin that correlates key and value pairs as text objects in a technical spec sheet. It keeps track by storing the key and value along with the UID of the corresponding text objects where they appear.

Could multiple keys and values be defined within the same story or the same paragraph, perhaps like a custom text range? Is that even possible? If so, would it practical to implement?

Any suggestions would be much appreciated.

TOPICS
SDK

Views

503

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 06, 2018 Dec 06, 2018

Copy link to clipboard

Copied

Text is a confusing subject so I'm not 100% clear on what you're asking. You can get the ATE:TextRangeRef for a specified handle, but I believe you can have multiple text ranges in a single piece of text. Is there a 1:1 correlation between AIArtHandles & ATE::TextRangeRefs? If so, you can just tag the art.

Failing that, no, I don't believe there is a way to do anything to tag anything below the AIArtHandle level (unless other AIArtHandles are contained therein).


It sounds like you're already using the AIUUID to track art handles. That's all there is I think.

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
Engaged ,
Dec 06, 2018 Dec 06, 2018

Copy link to clipboard

Copied

Thanks for the response, Andrew. My goal is to achieve something like conditional text, e.g., a product model number or specification. Even if there's no AIArtHandle or UID to that range, it would be nice to have some sort of marker to tag the beginning and end of the range. That way, the user could make minor edits to the text itself, and even if the text reflows to a different frame, a UID could still lead to the story, then at worst case the plugin could iterate through the characters of the text until it finds the markers. I hesitate to use a custom non-printing character for fear that it can interfere with printing the document itself.

I suspect only Adobe could implement this, as they have with conditional text in InDesign and FrameMaker, but figured it was worth asking.

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
Guide ,
Dec 06, 2018 Dec 06, 2018

Copy link to clipboard

Copied

LATEST

I'd never heard of conditional text. I had to go watch a video on it.  Pretty neat, I can see why it'd be useful.

Kind of surprised there isn't something like this for Illustrator given the amount of packaging work its used for. I guess layers are the closest thing in AI? Kind of a brute force approach though.

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