2 Replies Latest reply on Sep 1, 2010 8:31 AM by zak.nelson

    How to reference the extension's directory

    francispotter Level 1

      I'm an experienced AIR developer, just dipping my toes into CS extension development. Working in OSX, using the Creative Suite SDK in Flash Builder.

       

      I'm developing an Illustrator extension which needs to open an Illustrator file, and I want to distribute the file with the extension.

       

      Here's what I'm trying:

       

      var app:com.adobe.illustrator.Application = Illustrator.app;

      var file:File = File.applicationDirectory.resolvePath("templates/SampleTemplate.ait");

      var document:Document = app.open(file);

      That does not work, because File.applicationDirectory is pointing here:
      /Library/Application Support/Adobe/CS5ServiceManager/StageManager/Debug
      So it appears that we can get to the directory for the StageManager. But how can I get to the directory for the extension itself? In other words, I want some way to get to this directory:
      /Library/Application Support/Adobe/CS5ServiceManager/extensions/SampleExtension
      Is there any way to get a reference to that directory?