Copy link to clipboard
Copied
Is there some method of getting exportForScreens to act synchronously so one can know when it's done? (other than polling for the files)
Yea it's a known issue that SVG for some reason as an async operation. I've used time intervals to scan for files in CEP extension, but it was only guaranteed so-so as inevitably there would have to be a stop-button if the files are too large, so the user can cancel it at least. (Sometimes there's patterns, etc in art when users make SVGs, which can lead to large output times).
Copy link to clipboard
Copied
A case for this would be if one wanted to export an artboard change the color of the artwork and re-export the artboard and then recolor the artwork like it was.
How can one know when it's safe to color the artboard and recolor the artwork?
Copy link to clipboard
Copied
Are you experiencing a problem where the exported files are colored incorrectly?
Copy link to clipboard
Copied
The real case that I'm dealing with is that I'm adjusting the size of the artboard between the formats adding padding for png and jpg and then reverting the size back to what it was before.
However the size gets reverted back before the export takes place so no padding is applied.
Copy link to clipboard
Copied
Interesting - I would need to understand more about the export for screens and how it works within scripting.. My first question would be whether export for screens is recordable as an action. It might not be, but if it is then it may be worth exploring how to make the entire routine into an action to see if it solves any sync issues.
Copy link to clipboard
Copied
I correct myself.
PNG exports are synchronous there seems to be an issue specifically with SVG exports but I need to investigate that further when and if I get the time to.
Copy link to clipboard
Copied
Yea it's a known issue that SVG for some reason as an async operation. I've used time intervals to scan for files in CEP extension, but it was only guaranteed so-so as inevitably there would have to be a stop-button if the files are too large, so the user can cancel it at least. (Sometimes there's patterns, etc in art when users make SVGs, which can lead to large output times).
Find more inspiration, events, and resources on the new Adobe Community
Explore Now