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

get parent-Page of placed rectangles

Explorer ,
Jan 05, 2020 Jan 05, 2020

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

 

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

 

 

TOPICS
Scripting
478
Translate
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

Translate
Advocate ,
Jan 05, 2020 Jan 05, 2020
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

Translate
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