Dynamo for Civil3D - nodes do not appear on open

@Anton_Huizinga One more question: are you able to add the “Integer Slider” node after opening the problem script when nodes are missing?

I’ll test that if I experience the issue again.

I can confirm that missing nodes can be placed back in the script.

@Michael_Kirschner2

I do not have any third party apps or add-ins installed on Civil 3D 2020. The only item added to Civil 3D is the South African Content.

The Civiltest.dll is not going to make sense as the original as mentioned previously was meant for Civil 3D 2019. The .dll here was myself messing around with the file and testing in Dynamo 2.0. It is worth noting that I do not have any programming experience other than reading up on the basics. I will send this on PM.

The Juggernaut item is a package on Dynamo, this package did not load correctly and failed to work at all.

I am a bit further now, it seems I can reproduce. I have a strong feeling that the issue occurs when a (custom) function adds layers or blocks to the current drawing.

Steps I used to reproduce:

We have a company application with some functions that imports geometry in the drawing. One function starts a dialog and prepares the functionality by adding layers and blocks to the drawing, one other function starts a dialog but does nothing with the drawing until you finish the dialog.
I did do the following tests without any loaded dll’s or packages in Dynamo.

  1. Start C3D
  2. Start dialog one (that adds things to the drawing)
  3. Start Dynamo, open a script and voila, one missing number slider

I did this 25 times and everytime the same behaviour (and the same missing node).

To compare, I did also check the following 25 times:

  1. Start C3D
  2. Start Dynamo, open a script

Everytime Dynamo opened the script without problems.

Also to compare I did the following 25 times:

  1. Start C3D
  2. Start Dynamo, open a script
  3. Start dialog one (that adds things to the drawing)
  4. Start Dynamo, open a script

Dynamo still opens the script without trouble. So once Dynamo runs correctly, then there are no issues during that session.

To be sure, I also did test the following:

  1. Start C3D
  2. Start dialog two (that does not add stuff) and canceled the dialog
  3. Start Dynamo, open a script

Dynamo opens the script without trouble. Then I did this several times:

  1. Start C3D
  2. Start dialog two (that does not add stuff) and executed till the end where it does add layers and blocks
  3. Start Dynamo, open a script

The issue occurs again and the number slider node is missing.

So, my conclusion is: When Dynamo is not started yet and some custom function adds layers and or blocks to the drawing, Dynamo cannot load certain nodes (with other scripts it can be the Watch node, it is not only the number slider). When Dynamo has started before, then there will be no trouble with the scripts.

It’s a long story but I hope it makes clear what happens here.

4 Likes

Great information, @Anton_Huizinga, I appreciate that.

If any possible, do you have a list of dlls that are needed by your dialog one app? Or a list of dll names/versions that sit at the same folder as your app? It looks like your app will load some dll (like Newtonsolft.Json.dll) which might be conflicting/having same name as Dynamo’s, so that subsequent dll loading of Dynamo will fail.

Dialog one and two are part of the same DLL. This DLL references the following libraries:

  • Ionic.Zip.Reduced
  • SharpKml
  • SharpKml.Kmz

None of the libraries are used in these dialogs. Also there is a difference if the dialog will or will not add objects to the drawing. So I can’t imagine conflicting libraries are the problem.

2 Likes

Thank you so much! I have also been closing and opening Dynamo many times lately :slight_smile:

@Anton_Huizinga does your company script implement its own assemblyResolve handler?
https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.assemblyresolve?view=netframework-4.8?

It must also reference some UI .dlls if it creates a dialog? winforms or wpf etc?

@Anton_Huizinga Have you got an email address? I want to send you a modified version of DynamoCore.dll and let you try first. Seems I cannot send private messages yet…

Started a message for you two so no one feels pressured to post an email in a public forum (please don’t it makes me nervous that someday I’ll have to spend a year going though old posts and cleaning out people’s personally identifiable information).

Let me know if there is anything else I can do to help.

2 Likes

Thanks Jacob, I am a “new user of the month” so I had enough rights to send Angelo a PM with my personal information :slight_smile:

I can confirm the modified version of DynamoCore (2.1.1.8720) solved the issue. Several times following the steps as before and the script opens without any issue. As a test I did it again with the old DLL and the issue appears again.

@angelohbwang: I am curious what is the difference, what did you change?

Also how can I be sure there are no other issues? You can’t either of course :wink: Is it an idea to be more descriptive if Dynamo can’t read nodes? Instead of leaving them out, a warning messagebox to not save the file, or adding dummy nodes? I’d put on the console view, else I would have missed every message about missing nodes.

@Michael_Kirschner2: I was planning to set up a dummy app with the same behavior as our company app but since it is solved in the new Core, I won’t spend time doing this. Maybe Angelo can explain what he did (so we have a clue what caused the issue).

Anyway, thank you all very much for all your efforts to improve the software!

2 Likes

I have a theory to explain though the root cause is still mystery, but that is too technical… in a word, my change is reordering the code for reading dyn to be similar as version 1.3.

1 Like

Some fixes on civil 3d side has been done but it will not be available until 2020 update1. So if you want to use it earlier, you can get the AeccHydroCalcsMgd.dll file from the 2020 update 1 beta2 installer (whichever way that you can get it).

Also cc @andre.sprong

I am using Civil 2020 with Dynamo but the disappearing nodes are still there, occasionally.
Rebooting the computer often helps in my case.

I also got rid of another bug by rebooting. See here, post 10:

All in all I am finding DynamoCivil still very unstable and with a lot of ‘child diseases’ as we say

This fix should hopefully be in the next point release as Angelo said above, but if you can - use the beta it should also be fixed there.