Skip to main content
wckdtall
Inspiring
October 24, 2023
Question

Can you Expand Patterns via scripting without an alert? Legacy file support?

  • October 24, 2023
  • 2 replies
  • 239 views

I'm trying to add to a log script I've written to take the contents of Patterns into consideration. The log looks for extras in files like pattern swatches, raster images, brushes, symbols and live text, but of course can't find anything inside of patterns. It looks like the only menu command that will actually expand patterns is "Expand3" but that launches an alert. Is there another option other than saving down to a previous version of illustrator and embedding? I did some brief testing, and depending on how far back I go, it still launches a dialog for legacy text.

This topic has been closed for replies.

2 replies

Charu Rajput
Community Expert
Community Expert
October 25, 2023

Hi, @wckdtall 

As suggested by @CarlosCanto , you can record and save the action and using the following code, you can load the action file and exceute it.

var actionFile = File(PATH_TO_ACTION_FILE);
app.loadAction(actionFile);
app.doScript('Action_Name', 'Set_Name');
app.unloadAction('Set_Name', '');
Best regards
CarlosCanto
Community Expert
Community Expert
October 25, 2023

Record an Action to Expand..., Toggle Dialog off on the Actions Panel, have your script play the Action