Node to Code ReplaceByCondition

Hello,

I try to “Node to code” a Dynamo Core node. But it doesn’t react.
I need to do this action several times So it will keep my script clean if i can code this part.
Maybe someone can help me with this, or a way to do this.
Node%20to%20code

Greetings,

Jesse

Hi,

Some nodes are indeed not reactive to Node to Code. I believe this is beacuse deep down, there are coded with an Imperative language, but this is only pure speculation.

One way of getting pas this difficulty would be, I guess, to code your own Imperative block in DesignScript, or to code a Python node.

Capture

1 Like

Thank you very much!

This is my end result.
Right now my lists are all together but the outcome is spread over the node. Is it possible to get everything all together this makes it even better.

We can’t read the last image. Zoom in on your graph so you can read everything easily, and use a camera export (top right corner of the screen) to create an image of the full graph at the larger scale.

Thanks Jacob for the reply.

Somehow if I press on the top right “foto camera” it will capture the total script. On my computer the picture i made this time is readable.
I hope you now are able to answer my question

We need the total graph view at the higher resolution to help here. The design script you posted doesn’t let us know what any input is so I have no means to help otherwise.

Hi Jacob,
Could you please explain me why you need the rest of the script? Because all i want to know is, how to order the script in the codeblock so all the arrows (where i go from the codeblock to the next node) are with the rest of the arrows packed together. I want result 1, 2, 3, 4 and 5 right at the top.
The first picture is connected to the second picture.

Needed to understand what the data types being processed are, as there are two options from here to ‘tighten’ up your outputs to the top of the screen.

  1. Custom definitions.
  2. Get the same result by calling another function instead.

Both require an understanding of your list structure that I didn’t have yet to do correctly. Further knowing where you’re coming from means we can attempt to simplify even further.

Knowing you have lists 3 levels deep, I would wager you could make use of list levels and lacing, using a single if statement instead of the many you’re using now. Still need that preview for what the data looks like on the code block before the one you’re compacting to know for sure. Can you explain what that function is doing, as your data is likely already in the desired format/depth? With that I should be able to righted this up quite a bit.

Thanks Jacob for your reply.

Also thank you for explaining why you needed more information. This is helps me at future help requests.
I hope i understood your reply correctly, here it goes:

Here is the excel. (I’m showing the export of list 2 Before the Code Block there are “null” as where cells are empty in the excel file). The code takes the “null” text away. This is because the next code block couldn’t deal with the “null” value. If i’m not mistaken it took over that value and put it eventually in the parameter.

Then also what happned (but i made a diffferent topic for it was that if i didn’t fill in the first line (where it says 1-5) the Dynamo code wouldn’t do anything. (maybe you have a short solution for that aswell.