Skip navigation
Scarlett Penn
Currently Being Moderated

Why does com.adobe.indesign.Document.filePath/fullName always return null since CS5.5?

Apr 20, 2012 1:25 PM

Tags: #indesign #filepath #fullname

The CS InDesign plugin on MacOS Snow Leopard/Lion worked fine with Adobe InDesign CS5. The properties: filePath and fullName retrieved the document's path as expected.

 

Since upgrading to InDesign CS5.5 (tried 7.5 and 7.5.2) the fullName and filePath properties in

com.adobe.indesign.Document object always return null.

 

I don't see if these read-only propeties are deprecated and if so what is the alternative?

 

It seems like a CSSDk's InDesign ActionScript host adapter has a bug?

 

Any insights are welcomed.

 
Replies
  • Currently Being Moderated
    Apr 21, 2012 5:45 PM   in reply to Scarlett Penn

    This appears to be a pretty obvious bug. Hard to believe it could have passed QA :-)

     

    I have been able to reproduce this in a tiny test case using the Extension Builder 1.5, the default code generated for InDesign plugin exhibits the bug.

    To reproduce open an Indesign document and then click on the plugin run button.

     

    Can someone from Adobe please comment on this bug in CS5.5 InDesign SDK or CSAW lib? Can we expect a fix anytime soon?

     

    package com.inddtest

    {

              import com.adobe.csawlib.indesign.InDesign;

              import com.adobe.indesign.*;

              import flash.filesystem.File;

              import flash.system.System;

     

              public class InDesignDocPathTestInDesign

              {

                        public static function run():void

                        {

                                  var app:Application = InDesign.app;

     

                                  //your InDesign code here

                                  if (app.activeDocument!=null) {   // I added these lines to the default plugin generated by extension builder to reproduce the bug

                                            var s:File = app.activeDocument.fullName;

                                            var f:File = app.activeDocument.filePath;

                                            if (!s || !f) {

                                                      trace("fullName and filePath are null!!");

                                            }

                                  }


     
    |
    Mark as:
  • Currently Being Moderated
    Apr 22, 2012 12:13 AM   in reply to Scarlett Penn

    It works for me.

     

    Is your file saved?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2012 2:32 PM   in reply to Harbs.

    Thanks Harbs. Yes that worked.

     

    Strange, the file was opened from the desktop but was an older Indd file, it was probably converted to new cs5.5 format on opening and was marked as changed/not-save dby cs5.5 indesign. I was expecting the file name to be non null since the file had a valid path/name to begin with. After save it worked fine but

    I would still think its a bug to not report the file name/path if it was opened from desktop.

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 23, 2012 2:48 PM   in reply to tbd2

    Nope. It's not a bug.

     

    Converted files are not saved. If they would be, you could save over the previous version by mistake. That would be a bad thing! (InDesign files are not backwards compatible.)

     

    Always check Document.saved == true before checking the path...

     

    Harbs

     
    |
    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