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

textFrame duplicate name

Explorer ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

Hi,
one more simple question I can't find.
If I create a duplicate textFrame

textFrame3.duplicate();

is it possible to set the name of the duplicate, or how do I find the name of the duplicate text.Frame.

díky
Thank
Jirka

TOPICS
Scripting

Views

154

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

People's Champ , Oct 20, 2022 Oct 20, 2022

duplicate method will return a new instance that you can rename for sure.

var newTextFrame = textFrame3.duplicate();

newTextFrame.name = "whatever"

Votes

Translate

Translate
People's Champ ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

duplicate method will return a new instance that you can rename for sure.

var newTextFrame = textFrame3.duplicate();

newTextFrame.name = "whatever"

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
Explorer ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

Thanks a lot, somehow I can't seem to find these simple things.

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 ,
Oct 20, 2022 Oct 20, 2022

Copy link to clipboard

Copied

LATEST

Hi @jirik79416729,  in addition to @Loic.Aigon's answer, for the purposes of identifying particular objects, you can also get the "index" and the "label". The index is a number that is unique amongst all textFrames in document. The label is just for scripters to use—you can set it in ExtendScript (myTextFrame.label = 'targetMe') or in the Script Label panel in Indesign.

 

A small additional note is that the "name" of an object in Indesign is, by default, empty, but when it is empty the Layers panel will show that object as having a default name, eg. "<text frame>". Once you have set the name, the Layers panel will reflect this change.

 

Also, have a look at some documentation on TextFrame.

-Mark

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