Skip navigation
Currently Being Moderated

get the type of a Page Item

Aug 21, 2013 5:48 AM

Tags: #extension_builder_2.1

Hey guys,


i am working on an inDesign extension. i have a requirement to go through the document elements. i was able to get all pageItem objects on a doc page.

i am now trying to figure out what is the type of each pageItem so i am using the following code that i found in here: ge_items.htm


//Given a page item "myPageItem" of unknown type:

var myPageItemType:String = flash.utils.getQualifiedClassName(myPageItem);


this is supposed to give me for example: com.adobe.indesign::Rectangle

instead all items are returning: com.adobe.indesign::PageItem


any idea what i am doing wrong here?


Thank for the your help.

  • Currently Being Moderated
    Sep 10, 2013 5:04 AM   in reply to tonyrizk81

    Try getElements().

    Mark as:
  • Currently Being Moderated
    Sep 10, 2013 5:07 AM   in reply to Harbs.

    Just to further clarify:

    getElements() converts a collection to an array of fully qualified objects. Before calling getElements() the PageItem is not necessarily qualified as its subtype.

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points