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

Embedding linked graphics

Explorer ,
Feb 16, 2016 Feb 16, 2016

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.

Views

712

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 1 Correct answer

Mentor , Feb 17, 2016 Feb 17, 2016

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

...

Votes

Translate

Translate
Mentor ,
Feb 17, 2016 Feb 17, 2016

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

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 ,
Feb 17, 2016 Feb 17, 2016

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.

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
Mentor ,
Feb 17, 2016 Feb 17, 2016

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

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
Mentor ,
Feb 17, 2016 Feb 17, 2016

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

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
LEGEND ,
Feb 17, 2016 Feb 17, 2016

Copy link to clipboard

Copied

LATEST

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

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 ,
Feb 17, 2016 Feb 17, 2016

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.

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