Using a template for new Dynamo graphs

I found a few forum posts talking about adding a template option in Dynamo dating back to '17.

Are there still no solution for this, and if so do we have a reason?

It seems like a simple solution to solve with fairly little code, and it would be a major improvement for our workflows. I’m not interested in using the “sample workaround”, but I want a simple dropdown showing when pressing new that just searches a pre-defined folder for any template files that can the be used. Much like Revit does it.

I’m seriously considering adding this myself in a pull request to the github repo if it doesn’t exist yet.

Doesn’t exist directly, and I am sure the PR would be welcome, but with 2.18(?) we can now insert graphs from file, including your template of choice, so that may remove the need.

What is the “insert graphs from file” that you talk about, and how does it help with using a template file as a new document?

Save a bunch of DYNs as a template and use it like this:
202404038-neatTemplate

3 Likes

Oh I see, this is more for like snippets rather than a starting a new file from a predefined standard template, similar to Revit’s new project/family from template. Still useful and good to know, but not what I or the original author (as I understand) was looking for.

I just saw on the roadmap that a new from template is planned for implementation

In the meantime, I’m trying to implement this workflow that I’ve done in the past but for some reason having issues on my current version, posted here.

I looked into the “inserting” functionality, which would work great for us to insert our Dynamo Template(s). However, it seems that this doesn’t insert any “Graph Properties” information such as the description, image, author, etc. which makes sense. It also doesn’t insert our custom properties, and subsequently its contents, which we do want everybody to use.

For bulk association of properties I posted a set of tools here: Updating python node in multiple scripts - #15 by jacob.small

Might be easier to manage in bulk rather than on a per graph basis.

Ideally when an user creates a new file it automatically opens our template including these additional properties. I read that in 3.1.x+ there is something for that, but i didnt have the time yet to check it out

Correct. In the meantime automating properties after the fact in bulk works, or you could look into deploying a view extension to do the work for you (any new graph automated the properties).