Dynamo Query node / Csharp property

Hello folks,

I’ve recently started to shaping my ZT package. So far all nodes are listed as “action” nodes, with the thunder sign. In my C# code, I have only methods. I would like to make it more intuitive.

My first property needs no input. But it has input in Dynamo.
The input name is the name of the Class. (Why it begins with a small letter ? :smiley: nvm)


The property works whan I plug the default “class node”, which should be “private” in code. Without this a node says “Function”. The input “teklaNodes” appers in the node because there is a reference:
var model = TeklaNodes.ConnectToModel(); ??

Is it possible to have a “Query” node without a input? The references (from inside the class) in the property determines the inputs in Dynamo nodes?

ps. Is there a workaround to have a multi output from “property”?


ps2. I’m also struggling with lunching package on dyn 2.x instead 1.3, but I’m not giving up yet ; )

Regards
M

2 Likes

No you cannot implement a query node (getter) without an instance.
Your getter here is pretty strange. (non idiomatic c#)

A property is intended to access an instances’s properties :slight_smile:

It looks to me like you want to implement a static method, this won’t add any extra inputs to the node.

see this for some info:

also you might still be able to make the node appear as a query node using an attribute:

3 Likes