Several tabs in Dynamo for Alias

HI to all,
as Dynamo now is combined with Alias you have to start Dynamo always through Alias. Which leads to the problem, that I can have only on workspace open in Dynamo at a time. In Dynamo Studio I can have several tabs open to compare different versions or to pick nodes from an older projekt.
At the moment I have to open another Alias to open a second Dynamo to switch from one project.
I understand a certain logic to keep one Dymamo workspace with one Alias stage but I would prefer to get the chance to have several Workspaces open with out swichting the programm instance.
is that possible?
best regards
Markus

I do not recall seeing multiple dyn files open at the same time in Dynamo studio, but single dyn and multiple dyf is possible in all versions of Dynamo. See this blog post:

Thanks to Kean Walmsley for the documentation. :slight_smile:

Also, I believe this is a technical limitation of Revit, Alias, and others, rather than a choice in the development structure.

1 Like

Hi Jacob, thanks for the link.
I see, no chance to have several stages open. Would be a great feature, the described way stays anoying as you have to copy, close, open… paste.
It turns out that you can copy & paste between graphs, as long as they are opened in the same editor.
…copy the objects inside the source graph using Ctrl-C, close the graph and open the target graph in the same instance, and then Ctrl-V the nodes into it.
best regards
Markus

@MarkusSchnabel1921- I’ll discuss this further, but as an Alias user, how would you like Dynamo graphs which operate on the same surface to function when all open at once? I see potential for never-ending loops:

Graph1: “Make the surface X wide.”
Graph2: “Ok surface changed, make it Y long.”
Graph1: “Oh the surface changed, make it X wide.”
Graph2: “Hey look the surface changed…”

Or would the intent be to only allow one workspace to interact with the model?

HI Jacob, it is true that loops have to be avoided.
My point is, that as average user one is often in the situation to copy parts of existing graphs into a new one. That´s why it would be great to have a second stage open to switch, altough only one is active.
Best regards
Markus

@MarkusSchnabel1921,

I did some digging, and came up with an unsupported work-around that could save you (and others)some time. Before posting it, I wanted to offer up some other insight first.

First up, there is no version of Dynamo that has a User Interface and has supported multiple .dyn worksapces simultaneously. Not Dynamo Studio, Dynamo for Revit, Dynamo Sandbox, Dynamo for Fusion, Dynamo for Advanced Steel, nor Dynamo for Alias. This is a technical limitation which is complicated further in the Dynamo versions which build on other systems. I am not sure where you saw that Dynamo Studio supports multiple .dyn worksapces simultaneously, but that should be clarified as a non-option. If you have an example of this which you can point me to it would be quite helpful.

Next, for moving content between graphs, .dyf format is your best option and is a supported workflow. This format is different from the .dyn format in that it allows packaging a sequence of nodes in a graph into a single custom node. One such example:

Point.ByCoordinates, Vector.ByCoordinates, and Line.ByStartPointDirectionLength, could be packaged into a single node, which would take 7 inputs (in this case the 3 coordinates of the point, the 3 coordinates of the vector, and the length).

The dyf can be saved to the local drive, and shared with others who need to use the same custom node, or by utilizing the package manager for larger distribution of a collection of custom nodes. Once saved, the custom node can then be placed into any dyn or dyf workspace. Using this method, future edits to the dyf will propagate across all instances of the custom node in every workspace that utilizes this dyf. This is the intended workflow for utilizing content in multiple graphs. As an added bonus, you can be in your home workspace at he same time you’re in multiple dyf files (as I noted above).

This leads me to the workaround. On projects utilizing the 2.0 file format there is another option for bulk access issues (such as working with a team and having to compile many ‘portions’ of the graph developed by many different users in multiple .dyn files, or building a large graph consisting of multiple steps which are more easily developed in various dyn files) there is another option. It is possible to change the extension of a dyn files to dyf, and modify some of the code contined in the json file format to ensure that the files can be read as .dyf. This will allow you to first convert the dyn files, open the resulting dyf files, and copy/paste content from the dyn to the dyf as needed. And because Dynamo can read text, modify the contents, and save as a new file… well, we can automate the process for modifying Dynamo files using Dynamo.

Warning: This is by no means a ‘supported’ workflow, and may cause other issues upstream in the process or with your files, so back stuff up and sandbox as required. It may also not have the capability to return trip (go back to .dyn format), and files which contain element binding should not be converted without first clearing the bindings from the file.

Use this code with caution.

I’m not going to paste the raw code due to the way this integrates with the file structure. Like Uncle Ben said: “With great power comes great responsibility.” If you wan’t to use it you’ll have to rebuild it from my instructions and the image below.

You sure you want to continue?

First we defeine our variable as an input, , providing it with a path to a dyn file (or multiple dyn files) as the variable ExistDYN.

Then we read the text (FileSystem.ReadText(File.FromPath(ExistDYN)), and nest that into a String.Replace line to swap the "IsCustomNode": false, line of the source dyn file with the line "IsCustomNode": true, and inserts a new line (\r\n) with the text "Category": "temp". The contents of this file could now be used as the basis for a .dyf file.

Next we need to create a path for the file extension. I don’t know what’s right for any individual situation, so instead of using a ‘common’ path that wouldn’t necessarily work for everyone, I just modified the path of the .dyn using another String.Replace node. You may want to use a temp file folder, or a subfolder in the same location as the dyn. Do what’s right for you and your case.

Last, we use the generated dyf file contents, and the generated path to create a .dyf which with the line FileSystem.WriteText(DYF_Path, DYF_Contents);

Now you can open the generated dyfs while in your main dyn workspace, and copy/paste nodes as needed between the two. I have tested this with Dynamo for Revit graphs, and Dynamo Sandbox graphs without issue, but I have not attempted this with Dynamo for Alias nodes or other Dynamo versions.

Image

2 Likes

Hi Jacob,

thank you for your reply.

I thought it was possible to have “Tabs” in Dynamo Studio, but probably I just had the custom nodes in mind. Sorry for the confusion.

Well for the official and unofficial workflow I will need to work much more with Dynamo in order to feel comfortable. I know it is programmed differently but simple people would like simple solutions. I still need to look up a lot of my old files and than I take a portion and copy it.

I guess anyway tat it is a good way to handle things in Dynamo as you describe it.

best regards

Markus