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

get parent-Page of placed rectangles

Explorer ,
Jan 05, 2020 Jan 05, 2020

Copy link to clipboard

Copied

How to get the parent page of place xml rectange objects.

 

myElement.insertionPoints[0].parentTextFrames[0].parentPage . its only wrok for textframes.

 

 

TOPICS
Scripting

Views

367

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

Advocate , Jan 05, 2020 Jan 05, 2020

Try this code:

 

if(myElement.insertionPoints[0].isValid == false){
    if(myElement.graphics.length == 1){
        if(myElement.graphics[0].parent.constructor.name == "Rectangle"){
            myElement.graphics[0].parent.parentPage;
            }
        }
    }

 

Best

Sunil

Votes

Translate

Translate
Advocate ,
Jan 05, 2020 Jan 05, 2020

Copy link to clipboard

Copied

LATEST

Try this code:

 

if(myElement.insertionPoints[0].isValid == false){
    if(myElement.graphics.length == 1){
        if(myElement.graphics[0].parent.constructor.name == "Rectangle"){
            myElement.graphics[0].parent.parentPage;
            }
        }
    }

 

Best

Sunil

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