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!
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.
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
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?
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.
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
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.
Copy link to clipboard
Copied
True. 🙂
I'll post this in the scripting forum.
Cheers,
Roman
Copy link to clipboard
Copied
I don't think there IS a scripting forum anymore in this new reorganization of the forums.
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.
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
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.
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
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.
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.
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!
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
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:
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"));
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
Copy link to clipboard
Copied
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
}
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 ...