Skip to main content
Inspiring
July 3, 2009
Question

CS3: Problems with file handling

  • July 3, 2009
  • 1 reply
  • 727 views

Hi

I have installed a new PC including InDesign Debug CS3 (5.0.3) and the SDK. I built my plugin and have now some problems with the file handling. I haven't changed my source code or the path in the file system. The InDesign files are on a local drive (D:).

First issue:

----------------

- My plugin open an InDesign file using SDKLayoutHelper::OpenDocument. The path is D:\Work\InDesign\Test.indd. The file is correctly opened.

- Now I want to open the SAME file again (in my plugin). Before my plugin do that, it make a test if the file is already open. I do that via  the method "FindDoc" of "IDocumentList".In my old installation, this works, in my new one not. Why that???

- I had a look about the method "GetSysFile" of "IDatabase" in my plugin. In the old installation this method gave me the whole path, in the new one only the file name. I get the "IDatabase" interface via UIDRef from the "IDocumentList". I changed "GetSysFile" to "GetSysFileFromOpen" and get now the whole path.

OK. So far so good. I have a workaround. But why does it work with the old installation on another PC and with the new installation not??? Any ideas?

Second issue:

---------------------

- My plugin open an InDesign file using SDKLayoutHelper::OpenDocument. The path is D:\Work\InDesign\Test.indd. The file is correctly opened.

- After work my plugin want to save the opened file with SDKLayoutHelper::CloseDocument(uidRefDoc, kFalse, K2::kSuppressUI, kTrue, IDocFileHandler::kSchedule).

- But now the SaveAs dialog is shown!!! Why that?

- This works also correct on the old installation and not on the new installation.

It seems, there is a problem with the InDesign file handling on my new installation. I have no idea why, but there must be a differnence between the installations or the configuration. I am a little bit confused about this behavior.

Any ideas or hints?

Thanks a lot.

Hans

This topic has been closed for replies.

1 reply

Inspiring
July 3, 2009

I have never heard about such problems, but my preferred platform is Mac, and when I'm forced to do Windows that is usually XP via Parallels.

Could you give us details on the machine, OS, service pack?

Dirk

hstoesselAuthor
Inspiring
July 3, 2009

Hi Dirk

Me again.................

The OS is Windows XP, Service pack 3.

I think, it is a problem with one specified document, not a generally problem of InDesign. It is the same document with the invalid UID's, and I can't repair it. I suppose, there is something wrong with the doc UID, but I am not sure.

If the document is verfied after closing there are 4 assert's, you can see the last 3 of them in the attachment.

If you want, I can send you the document who fails.

Maybe it is the problem that the document is integrated in a K4 (K4 Publishing System) workflow by our client and we haven't this in our environment. Anyway I must have for a look for a workaround in that case. Any ideas?

Thanks

Hans