Trouble calling the Default Workspace

I’ve been using the script:

let workspace = Workspace.find(“WorkspaceName”);
app.applyWorkspace(workspace);

to call on various workspaces within different actions but I can’t seem to figure out how to call the Default workspace? Using the name “Default” in the above script doesn’t work. Can anyone share the secret?

Can it even be done?

Thanks,

Paul

I think the Default workspace is a special case.

If you run this script it should enumerate the addressable workspaces and they are all the standard user defined ones.

let wsAll = Workspace.getAll();

let strMsg = "";
wsAll.forEach(function procWS(wsSingle)
{
	strMsg += wsSingle.name + "\n"; 
});

alert(strMsg);

I’ve had a "default’-style workspace set-up since before the Default workspace became an option. Perhaps setting up your own equivalent would provide a workaround for now; assuming my earlier assertion on Default not being accessible to the Workspace scripting object is correct?

I was also previously using a custom Default Workspace. I was hoping the true Default Workspace could be integrated in scripts in the same way as any other workspace.
Hoping for a feature to be added I guess.

Thanks @sylumer for your input!

Yes, access to the default and current workspaces in scripting would be a nice addition. I’ve got it on the list, hopefully will get to it soon.

1 Like

Thanks Greg. Keep up the great work!