Hey folks,
We’ve found an incompatibility between our Speckle Plugin for Revit and Dynamo 2.13 which is causing Code Blocks to become un-editable .
Some questions:
researching online, it seems to be a common issue, do you known what dependencies might be causing it? FYI, we’re not using RestSharp
how can we go about nailing the conflict? No errors are thrown when debugging our plugin
can you provide any guidance if we wanted to debug Dynamo itself? I managed to do so successfully in the past, but I’m not sure how to go about it now that it’s shipped with Revit
Any help apprecieted!
2 Likes
Hi @teocomi I would be looking at WPF references, icsharp avalonedit xceed etc.
You can use visual studio / debug / module window to see if any of the same binaries are loaded twice from different locations or using different versions.
Often there will be a bit more specifics in either/or the Revit Journal and the Dynamo Log file; you may want to collect both from the impacted user and see if those provide more clues.
teocomi
October 13, 2022, 12:34pm
4
Thanks Mike! Unforch this didn’t yield any results related to Speckle.
We’re not using WPF, but a cross platform framework called Avalonia.
Here is the dump of the modules, highlithed in green the dupliated ones and in red the Speckle ones: Revit 23 Modules - Speckle - Google Sheets
Any other ideas?
Anything in the log and/or journal?
Hi @teocomi - nothing obvious stands out - at the moment, unfortunately, I would not be surprised if avalonia brings in a lot of its own baggage when loaded into the same process as a wpf application.
I think it would be helpful to get the dynamo log from a user that can reproduce.
1 Like
Hey @Michael_Kirschner2 , I can repro myself!
Where do I get the log and how would I go about debugging Dynamo if I wanted? Now that it’s shipped with Revit I’m not sure where to start…
log should be under %appData%/Dynamo/DynamoRevit/Logs I believe
To debug and get debug expererience it’s a bit more fun…
you’ll need to build dynamo and dynamorevit - following:
remove the builtin DynamoForRevit addin under the addins folder, add your own addin, and then attach to Revit process.
If you just want to check loaded modules or catch exceptions you can likely avoid building anything and just attach visual studio to Revit under a debug session - but thats not going to get much functionality.
1 Like
Any updates on this? My code blocks became uneditable and found this in my Google search.
1 Like
Assuming you have that version of the Speckle add-in, try disabling it and see if it works. If that doesn’t fix it, try disabling all Revit add-ins.
teocomi
November 15, 2022, 11:04am
11
Hey @Michael_Kirschner2 @jacob.small ,
I managed to debug Dynamo Revit locally, and surprise surprise… the code blocks work pretty fine!
I used the v2.13.1
tag of DynamoCore and branch RC2.13.1_Revit2023
of Dynamo Revit.
Maybe a fix for Dynamo is already out and just needs to be shipped?
I also checked the log and nothing is showing up there:
Dynamo log started 2022-11-15 09:29:20Z
2022-11-15 09:29:20Z : Python template set to default.
2022-11-15 09:29:21Z : Dynamo -- Build 2.13.1.3887
2022-11-15 09:29:22Z : System.InvalidOperationException:
2022-11-15 09:29:22Z : There already exists an AlsoKnownAs mapping for DSCoreNodesUI.Logic.If.
2022-11-15 09:29:22Z :
2022-11-15 09:29:22Z : System.InvalidOperationException:
2022-11-15 09:29:22Z : There already exists an AlsoKnownAs mapping for If.
2022-11-15 09:29:22Z :
2022-11-15 09:29:22Z : Duplicate migration type registered for SunPathDirection
2022-11-15 09:29:23Z : AnalyticalAutomation.dll,M:AnalyticalAutomation.AnalyticalElements.AnalyticalPanel.BySurface(Autodesk.DesignScript.Geometry.Surface,System.Boolean) {0} is missing some XML documentation tags.
2022-11-15 09:29:24Z : The folder 'C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit\Built-In Packages\Packages' does not exist
2022-11-15 09:29:24Z : Dynamo will use the package manager server at : https://www.dynamopackages.com
2022-11-15 09:29:24Z : The folder 'C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit\Built-In Packages\Packages' does not exist
2022-11-15 09:29:24Z : The folder 'C:\Users\Admin\AppData\Roaming\Dynamo\Dynamo Revit\2.13\packages\SpeckleDynamo2\dyf' does not exist
2022-11-15 09:29:24Z : The folder 'C:\ProgramData\Autodesk\RVT 2023\Dynamo\2.13\packages\GenerativeDesign\dyf' does not exist
2022-11-15 09:29:24Z : The folder 'C:\ProgramData\Autodesk\RVT 2023\Dynamo\2.13\packages\GenerativeDesign.Extension\dyf' does not exist
2022-11-15 09:29:24Z : Generative Design (id: DFBD9CC0-DB40-457A-939E-8C8555555A9D) extension is added
2022-11-15 09:29:24Z : The folder 'C:\ProgramData\Autodesk\RVT 2023\Dynamo\2.13\packages\GenerativeDesign.Revit\dyf' does not exist
2022-11-15 09:29:24Z : DynamoPackageManager (id: FCABC211-D56B-4109-AF18-F434DFE48139) extension is added
2022-11-15 09:29:24Z : Backup files timer is started with an interval of 60000 milliseconds
2022-11-15 09:29:25Z : SYSTEM:Environment Path:C:\Program Files\Autodesk\Revit 2023\AddIns\SteelConnections;C:\Program Files\Autodesk\Revit 2023\en-GB;C:\Program Files\Autodesk\Revit 2023;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64\compiler;C:\Python38\Scripts\;C:\Python38\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Common Files\Autodesk Shared\;C:\ProgramData\chocolatey\bin;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\7-Zip;C:\Program Files\PuTTY\;C:\Program Files (x86)\Paragon Software\APFS for Windows\;C:\Program Files\Git\cmd;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Admin\AppData\Roaming\npm;C:\Users\Admin\Documents\Prog\cmder;C:\Users\Admin\.dotnet\tools;C:\Program Files\PostgreSQL\12\bin;C:\Users\Admin\Documents\Prog;C:\Users\Admin\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files (x86)\Plantronics\Spokes3G\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;C:\Users\Admin\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Admin\AppData\Roaming\npm;C:\Users\Admin\Documents\Prog\cmder;C:\Users\Admin\.dotnet\tools;C:\Program Files\PostgreSQL\12\bin;C:\Users\Admin\Documents\Prog;C:\Users\Admin\AppData\Roaming\nvm;C:\Program Files\nodejs;C:\Program Files\JetBrains\JetBrains Rider 2020.2.4\bin;C:\Users\Admin\AppData\Local\Programs\Fiddler;C:\Users\Admin\AppData\Local\Microsoft\WindowsApps;c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\;C:\Users\Admin\.dotnet\tools;C:\Program Files (x86)\GitHub CLI\;C:\Users\Admin\AppData\Local\JetBrains\Toolbox\scripts;;C:\Program Files\Autodesk\Revit 2023\AddIns\DynamoForRevit
2022-11-15 09:29:25Z : RENDER : Rendering Tier: 2
2022-11-15 09:29:25Z : RENDER : Pixel Shader 3 Supported: True
2022-11-15 09:29:25Z : RENDER : Pixel Shader 4 Supported: False
2022-11-15 09:29:25Z : RENDER : Software Effect Rendering Supported: True
2022-11-15 09:29:25Z : RENDER : Maximum hardware texture size: 16384,16384
2022-11-15 09:29:25Z : RENDER : Rendering Tier: 2
2022-11-15 09:29:25Z : RENDER : Pixel Shader 3 Supported: True
2022-11-15 09:29:25Z : RENDER : Pixel Shader 4 Supported: False
2022-11-15 09:29:25Z : RENDER : Software Effect Rendering Supported: True
2022-11-15 09:29:25Z : RENDER : Maximum hardware texture size: 16384,16384
2022-11-15 09:29:26Z : Documentation Browser (id: 68B45FC0-0BD1-435C-BF28-B97CB03C71C8) view extension is added
2022-11-15 09:29:26Z : DynamoManipulationExtension (id: 58B0496A-E3F8-43D9-86D2-94823D1D0F98) view extension is added
2022-11-15 09:29:26Z : Properties (id: 28992e1d-abb9-417f-8b1b-05e053bee670) view extension is added
2022-11-15 09:29:26Z : LibraryUI - MSWebBrowser (id: 63cd0755-4a36-4670-ae89-b68e772633c4) view extension is added
2022-11-15 09:29:26Z : Graph Status (id: 3467481b-d20d-4918-a454-bf19fc5c25d7) view extension is added
2022-11-15 09:29:26Z : Notifications (id: ef6cd025-514f-44cd-b6b1-69d9f5cce004) view extension is added
2022-11-15 09:29:26Z : Package Details (id: C71CA1B9-BF9F-425A-A12C-53DF56770406) view extension is added
2022-11-15 09:29:26Z : Speckle Extension (id: B8160241-CAC4-4189-BF79-87C92914B8EC) view extension is added
2022-11-15 09:29:26Z : Could not add a duplicate of Speckle Extension (id: B8160241-CAC4-4189-BF79-87C92914B8EC)
2022-11-15 09:29:26Z : Generative Design Tools (id: DFBD9CC0-DB40-457A-939E-8C8555555A9D) view extension is added
2022-11-15 09:29:26Z : PackageManagerViewExtension (id: 100f5ec3-fde7-4205-80a7-c968b3a5a27b) view extension is added
2022-11-15 09:29:26Z : Python Migration (id: 1f8146d0-58b1-4b3c-82b7-34a3fab5ac5d) view extension is added
2022-11-15 09:29:26Z : Workspace References (id: A6706BF5-11C2-458F-B7C8-B745A77EF7FD) view extension is added
2022-11-15 09:29:26Z :
Welcome to Dynamo!
2022-11-15 09:29:26Z : 00:00:00.7316075 elapsed for loading Dynamo main window.
2022-11-15 09:29:27Z : Browser Loaded
2022-11-15 09:29:27Z : WPF Render Mode: SoftwareOnly
2022-11-15 09:29:31Z : Clearing workspace...
Yeah, I have speckle installed, so I was seeing if there was an update that didn’t involve disabling Speckle every time I wanted to use Dynamo.
hmm @teocomi perhaps it’s this:
DynamoDS:RC2.13.0_master
← mjkkirschner:213binaries
opened 11:05PM - 14 Dec 21 UTC
### Purpose
do not copy test deps to bin folder
```
{ Name: \DynamoVisual… Programming.DynamoCoreRuntime\lib\MASK\Microsoft.Diagnostics.Runtime.dll, Type: Assembly, ChangeType: New, Description: N/A, Trace: N/A }
{ Name: \DynamoVisualProgramming.DynamoCoreRuntime\lib\MASK\System.Buffers.dll, Type: Assembly, ChangeType: New, Description: N/A, Trace: N/A }
{ Name: \DynamoVisualProgramming.DynamoCoreRuntime\lib\MASK\System.Memory.dll, Type: Assembly, ChangeType: New, Description: N/A, Trace: N/A }
{ Name: \DynamoVisualProgramming.DynamoCoreRuntime\lib\MASK\System.Numerics.Vectors.dll, Type: Assembly, ChangeType: New, Description: N/A, Trace: N/A }
{ Name: \DynamoVisualProgramming.DynamoCoreRuntime\lib\MASK\System.Runtime.CompilerServices.Unsafe.dll, Type: Assembly, ChangeType: New, Description: N/A, Trace: N/A }
```
these were getting pulled in because
1. `Microsoft.Diagnostics.Runtime.dll` was not marked private
2. msbuild copies the dependencies of a referenced projects even if those projects deps are marked copy local = false, if that project reference is marked copy local = true. This was the case with some test projects referencing DynamoCoreTests csproj.
### Declarations
Check these if you believe they are true
- [x] The codebase is in a better state after this PR
- [ ] Is documented according to the [standards](https://github.com/DynamoDS/Dynamo/wiki/Coding-Standards)
- [ ] The level of testing this PR includes is appropriate
- [ ] User facing strings, if any, are extracted into `*.resx` files
- [ ] All tests pass using the self-service CI.
- [ ] Snapshot of UI changes, if any.
- [ ] Changes to the API follow [Semantic Versioning](https://github.com/DynamoDS/Dynamo/wiki/Dynamo-Versions) and are documented in the [API Changes](https://github.com/DynamoDS/Dynamo/wiki/API-Changes) document.
- [ ] This PR modifies some build requirements and the readme is updated
### Release Notes
Don't distribute new dependencies of ADP tests.
can you check if any of these mentioned binaries are present in your build when you can repro?
Another thought @teocomi - try it with a Release build, not under debug - does it reproduce then?
teocomi
November 16, 2022, 9:21am
15
Thanks @Michael_Kirschner2 , here’s what I found:
none of the linked deps was present in the build were I could repro the issue
I built both Dynamo Core and Dynamo Revit in Release mode, and could still not repro the issue
Could it be something to do with the order addins and their dlls are loaded?
Latest version of Speckle doesn’t fix it but they are working on it
teocomi
November 16, 2022, 10:08am
17
@Daniel_Hurtubise @kslifter we have a workaround that requires replacing your Dynamo installation, if you’re up for it, here are the instructions: Dynamo code block not working in Revit 2023 - #13 by teocomi - Help - Speckle Community
Hopefully we’ll be able to find a proper solution soon
@Michael_Kirschner2 something else I could try is building locally exactly the same versions that was shipped with Revit and that is causing problems, can you point me to the right commits?
1 Like
yeah, that does not look correct - are you sure that you are pointing to the correct debug/release folder with the dynamo.config file in the revit bin folder?
@teocomi - can you do a test in Revit where you can reproduce this issue, what happens if you remove the GD and Player addins? - but keep Dynamo stock?