Skip navigation
natdeamer
Currently Being Moderated

Replacing Image in a Graphic Frame

Aug 10, 2012 7:53 AM

Hi,

 

I have a tagged graphic frame and am trying to replace the image without loosing the link to the tag.....


I have tried using the Hierachy to remove the image which works - But I loose the link to the tag:

 

InterfacePtr<IGraphicFrameData> graphicFrame(ref, UseDefaultIID());

InterfacePtr<IHierarchy> graphicFrameHierarchy(graphicFrame, UseDefaultIID());

InterfacePtr<IHierarchy> childHierarchy(graphicFrameHierarchy->QueryChild(0));

graphicFrameHierarchy->Remove(childHierarchy);

 

 

I have managed to do something in Extended Script which has worked using links.

 

var vLinks = myDoc.links;

var link = vLinks.itemByName("Hydrangeas.jpg");

link.relink(new File("C:/Users/Public/Pictures/Sample Pictures/Koala.jpg"));

 

Any Ideas?

 

Thanks


Nathan Deamer

 

 

*I have also tried retagging the image after deleting and replacing the graphic.  But due to how it is set up I can't tag the frame when it is in a group inside a text frame.....

 
Replies
  • Currently Being Moderated
    Aug 13, 2012 6:43 AM   in reply to natdeamer

    Look at  Utils<Facade::ILinkFacade>()->RelinkLink()

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points