Hi Everybody,
I have made some zero-touch nodes and they work fine in dynamo. see below.
The final output of them is simply 0 or 1. I would like to use this output as a constraint in my GD design.
The only input from outside is a single CSV file which I have used it to populate data.remember node and froze it.
However, when I run the GD the output from my node is shown as * which means it does not provide GD with any value.
I think I am missing a very simple step that I am not aware of.
Could someone provide some advice?
Are there any calls to external APIs which Dynamo cannot access? Does this run perfectly in Dynamo Sandbox?
1 Like
I tried to open SandBox. Is it automatically installed with Revit? I went to the DynamoCore folder and clicked it but nothing opened. I also tried to download it from website. but the website seems to be down.
these are all the references i am using.
No it is not.
Website is up for me - you want 2.6 from here for this use: https://dynamobuilds.com/
Just tested the graph in the sandbox. It works fine. I had to install my package. here is the graph
test.dyn (43.0 KB)
Here is the package. You just need to change the dyn extension to zip.myStructuralCalculations.dyn (9.4 KB)
I meant the graph works fine but not the GD. same issue.
2 Likes
By the way,
in my C# code I am targeting .NET Framework 4.8.
Is that fine with GD?
Since this is my first time using my own zero-touch node in GD, I did a simple test.
I made a simple node according to this:
Getting Started · GitBook (dynamobim.org)
and created a node.
But I can not see the output in GD. it shows *.
Is there a setting or reference that I should use when building the dll in Visual studio?
So… I think I solved it. There is a number slider (or perhaps several such sliders) which return a null value when pulling data from the dictionary, which causes everything upstream to fail, which causes a null result for the full graph, which Generative Design is interpreting as a 0 when tabulating results, which means the genetic algorithm is seeing the 0 and thinking ‘oh that was good, do more of the thing which creates the failure’ and so you’re only getting ‘null’ results on optimization…
Two things to do to test this on your end.
- Add a code block as follows after the ‘check’ watch node, which will produce a Green Circle if your design worked, or a Red square if there was a null value.
a!=null?GeometryColor.ByGeometryColor( Surface.ByPatch( Circle.ByCenterPointRadius( Point.Origin(), 10 ) ),Color.ByARGB( 255,0,255,0 ) ) : GeometryColor.ByGeometryColor( Surface.ByPatch ( Rectangle.ByWidthLength( 10, 10 ) ), Color.ByARGB( 255,255,0,0 ) );
- Export the graph to Generative Design, and run a cross product study on the ‘integer slider’ input.
The settings in the test run should look like this:
And the outcomes will look like this:
1 Like
So I used your useful debugger for correcting that upstream problem. it was my python script after to make the dictionary causing that issue. I solved that part. Thanks a lot.
I put your green/red debugger after the nodes which have outputs of my custom classes; like this one.
In Dynamo it gives green circle but in GD it gives red square for all cross product values. the interesting thing is that its value is constant and is not a function of the inputs.
Is this because output of the node is sth that GD does not know and does like so it just considers it null?
I mean I think whatever custom class I have in my code should be used inside my node and should not show up in the graph as output or input. Am I right?
However, you do not seem to have that problem because for “check” you are getting at least 0 not *.
Please check my new package and graph.
myStructuralCalculations.dyn (6.2 KB)
test.dyn (50.9 KB)
like before, the first file’s extension should be changed to zip.
Thanks
I also tried what you said for the graph I sent you before: I put your debugger after the bad python code I had. See what I get
It is very similar to what you are getting except that I am getting * instead of 0 for “check”.
and if I put it after “check”, I will get this.
Correct.
I was running this in Dynamo Sandbox, not Revit, but functionally the same build.
I’ll try and have a look tomorrow evening.
1 Like
Hi Jacob,
I was able to find the problem (maybe we can call it a bug).
When we export a graph to generative design, GD makes a copy of the graph an a folder that contains the included packages used, into a folder called something like “AEC generative design” in C drive. But, I think, when it wants to refer to that package, during GD, it looks for it in the whole “AEC generative design”.
Now for somebody who uses predefined packages this does not issue a problem.
But in my case, since I was developing a package and trying it as it was developed, the “AEC generative design” folder had several instances of that package which caused GD go wrong. But That’s only what I think.
I went to “AEC generative design” folder and deleted all of its contents and exported again and it worked fine.
Thank you again for the help and the useful green/red debugger. I will be using it often.
3 Likes