Skip to main content
ananth padmakarp64550037
Known Participant
November 2, 2017
Answered

unable to load new images to extension from illustrator after saving from illustrator

  • November 2, 2017
  • 2 replies
  • 4441 views

Hi,

the issue is that i need to open .ai files in illustrator and am able to do that. what ever files that i open in illustrator, those should be opened in an extension which we developed, and i am able to do that. the below extension snippet.

Now whats the issue is when i edit an image in illustrator and and able to save them and not able to load to this newly saved files. it is always loading the old files. but   if i close the illustrator and try loading it am able to load it successfully.

tried all the ways.

someone pleases help me with this.

This topic has been closed for replies.
Correct answer LeoTaro

when saved control jumps to jsx file and the function is below

and that prepares an object and the file name is used to link the image in image source. that looks like this.


Try replacing:

exportArtboard.fileName= unescape(base_filename.replace('/c/','/'));

With:

exportArtboard.fileName= unescape(base_filename.replace('/c/','/')) + "?stamp=" + Date.now();

2 replies

Inspiring
November 5, 2017

When you say "when i edit an image in illustrator", are you talking about linked/embedded images or any art object?

How does your plugin load the illustrator files? What happens if the user closes and then reopens the file in Illustrator after modifying it, do you get the modified version then?

ananth padmakarp64550037
Known Participant
November 6, 2017

1. when i edit an image in illustrator means its an art object i.e .ai image

2. how does my illustrator files: those files are first loaded into a folder and then to the extension.

3. i am not  getting  the modified version just closing  and reopening  the file but by closing the and opening the abode illustrator

Inspiring
November 8, 2017

that file name contains a path to the image that we want to show. and while binding the  image the file name is converted base64


Why would you convert the file name to base64? Do you mean the contents of the file are converted to base64? If so, then I don't see why you have the update problem as the base64 will be different if the image has changed.

Srishti Bali
Community Manager
Community Manager
November 3, 2017

moved to Illustrator SDK

ananth padmakarp64550037
Known Participant
November 6, 2017

Thank you so much..