InDesign CS6 and relinking resources with ILinkFacade

I've been trying to relink InDesign document links but rather unsuccessfully. I did read that ILinkFacade should be the way to go but the documentation is somewhat poor. I did find some SDK examples but they didn't have too much code about ILinkFacade. I ended up reading comments from ILinkFacade source code.
I came up with the following piece of code that happens in Respond function inherited from CResponder:
Utils< Facade::ILinkFacade > LinkFacade;
InterfacePtr< IDocumentSignalData > DocumentSignalData( signalMgr, UseDefaultIID() );
IDatabase* pDocumentDatabase = GetDataBase( DocumentSignalData );
UIDList LinksUIDList( pDocumentDatabase ); // Does this actually get the links from a document?
UIDRef linkref = LinksUIDList.GetRef( 0 ); // If the above does get the list of links, does this get the UIDRef to the first link in the list?
URI ImageURI = "D:/test.jpg";
ErrorCode status = LinkFacade->RelinkResource( linkref, ImageURI, kSuppressUI );
Compiles nicely but every time I run it I just manage to crash InDesign.
Anyone have any good tips to this? I'm quite unsure especially about using the UIDList.

I made some minor modifications to my code and used QueryLinks to get all the links in a QueryResult.
// signalMgr is received in Respond(...) inherited from CResponder.
InterfacePtr< IDocumentSignalData > pDocumentSignalData( signalMgr, UseDefaultIID() );
InterfacePtr< ILinkManager > pLinkManager( pDocumentSignalData->GetDocument(), UseDefaultIID() );
ILinkManager::QueryResults results;
LinkQuery query;
pLinkManager->QueryLinks( query, kIDLinkClientID, results );
Utils< Facade::ILinkFacade > LinkFacade;
// All the links should now be in results and we can go through all of them.
for( unsigned int i = 0; i < results.size(); i++ )
    UIDRef LinkUIDRef( GetDataBase( pDocumentSignalData ), results.at( i ) );
    // Check if the link is relinkable.
    if( LinkFacade->CanRelinkResource( LinkUIDRef ) )
The UIDs can be used (I tried deleting links via pLinkManager->DeleteLink) so they seem to be fetched correctly now. But right now LinkFacade->CanRelinkResource always tells me that none of my links are relinkable. I tried to test my UIDRefs with if( LinkUIDRef ) but it seemed to always evaluate to false. This probably has something to do with why CanRelinkResource always evaluates to false because it used UIDRef instead of UID. So I am probably doing something wrong with UIDRefs here but I can't understand what. Anyone got any good advice?

