The only post talking about color definition in framemaker is this post :
so with this information i can list all the colors in a document and how to remove them from framemaker files.
So i need to clean some file but before removing color i would like to know if each color is used in document and then remove if not used
Have you got some code that do this check .
Thank you for your help
Best regard from France
Caveat: I am not a scripter. However, wouldn't it be easier to set up a MIF snippet with only the colour definitions you want and then run a script that deletes all the colour definitions and then imports the colour definitions from the snippet instead of checking to see if a color you don't want is in the file?
This is not trivial.
For each color format in the doc:
Thank you for your response but I'm working with more then 10 books which have each more the 200 files insides.
Some file have more then 150 color definitions.i have many graphics with elipse,polygone and more .
Not sure it is the best practice to use MIF files or to inspect each object.
There are several reasons. Many of our customers have legacy documents that contain colors with the same name, but these colors differ in properties.
Or the documents use colors with the same properties but different names.
And they have lost the overview due to the variety of colors.
For these customers we have developed some ExtendScripts that analyze the documents and the colors, delete colors and rename colors to clean up the documents.
It is very time-consuming to examine and compare all documents. You can't do that with a few lines of code.
Otherwise I would have shown you some hints and code snippets.
A word to explain my problem.
We have migrate our documentation from Fm13(2015) th FM14(2017).before with Fm13 we had a process call « postprocess » provide by the manufacturer of our documentation throught a pluggin in framemaker.
With FM13 this possprocess took 25 minutes now with FM14 for the same document it takes 12 hours.(one night)
When i make an updatebook i have got a book error log of 200 pages (two hundreds pages) of inconsistent error.
With the small code i found on the former extendscript subforum (see link in the first post), i could make a script that list each color of all files with CMYB values in an excel files.
This excel has mùore than 13000 lines.
After analysis i found a files with wrong value color comparing to other files.
I have deleted this color manualy plus other minor color defect and now i don’t have any more book error log when i perform an update book.
The post process that took 12 hours now last 13 minutes.So i think it is a good practice to clean the files.
Now i made the cleaning on test files on C/ directory i need to do it on production files.
When you manualy delete a color the message is different if the color is used or not. So i suppose the color have a property for that
So i need code to check if a color is used in some files.
Now you have migrate the extendscript subforum to here it seems that you have forgot to send the link to expert team that were online before.
i’m feeling to have posted my question to the wrong place compare to the former subforum.
Where are the extendscript experts i used to read for their good advice.
It seems that Adobe has lost extendscript experience with the deletion of the former Subforum
Sorry for my english error it is not my first language.
Best regards from France
there is definitely no property in the Color object that tells you whether the color is used or not.
As "ReedError" already wrote, you have to search all objects that have the property "color".
Furthermore, you have to distinguish the tint of colors.
I have been working with Extendscript for FrameMaker for 6 years, so some people consider me to be one of the experts. 😉
Greetings from your neighbour from Germany