Our Speckle Dynamo plugin requires the user to click a button to work, but some folks are asking to be able to run it from Dynamo Player as well.
Is there a way we can detect from our C# node if the node is running from Dynamo Player or from the Dynamo UI?
If so we’d be able to automatically “Receive” without user input.
Note: the auto receive option is only triggered when changes are detected in the Speckle stream, so not valid for this use case.
I’m actually the one who most recently brought this up on the Speckle forums. I don’t know if it would be the same fix, but we’d also want this to work when running in GD as well. Potentially with the use of the Gate node if possible. This goes for both sending and receiving.
I’m not sure there is a great solution - but I can think of funny brittle workarounds, so I’ll share them down with the disclaimer that they are not suggestions from the player team, just my rambling.
@teocomi it is possible to identify the fact that the graph is running in headless mode.
We added some new API some time ago DynamoModel.DynamoModelState so you can check for StartedUiless.
In theory that could be some other Revit add-in that is executing the graph not necessarily DynamoPlayer. But maybe that’s even better ? If that’s not good enough “Stack Walking” should do it as Mike described above.
Sweet, StartedUiless is exactly what we need
Thanks for the help!
Unfortunately it’s only available from Dynamo 2.13 onwards which I believe is only supported by Revit 2022 and up… So we might have to create a dedicated node just for this use case.
PS
Is there an updated compatibility table like this?