Similar Messages

  • Can't run the indicPreferences.js in InDesign CS6 and hyphenation issues with Malayalam

    I am not able to run the indicPreferences.js in InDesign CS6 in Mac OS X 10.10.2.
    But all the apple script is working fine, Also there is a red cross mark is seen next to the script icon (image attached)
    I am trying to use Malayalm Unicode fonts with InDesign and it is giving me lot of hyphenation issues, How can I make the text flow with proper spacing in between characters? is this normal when I use justify all?
    Suggest me a quick fix please.

    Which hyphenation dictionary are you using? I have found that in many languages, there is enough divergence in spelling that some words simply cannot be hyphenated, because the hyphenation dictionary expects one spelling and Every Single Speaker of X Language On The Planet expects another.
    Also, sometimes InDesign has a hard time recognizing a term typed with combining marks as the same word with precomposed characters.
    Lastly: Have you used the settings in the Hyphenation pane to try to force different breaks? I think that the default settings are not appropriate for Malayalam, and I would myself only hyphenate long words. So the default settings are, I think, to hyphenate no fewer than two letters away from a word boundary, in any word with more than five letters. I'd bump that up to words of no fewer than, perhaps, seven to nine letters? And increase the letters-from-word-boundary to 3 or 4. That way only long words get hyphenated.

  • I have a problem with indesign cs6 and my epson 3880 on mac

    I have a problem with indesign cs6 and my epson 3880 on mac.  I need an older version of indesign but do not have a serial number....any suggestions?

    I see then I believe Kglad's advice is on track with starting with updating your printer drivers.  I have also moved this discussion over to the InDesign forum as the Users in this forum likely have additional suggestions.
    Also if you can please turn off your e-mail signature if you want to respond via e-mail.  Your responses are going to a public forum where the information is accessible by anyone.  I have edited your previous response to remove the signature.

  • Can we get Adobe InDesign CS6 and use CS5?

    Hi There,
    We currently have 4 license of InDesign CS5 that comes with Adobe Creative Suite CS5.
    Also an Adobe Product Premium CS5.5. We now need to get an extra license for InDesign CS5 for the Adobe Product Premium CS5.5 machine.
    I noticed Adobe now sells CS6 versions only. Can we get Adobe InDesign Cs6 and have down grade right to use InDesign CS5?
    Best Regards/Allen Chen

    Bob Levine wrote:
    Alternatively move to Creative Cloud.
    But that means buying cloud subscriptions for all seats so everyone is on the same version rather than buying one seat to downgrade. I agree that inthe long run this is probably a better solution, but it may cost more up front.

  • Updating an index in InDesign CS6 and retaining commas

    I have an index in a book document I am creating in InDesign CS6 and as I add imagery to the text the page numbers change so I go to the index panel and generate index which overrides the previous version. This has been working perfectly but my last attempt caused the commas between the page numbers to turn into dots above the base line. I wonder if anyone knows how I can solve this problem and turn them back into commas. In the 'more options'  section of teh index panel I have specified commas as the page separators but this isn't changing them back to commas in the index,
    I would be very grateful if anyone can help me with this.

    Thank you - I can't see where this has happened as it seems to be applying the footnote superscript style to the index. I can restyle the index after each time I regenerate it as a work around. Thank you for your help.

  • I used a Photoshop file as my background for a brochure in InDesign CS6 and when I print it thru eit

    I used a Photoshop file as my background for a brochure in InDesign CS6 and when I print it thru either InDesign or via exporting it as a pdf it always has a white border.  How can I eliminate this?  I was on the phone with a tech for an hour and fifteen minutes.  The answer I was given is that InDesign places white borders automatically.  Need help, the white borders do not coincide with a mostly black background.

    I am not certain you understood the technical support person from wherever you shought help.
    ID will simply output what you tell it to. If you have designed a brochure that has a bleed and your PS file extends into the bleed, and you output a PDF with the correct settings, and send it to a service bureau (not certain about instyprint) that can print that size with bleeds, then trim it to size...phew. Seems like a run-on sentance there.
    As for printing to the edge of a piece of paper on a local printer that supports it, you need to set up the printer to do so. At least that's how it has worked with the borderless printers I have used.
    If you need an inexpensive brochure printed, try Quantum Digital. As long as you design it to their specs, it is a quick turn, the printing is fine for most inexpensive jobs, and they are pretty inexpensive. Offset quality they are not.
    But your file better be constructed properly.
    Take care, Mike

  • Sharing files between InDesign CS6 and InDesign CC

    Can a user of InDesign CS6 and a user of InDesign CC share files without having to save as idml?

    Whoop. Hit send too soon.
    The CC user has access to CS6 as part of the subscription and should be using that to share files with someone who only has CS6.

  • Deactivated Indesign CS6 and then uninstalled from Windows 7 - now want to re-install CS6 on Windows 8. Please advise procedure and where to download from ?

    Deactivated Indesign CS6 and then uninstalled from Windows 7 - now want to re-install CS6 on Windows 8. Please advise procedure and where to download from ?

    I am looking for the exact same information! Someone, help? I didn't realize when I gave them so much money that Adobe has the customer support of a snake with its tail in its mouth...

  • How can i download InDesign CS6 and not CC from your website?

    how can i download InDesign CS6 and not CC from your website?

    Are you a cloud subscriber, or are you looking for a perpetual license or trial version?

  • Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ok i have indesign CS6 and all files are stored on a 10.7.5 MAC server.  This just started happening.  When I open a file indesigns is creating a textfile in the same folder?  I need some help on this.

    Ask in the ID forum and be much more specific about your configuration. there could be any number of reasons why manifests, temp files or restore files are created.
    Mylenium

  • I just got InDesign CS6 and am running it on an iMac and I know the license is good for two computers which will come in very handy for me.  How do I set it up to access it from my second iMac?

    I just got InDesign CS6 and am running it on an iMac and I know the license is good for two computers which will come in very handy for me.  How do I set it up to access it from my second iMac?

    I just had an afterthought, Peter, if I could bother you further; if the downstairs iMac that I want to access it from is in my wife's name and not mine (even though I'll be the one using it on her computer) does that affect anything or can I simply load the software straight into her computer without any complications?

  • Indesign CS6 and CC

    I'm building an app for a client. I'm working on InDesign CS6, and my coworker will be working on InDesign CC. Will this be compatiable, or will both computers have to be on InDesign CC?

    or you may use that CC on your computer as well:
    http://forums.adobe.com/thread/1347241

  • InDesign CS6 ePub Export : Tables with header and footer in HTML

    Hey there,
    does anyone know, whether InDesign CS6 also exports Table Headers and footers correctly into the XHTML-File of the ePub.
    What I mean, is whether the elements <thead> and <tfoot> are created?
    Or is it only possible to steer this via the CSS-Classnames which can be given in the tableformats?
    Generally I think it would be better if the user had the chance to map other exporttags to its elements than just p, em, strong, h1-h6.
    it would be useful to also put in other elements by hand.
    Best regrads.

    Magnolee2 wrote:
    does anyone know, whether InDesign CS6 also exports Table Headers and footers correctly into the XHTML-File of the ePub.
    What I mean, is whether the elements <thead> and <tfoot> are created?
    By "also", do you mean the behavior is changed with respect to CS5/CS5.5? In those, thead and tfoot are created correctly. (Although, quite disconcerting, in the order "thead / tfoot / tbody". ePub renderers based on Webkit display them correctly nevertheless, but others do not. An extremely annoying free interpretation of the W3C rules.)

  • Crash with Indesign CS6 and Keyboard Maestro

    Anyone else experiencing crashes when using Keyboard Maestro with Indesign CS6 on OSX Mavericks? (Latest update of all mentioned apps).
    Indesign crashes when I try to copy certain items in Indesign, but it is not possible to narrow down which. Happends even when there are no macros installed in KBM. Therefore it seems like its the Keyboard Maestro Engine that causes the crashes.

    I see then I believe Kglad's advice is on track with starting with updating your printer drivers.  I have also moved this discussion over to the InDesign forum as the Users in this forum likely have additional suggestions.
    Also if you can please turn off your e-mail signature if you want to respond via e-mail.  Your responses are going to a public forum where the information is accessible by anyone.  I have edited your previous response to remove the signature.

  • InDesign CS6 and CC hang constantly in Windows 8 x64

    Id anyone else experiencing a similar problem? If I do anything at all in InDesign, the application will "hang". I can still move my cursor, it does not crash, I can still see what text block or other item I have selected, but I can't do anything at all with it. Oddly enough, if I press "esc" one time, I will get the frame handles, and I am then able to do whatever I wanted to do with it. If I deselect it, the select something else (or the same item again) it does the same
    thing. I get a box around the item, but can't do anything with it. I can't move it, I can't select the text, I can't select anything else. BUT ... if I hit "esc" I get the handles, and can then do what I want. This is extremely annoying. I have both CS6 and CC installed on my desktop here at home, using Creative Cloud. Both versions exhibit the same issue, regardless of file (they all do it, even a brand new document with only one word placed). At work, I have a desktop that is running Windows 7 x64, and they both work fine. The issue seems to only be happening on my desktop here at home, running Windows 8 x64.
    Any thoughts would be extremely grateful. Thanks!

    Thanks. I periodically check for new drivers and have indeed installed the latest drivers. Last night, just as a check to see if it was a problem with new drivers, I installed an older version of the driver and it still behaved the same, so I reinstalled the newest drivers. I'm going to get with Wacom's support team and see if there is any known issues from their end. Thanks for your response. Double-checked this morning, and the problem does not exist here at my office where I have the nearly identical set up, with the exception of running Win 7 x64 instead of Win 8 x64. Same model tablet, same drivers from June of this year, same file. It seems to be an issue with Wacom, Win 8 and InDesign. I don't have any issues with Illustrator CC, PS CC or LR 5.

Maybe you are looking for