Not working with Dynamo Player Anymore 😣
Opened this issue · 3 comments
@2adicted has noticed that the player is not triggering our tool. he went on to investigate a bit and it seems that the Player can be incorporated into a Dynamo Extension, but ours is a Dynamo View Extension...
The plot thickens...
@2adicted mentioned it might go to the fact that the 'GraphRunCompleted' or whatever the name of the event was called .. is not working.
The dynamo player is possibly loading dynamo without the "UI" (DynamoView), therefore it does not load a "ViewExtension". You would need to switch anything that is part of your extension trigger to the "Extension" side. Though if you did this it could break parts of your code that relies on parts that are only available in "ViewExtension" and not in the "Extension".
A simple Test would be to create a normal Extension and get it to say write a text file if it is ran or maybe a popup message. If you see this after running dynamo player then this would be why.
Also double check where your extension is saved to in debug and release stages, because you could be just putting the extension within the package folder for dynamo core. Though a copy will need to be within dynamo revit as well for it to run when revit loads dynamo.
Have a look at the following that could help guide you along https://github.com/DynamoDS/DeveloperWorkshop/tree/master/CBW227911%20-%20Control%20Dynamo%20from%20the%20Web/Exercises/HelloDynamo
Or a lot of info could be found here https://github.com/DynamoDS/DeveloperWorkshop
Hopefully it make sense >.<
You are 100% correct mate. The thing is, we do rely on the Dynamo View Model to provide us with a hook to the OnEvaulationCompleted event. This is in itself a workaround and a hack, to begin with.
Currently Dynamo does not expose any event that is associated with running a graph, which is quite restricting. Unless there's a different route we can take, Dynamo Player might be off limits for the time being.
Currently Dynamo does not expose any event that is associated with running a graph, which is quite restricting. Unless there's a different route we can take, Dynamo Player might be off limits for the time being.
We may not need the EvaluationCompleted
event for Dynamo Player. I think Dynamo Player reopens a new Dynamo instance for every run so we can probably just use the default extension Loaded method? We'll just need to find a way to determine that Dynamo Player is the current context?