Extending Revit functionality via User based Events?

Does DesignScript/Dynamo have Event Procedural functionality even if it is limited?
…is there functionality to respond ‘Dyn-Automatically’ to what user is doing in Revit and take appropriate actions?

Like if a user clicks on ‘new in place family’ you get a pop up saying ‘no you can’t do that?’

So my graph overrides dimensions in view according to whether they are a brick dimension… If someone pulls a door across 10mm we want it to re-run…

I believe some actions do trigger this but I couldn’t get it to work…

Apologies,

Mark

I haven’t tried it, but you could try to use a periodic evaluation method in that case, using a for of a ‘wait for’ node to force re-evaluation of all elements upstream every day 3 seconds. However, the users would have to open the graph and start it running. And it will impact performance.

Feed the DateTime.Now node and a Categories node which has been set to feed the dimensions category into a List.Create node and then onto a List.First or List.Last item so the output would be the dimension category. Every node upstream would re-evaluate as a result. Best to make a single codeblock for all but the DateTime.Now and categories nodes though.

Periodic evaluation could work, but dynamo in my opinion is not the right tool for this. You’d have to have the same script open all the time and I’m not sure you can subscribe to events through Dynamo (even if you can, I wouldn’t) so would have to be full runs at every interval. It would be better to have a dedicated plugin that listened to these events and did something in response or which runs some code when user is not doing something (idling) or a dynamo script to check and update what you need in one run.

1 Like