Copy link to clipboard
Copied
I cannot figure out how to reset the custom workspace programmatically for After Effects or Premiere Pro.
I have been able to do this successfully with other apps.
Examples:
Indesign:
app.menuActions.itemByName( "Reset CustomWorkspace" ).invoke();
InDesign:
app.resetWorkspace();
I need an equivalent for Premiere Pro and also AfterEffects.
Any hint for any version would be helpful. The target is Windows and Mac so I need Extend Script code.
My research has taken me towards looking at the app.executeMenuCommand (In After Effects) but so far I have not been able to find such a command to reset, but only to set it. I can set the workspaces but I cannot reset the workspace.
Here is the goal of how the extension should behave. Assuming the custom workspace is correctly installed on their machine, on startup it will set the workspace so that the extension docs to the place I want. The problem I am seeing is that it WILL doc fine but the width is not the accurate width that the workspace is supposed to use. Solving this requires me to "Reset" the workspace to the saved layout. At which point, the workspace correctly sizes and docs. I am not sure why I need this extra step of "Resetting" in order for the workspace to correctly kick in but I do need this extra step.
Thanks for any help,
Daniel
1 Correct answer
PPro provides no API for resetting a custom workspace.
You could ensure that 'Import Workspace from Projects' is on, then open an empty project containing the correct workspace. Bonus behavior: leave the 'Import Workspace from Projects' setting as you found it.
Copy link to clipboard
Copied
I have the solution for AfterEffects now I wonder if it will be the same or similar to PremierePro.
AfterEffects:
app.executeCommand(3566);
Mind you that running commands like this will probably have versioning issues down the line but it works for my purposes.
Copy link to clipboard
Copied
PPro provides no API for resetting a custom workspace.
You could ensure that 'Import Workspace from Projects' is on, then open an empty project containing the correct workspace. Bonus behavior: leave the 'Import Workspace from Projects' setting as you found it.
Copy link to clipboard
Copied
Thanks for the answers. I have a question about the setting for Import Workspace from Projects. Where exactly can you set that and is this setting a thing in versions 2018 or older? Or it is a new thing for 2019?
Copy link to clipboard
Copied
I have a question about the setting for Import Workspace from Projects. Where exactly can you set that...
In the Window menu, Workspaces sub-menu, there's a checkmark before the 'Import Workspace from Projects' menu item, if it's enabled. Yes.
is this setting a thing in versions 2018 or older?
Yes.
Copy link to clipboard
Copied
Thanks for the reply. I still cant find that setting. I am using 2018 and I dont see this check mark at all.
Copy link to clipboard
Copied
I am using 2018 and I dont see this check mark at all.
?! That's troubling. The check mark has definitely been present for over a decade.
Here's a screen movie showing how to toggle it.
Copy link to clipboard
Copied
Oh I see where the confusion is. My bad. Im talking about aftereffects at the moment in a premiere pro thread. Im guessing the feature you speak of is not available for after effects.
I have noticed that AfterEffects does try to set the workspace that was used with the project you open. However it doesnt seem to import that workspace it just tries to set it.

