Hi! I’m a student and I’m puzzled with a problem in my project for so many days.
Is there any way to build a special componentA to get the data from my chosen componentB, including the special parameter of it and where this component is linked to (the address of compoentC),? Only then can I do a recursion to get the whole relationship of this node network and construct a Directed Acyclic Graph.
I knew Metahopper can make it. But I have to make this in C# to make sure that it can work in my project.
It should work like this figure below:
If this means that you want a 100% C# solution … well … forget A to B (or to Z). Just post here what you have done and a very explicit description of your goal (i.e. is a Graph of some sort the target? or something else out of the Graph? etc etc).
Oh, in fact I would like to know if there is some kind of API that can help to achieve the following requirements:
This algorithm should allow a particular grasshopper node to dynamically identify all the parameters of the node it is connected to, and output them. At the same time, it should allow to recursively get the parameters of all the nodes that follow the initial node (just like a chain) , the second node , the third node … one by one, in the same way.
Due to my poor English, these words are from Google Translate… Or if it’s still to hard to convey my need, maybe I can say it more shortly:
I know there are some nodes in MetaHopper that can help to read a group of Grasshopper nodes., and read their parameter input one by one. Now I need to learn how it works, so I can embed the algorithm in my vs project and build a similar node
Ohhh Thank you! It did work!
But there is still a small problem remained and I do not know how to deal with.
It can only read the input of the component, and read the input of the input, etc. So the recursion can work to read the chain of nodes. But since the grasshopper nodes are arranged from left to right, so the best way is to read also from left to right, which means it would be better to read the output, the output of the output, etc.
But actually when I try to replace the Output with Input in the script, it came out that there are no nodes connected to the c# node as the output and the Output.ScourceCount is 0…But it’s clear that a gradient node is connect to the C port (output) . But I cannot figure it out…QAQ
Thank you ! I hate my poor English that makes my words of appreciation pale and powerless. You really help me a lot.
And I feel happy that we have the similar habit of naming temporary Component as Meow~~