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

Customized list of paragraph styles

Explorer ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

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!

TOPICS
Scripting

Views

542

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

correct answers 2 Correct answers

Community Expert , Sep 09, 2020 Sep 09, 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.

Votes

Translate

Translate
Enthusiast , Sep 10, 2020 Sep 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

Votes

Translate

Translate
Community Expert ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

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

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 Expert ,
Sep 03, 2020 Sep 03, 2020

Copy link to clipboard

Copied

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.

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
Explorer ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

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

 

 

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 Expert ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

You might want to ping Russ Ward or Rick Quatro or Bernard Aschwanden, all of them highly competent scripters/plugin creators. If they don't know, no one does.

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
Explorer ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

True. 🙂

I'll post this in the scripting forum.

 

Cheers,

Roman

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 Expert ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

I don't think there IS a scripting forum anymore in this new reorganization of the forums.

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 Expert ,
Sep 04, 2020 Sep 04, 2020

Copy link to clipboard

Copied

As Jeff says, there is no scripting forum. But I'll add the Scripting tag to your original post and with luck, one of them, or some other heavy duty scripter, will see it and respond.

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
Explorer ,
Sep 06, 2020 Sep 06, 2020

Copy link to clipboard

Copied

Thanks, Lin!

It's quite bad that there is no separate scripting forum. Not sure why it was removed.

 

Regards,

Roman

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 Expert ,
Sep 07, 2020 Sep 07, 2020

Copy link to clipboard

Copied

The new forum software doesn't support child forums, so we're stuck with tags. And there's a limit to the number of tags, too. If there weren't, they might have been able to add a language tag for each of the major languages.

 

Yes, I know. The new forum software lacks a lot of things we always thought were necessary. We're slowly establishing workarounds, but it is frequently annoying.

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 Expert ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

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

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 Expert ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

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.

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 Expert ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

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.

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
Explorer ,
Sep 09, 2020 Sep 09, 2020

Copy link to clipboard

Copied

Rick, Matt,

Hi!

Thank you for your valuable input!

Rick, where did you find this property? I've checked the FDK Reference Guide and the ES Scripting Guide and this property is not mentioned in these documents.

Could you please send me a pointer?

 

Thank you very much and take care!

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 ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

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

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 Expert ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

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:

Screen Shot 2020-09-10 at 9.22.55 AM.png

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 Expert ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

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"));

 

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
Explorer ,
Sep 10, 2020 Sep 10, 2020

Copy link to clipboard

Copied

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

 

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 Expert ,
Nov 30, 2020 Nov 30, 2020

Copy link to clipboard

Copied

LATEST

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:

CustomiseListOfAvailableFormats.png

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 ...

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