Copy link to clipboard
Copied
Is there any quick way to change a linked graphic to an embedded graphic in FrameMaker? Currently using FrameMaker 10.
You could try the following script, which operates on the currently-active document. Before you do, please note the following:
- It is generally considered a regressive step to remove file system references from imported graphics. In other words, conventional wisdom would suggest that you are doing damage to your files. I'd recommend backups.
- I just slapped this script together using general scripting knowledge. I don't make a habit of breaking references. If this thing does something else unexp
...Copy link to clipboard
Copied
I'm not sure if there is a good way through the GUI. But it is very simple with a script. If you open the ExtendScript editor (File > Script > New Script), you could convert the currently-selected graphic by executing this single line:
app.ActiveDoc.FirstSelectedGraphicInDoc.InsetFile = "";
With a few more lines, the script could be enhanced to convert all graphics in the document.
Russ
Copy link to clipboard
Copied
Thank you Russ. It sounds promising. I have no experience with the script editor, so could you let me know where I could find information on what extra lines would be needed to convert all graphics in the document. There are over one hundred small images that I want to change from linked to embedded.
Copy link to clipboard
Copied
You could try the following script, which operates on the currently-active document. Before you do, please note the following:
- It is generally considered a regressive step to remove file system references from imported graphics. In other words, conventional wisdom would suggest that you are doing damage to your files. I'd recommend backups.
- I just slapped this script together using general scripting knowledge. I don't make a habit of breaking references. If this thing does something else unexpected, you are on your own.
Russ
var counter = 0; | |
var graphic = app.ActiveDoc.FirstGraphicInDoc; |
while(graphic.ObjectValid()) | ||
{ | ||
if(graphic.constructor.name == "Inset" && | ||
graphic.InsetFile != "") | ||
{ | ||
graphic.GraphicIsSelected = true; | ||
graphic.InsetFile = ""; | ||
graphic.GraphicIsSelected = false; | ||
counter++; | ||
} | ||
graphic = graphic.NextGraphicInDoc; | ||
} |
alert("Script complete. " + counter + " graphic(s) converted."); |
Copy link to clipboard
Copied
I really hate this forum interface. It does the dumbest stuff sometimes. I try to paste in ASCII text and get a table. Here is another try:
var counter = 0;
var graphic = app.ActiveDoc.FirstGraphicInDoc;
while(graphic.ObjectValid())
{
if(graphic.constructor.name == "Inset" &&
graphic.InsetFile != "")
{
graphic.GraphicIsSelected = true;
graphic.InsetFile = "";
graphic.GraphicIsSelected = false;
counter++;
}
graphic = graphic.NextGraphicInDoc;
}
alert("Script complete. " + counter + " graphic(s) converted.");
Copy link to clipboard
Copied
Russ,
The way to paste code using the Forum web interface is to first click on the HTML button of the editor bar, paste the code and then surround your code with <pre> </pre> tags. [Clumsy, but that's the way Jive's set this stuff up].
Copy link to clipboard
Copied
Thanks so much Russ. The script worked great. Some of the documents actually had over 1000 graphics, so it was a great timesaver.