Skip navigation
Currently Being Moderated

Extendscript - Book component type - ES bug or doc error?

Jan 20, 2014 2:31 PM

Hi,

 

(FM 11, Win XP)

 

When you query ComponentType for an FM document book component, you get hexadecimal 0x200 which happens to equal Constants.FV_BK_FILE. However, the documentation says that this property should return one of:

 

• Constants.FV_BK_FOLDER (0x02) - Folder

• Constants.FV_BK_GROUP (0x40) - Group

• Constants.FV_BK_FM (0x8) - FrameMaker document

• Constants.FV_BK_MIF (0x10) - MIF document

• Constants.FV_BK_XML (0x20) - XML document

 

 

Given the supposed MIF and XML options, I'm not sure if there is a bug in ES or if the documentation is just wrong. An XML component also returns 0x200. Any thoughts?

 

Thanks,

Russ

 
Replies
  • Currently Being Moderated
    Jan 25, 2014 10:17 PM   in reply to Russ Ward

    Hi Russ,

     

    same issue here (FM 11, Win7). I'm not sure, but in my opinion it's an error in the documentation. The values for ComponentType should be:

     

    • Constants.FV_BK_FOLDER (0x2): Folder
    • Constants.FV_BK_GROUP (0x40): Group
    • Constants.FV_BK_FILE (0x200): File

     

    Additionally you could check the sort of file type via BookComponentFileType (FM, MIF, XML, Ditamap).

     

    In a short test script for traversing a hierarchical book the BookComponentFileType has some more values:

     

    • Constants.FV_BK_FOLDER (0x2): Folder
    • Constants.FV_BK_BOOK (0x4): Book (inside another book)
    • Constants.FV_BK_FM (0x8): FrameMaker document
    • Constants.FV_BK_MIF (0x10): MIF document
    • Constants.FV_BK_XML (0x20): XML document (also Ditamap and Bookmap)
    • Constants.FV_BK_GROUP (0x40): Group

     

    The main difference between ComponentType and BookComponentFileType seems to be the more detailed information about the file type.

     

    Best Regards, Andreas

     

    Message was edited by: justBE

     
    |
    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