Skip to main content
Known Participant
Jun 10, 2019 6:26 PM UTC
Question

Getting object style list from Object Style Catalog

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!

This topic is closed to new replies. Start a new post to keep the conversation going.

4 replies

Klaus Göbel
Legend
Jun 10, 2019 6:36 PM UTC

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

Translate
fonrigAuthor
Known Participant
Jun 10, 2019 7:12 PM UTC

Thanks @KlausGobel,

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

Translate
Klaus Göbel
Legend
Jun 10, 2019 7:22 PM UTC

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

Translate