0 Replies Latest reply on Mar 21, 2013 6:53 AM by andyd001

    activeDocument.saveAs() causes strange behaviour in illustrator

    andyd001

      Hi,

       

      When running the following code in the CS Extension Builder debugger (and occasionally in the compiled extension) it causes Illustrator to be unable to draw properly:

       

      Illustrator.app.activeDocument.saveAs(new File(File.desktopDirectory.nativePath + "\\test.ai"));

      Illustrator.app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

      Illustrator.app.open(new File(File.desktopDirectory.nativePath + "\\test.ai"), DocumentColorSpace.RGB);

       

      This doesn't happen every time, but more often than not after running this code, the rectangle tool will not draw anything, the coloured outline is displayed as you drag the shape, but nothing is actually drawn on the artboard (see image).

       

      This lasts until Illustrator is restarted.

       

      Has anyone seen this before, or have any idea what causes it and/or how to get around it.

       

      Thanks

      Andy

      test.png