Skip to main content
Inspiring
September 3, 2020
Answered

Customized list of paragraph styles

  • September 3, 2020
  • 5 replies
  • 2035 views

Hello fellows,

 

Is there a programmatic way to import the paragraph style catalog configuration set to Customized List to another FM file? Framemaker doesn't allow doing that via the UI.

 

Thanks!

This topic has been closed for replies.
Correct answer Klaus Göbel

The document property, that Rick mentioned is read-only.

I'm just about writing a script that handles customized lists of paragraphs.

 

The only way to do this is to save the document as mif then add this list(s) (customized table list, character format list) in mif and open it again as .fm

5 replies

K.Daube
Community Expert
Community Expert
November 30, 2020

There seems to be something wrong with this property:

 

#target framemaker
main ();

function main () {
Reference     https://community.adobe.com/t5/framemaker/customized-list-of-paragraph-styles/td-p/11408673
$.bp(true);
var oDoc = app.ActiveDoc;
$.writeln (oDoc.CustomCharFmtList); // empty, not OK
$.writeln (oDoc.CustomElementList); // empty, OK
$.writeln (oDoc.CustomPgfFmtList);  // empty, not OK
$.writeln (oDoc.CustomTblFmtList);  // fig-nolegend,fig-with-legend,Normal-h-rules,Normal-hv-rules,Wide-h-rules,Wide-hv-rules - not OK
}

 

  • Documentation (FrameMaker Scripting Guide FM-16, Adobe FrameMaker
    FDK Programmer’s Reference FM-16) does not know anything about these properties.
  • In the script only CustomTblFmtList provides any results and even these are wrong - at least if we expect a list of the used formtat. The expected lists for the given document are:
    • CustomCharFmtList: 1-highlight, 2-highlight, 3-highlight, computer, ddd_symbols etc.
    • CustomElementList: 0chapter-title,1heading, 2heading and many more
    • CustomPgfFmtList: This is the only list with correct result - in unstructured mode there are no elements...
    • CustomTblFmtList: Normal-hv-rules, UnstructMasterPagemaps are the only tables formats used in this document.
  • The result of the script corresponds to the contents of the MIF file! DCustomTblList lists the same names as CustomTblFmtList does. The other DCustom... doe not exist in the MIF file.

So the list of the used formats (those with check mark in t he catalogue lists) can not be found this way...

Edit - great confusion here on my side

The CustomXxxFmtList is that one which is identical to what the dialogue of a catalogue presents:

And this is correct for the tables both by the script and in the MIF

The other lists are emty, becoase in Set Available Formats the last option (Customised List) is NOT set (¶, f catalogues).

So it is obvious that I can not get a list of the used formats ...

frameexpert
Community Expert
Community Expert
September 10, 2020

Thank you Klaus. That is good to know before I started trying some things.

Roman, here is how I write an alphabetical list of properties to the JavaScript Console for a given object:

 

#target framemaker
var doc = app.ActiveDoc;
$.writeln (doc.reflect.properties.sort ().join ("\r"));

 

Rom_BaAuthor
Inspiring
September 10, 2020

Rick, Klaus, Matt,

Thank you for your input!

I've manually copied the flag and the list from one MIF to another and it worked. 

Of course, this is a really awkward method and a script can make this operation more user-friendly. But ultimately, this option should be available in the Import Formats dialog box. I'll point this out to Adobe.

 

Thanks again and take care!

Best Regards,

Roman

 

Klaus Göbel
Klaus GöbelCorrect answer
Legend
September 10, 2020

The document property, that Rick mentioned is read-only.

I'm just about writing a script that handles customized lists of paragraphs.

 

The only way to do this is to save the document as mif then add this list(s) (customized table list, character format list) in mif and open it again as .fm

Matt-Tech Comm Tools
Community Expert
Community Expert
September 10, 2020

Hi Klaus, thanks for looking into it!

I was noodling around before seeing your response, and found the relevant portion of the MIF file. Here's a picture for anyone interested:

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
Matt-Tech Comm Tools
Community Expert
Community Expert
September 9, 2020

If the File>Import>Formats doesn't already bring this in, I would imagine a quick tweak by Rick Quatro to his ImportFormatsSpecial plugin would be able to address this (If indeed, it can actually be done...)

 

I'll reach out to Rick to ask him to weigh in.

 

-Matt

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
frameexpert
Community Expert
Community Expert
September 10, 2020

Thank you for the mention, Matt. I poked around and can't figure out where this information might be stored internally and exposed to scripting or the FDK. My thought is that it could be a property of each paragraph format (ShowInCatalog or something like that) but I couldn't find it. If one of the Adobe engineers is monitoring the forum, perhaps they can tell us. There are a few things in FrameMaker that are not exposed to scripting or the FDK and this may be one of them.

frameexpert
Community Expert
Community Expert
September 10, 2020

Actually, I just found it; it is a document property called CustomPgfFmtList and it is a list of paragraph format names that matches what is set in the Show window of the Customized List. If I get some time, I will play with it and see if I can come up with some useful code to transfer it from one document to another.

Jeff_Coatsworth
Community Expert
Community Expert
September 3, 2020

You mean take your list of Paragraph tags from one FM to another? Isn't that what the File > Import > Formats does?

LinSims
Community Expert
Community Expert
September 3, 2020

I think he's talking about the option to see/hide paragraph tags that you get to by clicking the gear at the top of the paragraph catalog. He wants the custom view to be copied, too.

Rom_BaAuthor
Inspiring
September 4, 2020

Hi Lin,

 

You are absolutely right. 🙂

I mean the Customized List setting under the Paragraph Catalog ==> Options.

I've looked over the FDK documentation and I don't see a way to copy/import the custom paragraph tags view into another FM document.

Cheers,

Roman