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

Getting object style list from Object Style Catalog

Community Beginner ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

Is the Object Style Catalog accessible via the Extendscript API?

Need to get the list available styles and apply some to certain objects within the document based on user's selections.

Thanks in advance!

TOPICS
Scripting

Views

838

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
Enthusiast ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

Hi fonrig,

you have to look for "GraphicsFmt"

var oDoc =  app.ActiveDoc;

var oFormat = oDoc.FirstGraphicsFmtInDoc;    

while (oFormat.ObjectValid())

        {

        $.writeln(oFormat.StyleTag;)     //StyleTag BUT NOT "NAME"

        

       

        oFormat = oFormat.NextGraphicsFmtInDoc;

        }

You can find all properties in 2019 FrameMaker Scripting guide on page 516

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 Beginner ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

Thanks @KlausGobel,

I'm getting the oFormat object as undefined​, have any idea why?

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
Enthusiast ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

Of course you need an open/active document that contains object styles

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 Beginner ,
Jun 10, 2019 Jun 10, 2019

Copy link to clipboard

Copied

LATEST

Thanks @klaus, I think the issue is that I'm using FM11... See this link:

Feature enhancements and bug fixes in FrameMaker update 12.0.2

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