please try checking in the dynamo console for errors.
Also it may be some addin in 2018 causing conflicts with json.net - I would try first disabling addins or finding the difference between addins in 2019 / 2018.
I checked the console I was getting errors like this: This graph has a nodeview with id:03890bcc-a32c-46d1-9812-3e34adbdcb4c and name:String, but does not contain a matching nodeModel
After removing all addins and installing them back one at a time, I can confirm the error is caused by PyRevit. I will follow up with them to resolve this.
indeed - pyrevit uses a newer version of json.net -
We (dynamo team) advise using the same version as revit (9.0.1) if possible - (and definitely not shipping another one) - this is likely to cause issues at runtime.
Is there a way to point Dynamo to the json.net it likes so the one in PyRevit doesn’t confuse it? I am also having nodes disappear and I would like to use both tools.
we’ve tested 8.0.3 and 9.0.1 with dynamo and these seem to work okay. Newer versions loaded into the same app domain first seem to cause issues when using json .net attributes at runtime… we may be able to hack around this by either not using attributes or comparing attribute names as strings, but long term other solutions will be required like separate app domains, or IPC. For this specific deserialization issue - I’m hoping there is a way to unify constructors to do the right thing even if the json constructor does not get called, but it will take more research and probably a context parameter.
Team,
Multiple DLLs can be loaded into the application when their version and signature is different. (Currently I have Newtonsoft.Json 9.0.0.0 and 12.0.0.0 loaded in my Revit 2018). The responsibility is on the calling app to make the binding specific to that version. Dynamo, as a professionally distributed application, should be specific in its bindings and reference the exact DLL version that it needs to work. Otherwise it will default on the currently loaded (in case of Newtonsoft.Json, pyRevit loads that on startup - although pyRevit loads later than Dynamo it loads all its DLLs on startup.) which could be the incorrect version.
It seems like the problem is not in Newtonsoft.Json lib. Listing of loaded assemblies shows that it is loaded from Revit folder (for 2018 - version 9.0.1). Removing this dll from pyRevit does not help either. Anybody have ideas how we can find a solution for that?