Skip to main content
Known Participant
February 14, 2007
Question

How to relink the incopy files automatically?

  • February 14, 2007
  • 2 replies
  • 448 views
Hi All,<br /><br />I am creating Incopy files and then adding them to an assignment.<br />Then I am uploading all the files ( indd,incx and inca) to some location other than my system.<br />Then I am againg downloading this set in the same folder in which they were created.<br />Now while opening the indesign file I alwasy get the "This document contains links to missing or modified files" dialog box.<br />I tried to handle it programmatically and tried every solution available on the forum.But I am unable to get rid of the dialog.(i.e I am unable to relink the incopy files programatically.)<br /><br />I tried using<br />1)kRestoreLinkCmdBoss...(using the same solution available in one of the posts of the this forum)<br />2)Utils<IAssignmentUIUtils>()->UpdateAllAssignments(ac);<br />3)kRelinkAssignmentCmdBoss<br />4)IUpdateLink->DoUpdateLink<br /> and so on..But I am not able to relink the incopy files automatically..<br /><br />I am eagerly looking for some help in this regard..<br /><br />Thanks and Regards,<br />Yopangjo
This topic has been closed for replies.

2 replies

Inspiring
February 20, 2007
Hi,<br /><br />To suppress the link warnings you will need to implement a doc responder and process the links during the kDuringOpenDocSignalResponderService message.<br /><br />Then you can update the Assignments with the following lines.<br /><br /> InterfacePtr<const IInCopyBridgeCmdSuite> bridgeCmdSuite(::CreateObject2<const IInCopyBridgeCmdSuite>( kICBridgeBaseCmdBoss ) );<br /> if( bridgeCmdSuite == nil ) break;<br /><br /> bridgeCmdSuite->Relink( storyUpdateList, kSuppressUI, ICommand::kUndoNotRequired );<br /><br />where storyUpdateList is a UIDList containing the story refs of the text models that need updating.<br /><br />HTH <br />Mike.
Participating Frequently
February 19, 2007
Hi,

IUpdateLink seems correct - at least it does the job for me. I guess the problem is, that the Alert pops up, before you can update the link yourself - at least if you use a responder. Since I open the docs programmatically I can suppress the UI, I don't know if there's another way. Maybe you could just suppress all alerts (CAlert::SetShowAlert()) on BeforeOpenDoc and activate the alerts again (very important - otherwise a lot of dialogs won't show!) after importing the IC-files ...

Regards,

Bernt