0 Replies Latest reply on Mar 10, 2008 5:03 AM by (Alexandre_OUDIN)

    [CS3 - JAVA] Problem embedding a linked file

      Hello everyone,
      I want to change the link of a Graphic object (in Java / Corba).
      The following snippet doesn't work. The file is not embeded into the document (but the image is more or less placed and rendered). If I want to update more than one time the same Graphic object, it fails.

      Here's what I do (assuming oGraphic is a Graphic object) :

      try
      {

      //get the link
      oLink = oGraphic.getItemLink();

      //Should I unembed first the previous link (if it is embeded) ?

      //change the linked file
      oLink.relink("[path_of_the_file_to_link]");

      //update the zone link (not necessary ?)
      oLink.update();

      //embed the linked file into the Ids document
      oLink.unlink();

      //save the document
      ...
      }
      catch (...)
      {
      ...
      }

      What's the correct solution to change the linked file of a link of a Graphic object ?