DynamoDS / Dynamo

Open Source Graphical Programming for Design
https://dynamobim.org
Other
1.72k stars 632 forks source link

EngineController is null #5469

Closed ksobon closed 9 years ago

ksobon commented 9 years ago

I am looking to replicate the functionality that Get Family Parameters node allows for but in, but in a little bit different context. Anyways, for some reason if i just straight up copy your code for that node into my own library of ZT nodes it doesnt work. When Debugging it comes down to Engine Controller being null. I realized that you reference in Dynamo.Engine to obtain that particular class. In Dynamo version 8.2 (last stable) Engine Controller lives in Dynamo.DSEngine. Are there any particular differences in how those two classes work/should work and any ideas why I get null for it?

image

The bottom one is using reference to .DSEngine while top is your OOTB node that according to GitHub still somehow manages to get the .Engine and works properly. Any ideas?

https://github.com/DynamoDS/DynamoRevit/blob/751bb2f680ba5be45cdbb6dbb19647af39a1ecc8/src/Libraries/RevitNodesUI/RevitDropDown.cs

Any help with this would be appreciated. Thank you,

@mjkkirschner @ikeough

mjkkirschner commented 9 years ago

Hi @ksobon the engine controller is actually set in the node view customization, its not set anywhere in this file that you linked.

look here: https://github.com/DynamoDS/DynamoRevit/blob/Revit2015/src/Libraries/RevitNodesUI/FamilyInstanceParametersNodeViewCustomization.cs

did you also copy this customization?

ksobon commented 9 years ago

That was it! Thank you.