question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked tannerp commented

Is it possible to save multiple workspaces not just the "default worskpace"?

Hi,

I'm preparing a model where the layout is really important because of so many things (views) going on at the same time with tables, 3d, process flow and dashboards. It would be really valuable for me to go back and forth from one layout to some other 3 workspaces during execution. Is there a way to do this?

FlexSim 20.1.1
flexsim 20.1.1workspace
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

tannerp avatar image
0 Likes"
tannerp answered tannerp commented

@Enrique Elizaga,

There is a way to do this, although I'm not sure I recommend it. Here's what I did:

1) Use the following code to save the current workspace as a new treenode. Note that you cannot save workspaces with dashboards open. Everything else will work.

  1. // update the environment node for prefs.t
  2. //Check to see if there are any dashboards open
  3. treenode dashboards = node("VIEW:/active>Documents/Dashboard");
  4. if (content(dashboards) > 0) {
  5.     msg("Workspace Error", "Dashoards cannot be open when saving the workspace as default.\nPlease close all dashboards before setting the current workspace as default.", 1);
  6.     return 0;
  7. }
  8.  
  9. treenode defaultWorkspace = assertsubnode(assertsubnode(node("VIEW:/environment"), "Workspaces"), "Default");
  10.  
  11. treenode test = defaultWorkspace.subnodes.assert("NewView"); //NewView = name of saved view
  12.  
  13. applicationcommand("saveworkspace", test, 0);

2) Use the below function to open the saved workspace. You can find the workspaces in the tree under View > environment > Workspaces > Default.

  1. applicationcommand("openworkspace", NewView); //set path to NewView

Let me know how this works. It's just my best guess as to how to do this. Here's a model with the applicationcommand primed and ready to go. Running the command in the script window will open a new workspace that I saved.

open saved workspace.fsm


· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Braydn T avatar image
0 Likes"
Braydn T answered Enrique Elizaga commented

@Enrique Elizaga You can use the views which is on the right side of the window when you click on the model background. You can capture a view and then select it to go back to that view. You can also right click your mouse to see your views. This won't open any default windows, but it will bring your 3D model view to the same position.


views.png (18.8 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.