DynamoDS / RefineryPrimer

This primer is an on-going project to share the fundamentals of generative design
Apache License 2.0
91 stars 39 forks source link

output from custom zero-touch does not shoe up in generative deisgn #60

Closed HadiMoosavi closed 2 years ago

HadiMoosavi commented 3 years ago

Hi There, I found your profile at this website and I thought you might be able to help me out.

I have a very simple zero-touch node which works smooth in the dynamo graph both in Revit Dynamo and Sandbox. However, when I export to GD for generative design, its output value shows up as * which means GD does not observe any value for it.

Is there a specific setting or reference that I should add before building the dll file in visual studio? I have also added my question to the forum here: Zero touch node gives GD no output - Generative Design - Dynamo (dynamobim.com) you can find more information there. I should be grateful if you could help me with this.

Thank you

nate-peters commented 3 years ago

Hi @HadiMoosavi,

When working with custom zero-touch nodes, you’ll need to make sure you’ve set up your nodes like a “real” package, similar to what you’d expect for a package that you’d download from the Dynamo Package Manager. When the Dynamo extension for GD collects the packages used in your graph, it’s going to look in the folder locations specified in the “Manage Node and Package Paths” menu. If you added your custom library with the “Add Library +” icon, the extension won’t find your zero-touch nodes.

You can use the tools in Dynamo for Revit to turn your zero-touch nodes into a local package – you aren’t required to actually upload your nodes to the PM for them to work with GD.

See "Publishing a Package Locally" in the Primer: https://primer.dynamobim.org/11_Packages/11-4_Publishing.html

HadiMoosavi commented 3 years ago

Hi again, I published it locally but still in GD, I am getting * (no value) out of my node. I am not sure why GD does not see my node.

Hadi On Jan 25, 2021, 8:21 AM -0700, nate-peters notifications@github.com, wrote:

Hi @HadiMoosavi, When working with custom zero-touch nodes, you’ll need to make sure you’ve set up your nodes like a “real” package, similar to what you’d expect for a package that you’d download from the Dynamo Package Manager. When the Dynamo extension for GD collects the packages used in your graph, it’s going to look in the folder locations specified in the “Manage Node and Package Paths” menu. If you added your custom library with the “Add Library +” icon, the extension won’t find your zero-touch nodes. You can use the tools in Dynamo for Revit to turn your zero-touch nodes into a local package – you aren’t required to actually upload your nodes to the PM for them to work with GD. See "Publishing a Package Locally" in the Primer: https://primer.dynamobim.org/11_Packages/11-4_Publishing.html — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

HadiMoosavi commented 3 years ago

I also noticed this notification.

Sent from my iPhone

On Jan 25, 2021, at 8:27 PM, hadi.moosavi@me.com wrote:

 Hi again, I published it locally but still in GD, I am getting * (no value) out of my node. I am not sure why GD does not see my node.

Hadi

On Jan 25, 2021, 8:21 AM -0700, nate-peters notifications@github.com, wrote: Hi @HadiMoosavi,

When working with custom zero-touch nodes, you’ll need to make sure you’ve set up your nodes like a “real” package, similar to what you’d expect for a package that you’d download from the Dynamo Package Manager. When the Dynamo extension for GD collects the packages used in your graph, it’s going to look in the folder locations specified in the “Manage Node and Package Paths” menu. If you added your custom library with the “Add Library +” icon, the extension won’t find your zero-touch nodes.

You can use the tools in Dynamo for Revit to turn your zero-touch nodes into a local package – you aren’t required to actually upload your nodes to the PM for them to work with GD.

See "Publishing a Package Locally" in the Primer: https://primer.dynamobim.org/11_Packages/11-4_Publishing.html

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

HadiMoosavi commented 3 years ago

Hello Nate,

I tested sth. In my graph I have some nodes (from my package) that have output that are in the types (classes) that I have defined in my code. For example, look at these three nodes below. In dynamo they run well and they do not have null values. But when I watch the output in GD their output appear to be all null. Even if their value is constant an not dependent on the inputs.

Is this a rule that I should follow: keep and use all custom classes inside the nodes and make node outputs limited to types GD likes such as int, double, list, dictionaries, bool?

Thanks,

Hadi On Jan 25, 2021, 8:21 AM -0700, nate-peters notifications@github.com, wrote:

Hi @HadiMoosavi, When working with custom zero-touch nodes, you’ll need to make sure you’ve set up your nodes like a “real” package, similar to what you’d expect for a package that you’d download from the Dynamo Package Manager. When the Dynamo extension for GD collects the packages used in your graph, it’s going to look in the folder locations specified in the “Manage Node and Package Paths” menu. If you added your custom library with the “Add Library +” icon, the extension won’t find your zero-touch nodes. You can use the tools in Dynamo for Revit to turn your zero-touch nodes into a local package – you aren’t required to actually upload your nodes to the PM for them to work with GD. See "Publishing a Package Locally" in the Primer: https://primer.dynamobim.org/11_Packages/11-4_Publishing.html — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

nate-peters commented 3 years ago

Are you attempting to set those custom datatypes as outputs in your graph? GD only supports number values at outputs.

HadiMoosavi commented 2 years ago

Sorry for the late update. I think I found the issue's root. After building the node in Visual Studio, the zero-touch node gets updated in Dynamo. But when the GD is run, the updated zero-touch node (i mean the updated package and dll files) do not necessarily get copied to the GD folder location. This is because the package name and the node name do not change and I think Dynamo assumes there is no need to copy them again. A workaround is to save the Dynamo file with a different name.