Can I start Dynamo with a template instead of a blank?

Hi all,

I have a question: Autodesk itself is telling us to standarise Dynamo by using collored groups to point out the workflow within a script. But we still can’t start Dynamo with a template of our own. Like we do in Revit.
My questions to the developers would be is this possible and if so can this be build in with the next update?
If not… is there a way to alter the current blanc so we still can get the same result: loading our company workflow for all users so the all work according the same rules.
I know the workaround is to place a .dyn file with all the workflow things in it in the sample files folder so you can select that to start… but that’s just the workaround and not a solution.

2 Likes
3 Likes

This was about a year ago. And I see a comment that they are trying to implement it after 1.3!
Current version is 1.3.1.
And to my knowledge it still isn’t in the program. But nice to see more poeple would love to have this.
Hope they get it in there soon.

A workaround is to save any “template” files in your examples folder. C:\ProgramData\Dynamo\Dynamo Revit\1.3\Samples\en-US

Also wanted to throw it out there that I have no idea who I learned this from. I wish I could take credit, but I cannot.

image

19 Likes

Make sure to mark them read only so you don’t overwrite them! :wink:

4 Likes

I use the same method as @john_pierson. I also have a script which pulls from server location to samples folder. So I don’t have to keep trawling through my different project scripts. Nice and tidy.

2 Likes

Thanks for the tip @jacob.small.
Currently I’ve put it on a network drive were I’m the only person within the company with full r&w rights.
All other Revit users can just read the folder. So basicly I guess it’s the same solution. :grin:

1 Like

I marked @john_pierson answers as the solution, but let it be known that Dynamo team is actually working on adding template capability to Dynamo 2.0. So far I know for a fact that Python template support has been added. Thanks @Radu_Gidei and @Michael_Kirschner2 I believe DYN template support is next on Radu’s list.

7 Likes

Thanks @Konrad_K_Sobon for the shout-out. Python template support has indeed been merged into master already (see PR here ) so it will surely be in next public release of Dynamo.

I’ll be working on Dynamo template support next, hoping to get to it between BiLT and AU but not sure.

This is a good opportunity to also ask the community : would you want support for multiple templates (like samples & in @john_pierson’s solution) or would having 1 Dynamo template suffice ? Please let us know which & why.

One is enough but I won’t complain if I get more!

1 Like

I’d prefer multiple since we actually do have multiple templates (Sandbox, Revit and Dynamo Player) and roll out the same settings file for both Sandbox and DynamoRevit.

3 Likes

Like @Andreas_Dieckmann I’d also prefer multiple so I can have customised templates for different purposes.

As for the python templates, my current workaround is to include several python nodes in the template.dyn file which have a particular focus that include all necessary references and definitions to get started. For instance, one for simple OS operations only, one for revit API access, one with all references etc and the user can just use the one they need.

2 Likes

If you need tho choose between one template or multiple for coding, go for multiple.
I think changing it afterwards is more difficult then doing it the firt time right.
Also… when adding only one template file location now you can bet on it that questions for multiple will follow shortly.

Nice to know this is being taken care of within the next few updates.:+1:

1 Like

I agree there needs to be a template file and the possibility of selecting a file but could it be a similar approach to selecting the template for revit when starting a new project?

Ability to set a priority version then have secondary more specialist versions would be best way to organise them in the drop down.

Template selection

2 Likes

Thank you everyone for chiming in, really useful feedback! :+1:
Will definitely be looking to implement support for multiple templates then.

@Brendan_Cassidy, that’s also how I saw it working, have only just started to discuss this with Dynamo team (cc @Zach_Kron & @Racel ) , so stay tuned.

From what I can gather above, there’s also desire for multiple templates support for Python nodes ? Although I suspect this is more of a power-user request. I’ll have a look if this can be updated when I do the DYN template too.
cc @Peter_Kompolschek

1 Like

Yes please! That or the ability to define the contents of the template once so that we don’t have to edit the imports every time we use one.

Don’t quite understand what you mean by define the contents of the template once ? Current implementation of Python template support is that it looks for a specified .py file and reads its contents every time you add a Python node to canvas.

Meaning if you change the template between adding 2 Python nodes, the second one would have the updated py source code.

mind blown

That said it still would require editing that template each time. I guess what I’m saying is the ability to define preset Python imports is more what I am after.

You’re referring to the import ... at the top of py scripts ? Those can be included in the templates no problem, see images here : https://github.com/DynamoDS/Dynamo/pull/8122

Any updates on this? We’re about to hit the 2 year mark on Dynamo template almost being a thing… Thanks!