Custom Node Behavior


Hi all,

I have a Dynamo solution that addresses a very specific issue with sheet naming. It requires a custom title block with customized parameters, so it doesn’t really make sense to post the solution, so I’ll describe it.

Basically, I am grabbing a sheet number, which is formatted like this: XX.XX.XXX.XX. The script parses that number into components and places those into other individual parameters in the title block on every sheet. This is to satisfy a particularly long and onerous required naming convention. This part actually works fine.

I hope to distribute this to a team that really has no interest in the internal workings of the script, so I’ve reduced it to a single node. This node has no inputs and no outputs (it actually does output a list of sheets, but I’m not anticipating the that the team use it other than to look at). It just runs on the active revit file and fills out the right parameters as noted above.

So here is my question: When I pull the custom node out of the library and run it, it works … once. In order to re-run it, I have to delete it and reinsert it on the canvas.

Is that normal behavior? Is there a known issue or solution?

Thanks in advance.


Unfortunately, that is the expected behavior for now. Every time you make a change on the canvas ( place a node, change the lacing of a node, etc.), the part of the canvas is marked as “dirty” and Dynamo knows it needs to re-run those parts. So unless you don’t change anything, dynamo doesn’t realize it has to run through your algorithm again.

My suggestion is a quick and dirty python hack. Hook a Boolean node into a simple python script like so:



Then place the python script right inside your custom node like so:




EDIT: Actually, I got a bit carried away with the random number generation thing. You could just as easily just replace the python node with a “Not” node and have the same effect.


Hey Josh,
let me try and understand what you are trying to do by showing an example that I think does what you want.
I have a custom node that Uses All Elements of Category, looking for Sheets. It extracts all currently available sheets’ element ID and writes it to the Sheet Number parameter.

Now, Every time I add a new sheet, the custom node becomes “dirty” and re-executes. That is, it is monitoring the document and refreshing itself based on changes. I’m not sure how you have constructed the innards of your node, but this model works. Interestingly, although the parameter is getting written for all new sheets, the output of the node, which is a list of the elements (which, like you mentioned is not really needed for the workflow in question) does NOT update. This is a bug.