Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Illustrator Panel doesn't refresh when collapsing/uncollapsing, why?

Contributor ,
Aug 17, 2016 Aug 17, 2016

A colleague is working on an extension panel for PS and Illustrator. Running the panel goes just fine and he can reload/refresh it after doing changes in for example: the jsx-file.

But that only applies to Photoshop. Trying to reload in a similiar manner in Illustrator just doesn't work.
Is this a known issue? Do you really have to restart the application in order to reload a extension in Illustrator?

TOPICS
Scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Participant ,
Aug 17, 2016 Aug 17, 2016

Create arbitrary button and add it to the event:

your_button.addEventListener('click', function (event) {

    location.reload();

});

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 17, 2016 Aug 17, 2016

If you make changes to the html/css/js part of the panel, the panel can be reloaded, as Alexander Ladygin said above.

If changes are made to the ExtendScript-file, you'll have to kill the CEP-process or restart Illustrator.

It seems so. But I don't remeber where it was said in documentation...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 17, 2016 Aug 17, 2016

In this case, for development purposes, (and I am starting to try and to mess more with CEP these days), I would make sure that my .jsx scripts would be made 'generic' and have one purpose: to read and execute other .jsx scripts which live in some other folder.

It seems like a good idea to me from reading the above. But I'll really have to test for myself.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 17, 2016 Aug 17, 2016

I do not know about you, but I have updated all of the extension. Alternatively, you can use another method :

Create arbitrary button and add it to the event:

your_button.addEventListener('click', function (event) {

    new CSInterface().closeExtension();

});

Collapse panel. Result reloar extension.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 17, 2016 Aug 17, 2016

But in Illustrator CC2015.3 x64 En on Windows10x64pro this futures don't work, or I have a bug:

panel restart empty, without content... I have to restart Illustrator, to the contents of the panel displays.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 21, 2016 Aug 21, 2016

Hi, Alexander Ladygin​!

How to launch the extension panel automtically after rebut (when using method new CSInterface().closeExtension())?

Updated

PS.

I'm trying

csInterface.requestOpenExtension(csInterface.getExtensionID(), "");

but it doesn't work

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 21, 2016 Aug 21, 2016

Hi, o-marat!

As an option:

Create a new extension, сreate in it arbitary button and add to it an event:

your_button.addEventListener('click', function (event) {

    new CSInterface().requestOpenExtension('is an extension ID you want to restart', '');

});

Now procedure:

1. Execute the function new CSInterface.closeExtension(); in the extension that you want to restart;

2. Now in the new extension, click on the button, and the extension must be started again.

p.s. It works for me, illustrator cc 2014

p.s.s after you have performed the function new CSInterface.closeExtension(); of all subsequent commands will not be executed because extension was closed and discharged, at least in my case works

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 21, 2016 Aug 21, 2016
LATEST

Alexander, thank you very much! It work in Illustrator CC 2015.3 too.

That's funny. To completely reboot panel need a second panel )))

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 17, 2016 Aug 17, 2016

To see the changes in the ExtendScript-part without restarting of Illustrator I just kill ALL CEP-processes through the creation of on-the-fly temporary batch file (bat or cmd).

Then collapse and expand panel.

But it work and only under Windows. And I think it needs local admins rights.

Code for .jsx

function killCEP () {

  /**

   * make bat-file that kill all system processes CEPHTMLEngine.exe

   */

  _execFile (

    Folder.temp.absoluteURI + '/' + 'taskkil.bat',

    'taskkill /IM CEPHTMLEngine.exe /f'

  );

  /**

   * make new file by full path, write to disk with some file contenr, execute file

   *

   * @param {String} filePath - FULL path (include file-extension)

   * @param {String} fileContent - content to new file

   */

  function _execFile (filePath, fileContent) {

    var f = new File (filePath);

    f.open ('e');

    f.write (fileContent);

    f.close ();

    f.execute ();

  }

}

Code for .js

    $ ("#btn_killCEP").click (function () {

      csInterface.evalScript ("killCEP()");

    });

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines