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

Change text frame inside of pageItems in illustrator

Contributor ,
Mar 18, 2020 Mar 18, 2020

Copy link to clipboard

Copied

I currently have a group.  In this group I have a pageItem with the name Order.

I can access this with the following:

  var orderItem = plateGroup.pageItems.getByName('Order');

This pageItem in illustraor has a text field.  How can I change the contens of this?

I thought something like this orderItem.textFrames.contents = 'hello'

But that does not work.  Any ideas on how I can achieve this? 

TOPICS
Scripting

Views

703

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

correct answers 1 Correct answer

Contributor , Mar 19, 2020 Mar 19, 2020

I figured it out:

  orderItem.textRange.contents = 'hi here';

Votes

Translate

Translate
Adobe
Contributor ,
Mar 19, 2020 Mar 19, 2020

Copy link to clipboard

Copied

I figured it out:

  orderItem.textRange.contents = 'hi here';

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
Community Expert ,
Mar 19, 2020 Mar 19, 2020

Copy link to clipboard

Copied

LATEST

Hi,

why not simple

var orderItem = app.activeDocument.textFrames.getByName('Order');
// or
// var orderItem = plateGroup.textFrames.getByName('Order');
orderItem.contents = "my new contents";

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