Thoughts about template files/ parts

I use dynamo c3d.
It seems like every graph begins with

Document.current →
Document.modelspace

It would be awesome to somehow configure a hot key where those nodes are deployed with node inputs/outputs already connected.

Doc.current->
Document.get all layers->
Select.all objects on layer
Geometry. Get object geometry as dynamo geometry.

Hope that makes sense.

1 Like

@ddrennen2QDK2 ,

Why not create a template/ sample file instead?

It’d be good if we could have a template file we could use to embed into our graphs.

Like an X-ref … so if the template file changed it automatically changed in each graph rather than it being a cut and paste job.

Sounds like the description of a custom node :slight_smile:

Nah, it’s not a node…

This kinda thing:

I see what you mean, and I also see where that could be useful.

The template I’m using now hasn’t changed in 2 years or so, So I don’t really have a need for a template that changes with the original.

PS: branched this topic since we aren’t really discussing the dynamo search function anymore

2 Likes

We don’t change it that often…
But when we do it’s painful!

Dynamo 2.17 will allow inserting. Graphs into graphs now, which would allow you to start a blank canvas and insert the template file (or notes, groups, etc.) of your choosing. I believe this will be integrated into a coming release of Revit and Civil 3D shortly.

4 Likes

Interesting, @jacob.small how would you see that work in the context of this template/ header part of the script if for example I added my name, date, etc. Into it.

@Alien , let’s say you update the template, wouldn’t you have to change every single group which you colored / named so that it aligns with the new template? Sounds like you’ll probably have to write a script that reads a dynamo file as text file and updates everything which needs to change.

Doesn’t seem too complicated to me but updating a template seems like a lot more work than just updating the template part.

Good point actually…

It’d be nice if we had “pink” = user input…

But then you decide you want “red” = user input

And it changes all user input groups in all your selected graphs.

Bit like if in Revit I have WallType1 and it’s 120mm thick with 1 layer plasterboard each side… but I change my mind and want 2 layers on each side and ALL WallType1 instances update in my project.

Your name, the date, etc. would all be inserted as they are in the file you selected. I would argue that most of that should go in the graph properties for current versions (adding the custom properties as needed).

If you want to propagate notes and edit them because they weren’t correct in the source, I have posted (somewhere) some graphs I presented at BiLT last year which would allow you to start the process of auto inserting header content from a source into a closed graph; that code was written in Python and as such you can likely auto fill the desired values. Conveniently a similar was produced to auto populate the properties in a similar way as well, allowing the use of the new system (properties) and the old (notes) concurrently. They do in fact work by reading the graph as text and making edits.

2 Likes

The same code I reference above can be used as a sample to bulk produce changes like this, across an entire library.

They were originally released to allow migration of a library from version N to version N+1, including automated testing. Because managing your graph libraries is too hard.

EDIT: Considering I am having a hard time finding these myself (2 accounts to search here, 1000’s of posts each; and this is one of many platforms I share this stuff in, it might be worth a focused post).

1 Like

Found the post: Updating python node in multiple scripts - #15 by jacob.small

OMG… there are two of you :open_mouth:

2 Likes

Jacob is part of an early-access cloning operation :wink:

5 Likes

More than two actually… Only two I’ll admit to are in this thread.

  • My historic account which I can’t access from my work devices due to Single Sign On limitations. Mostly use this for moderation stuff and help/insight which doesn’t require opening any Autodesk software.
  • My work account which I use for stuff on the forum that need software to reply with meaningful help (ie: if I have to write code/build a graph I’ll do it here).

The others… Well they allow me to test account admin stuff in production without breaking someone’s stuff.

found the spammer right here officer

3 Likes

askimet a.k.a.

1 Like