C# Dropdown

“Next week” was a bit optimistic but finally I was able to do some testing. And I got result.

There are two things you should know:

  1. It seems not possible to combine UI and Zero Touch nodes in one DLL so you need to use a seperate Solution to build dropdown nodes.

  2. It only works if the DLL is loaded via a package, not with the ‘import library’ function.

You can download a sample Visual Studio Solution below (without de compiled DLL file). Two classes are available. One to create a dropdown that returns the name of a Tin Surface as a string and one to create a dropdown that outputs the Tin Surface as object. In Dynamo it looks like this:

After building a release DLL you need to create a package, you can do via de Dynamo Package menu:

Do publish locally, not online! After that the dropdown nodes appear in the category list.

You can download the sample code here:

Sample code, VS Solution, no DLL, zipped

Good luck and happy coding! Hope it will help someone!

3 Likes