Map to?

Hi guys!
I am just learning Dynamo. :slight_smile: So I got a list of numbers, in my case its 4100,4100,4100,100,-1600.And the second list 4500, 0.
I want to bring the number of the first list, the most close to the second.

That is the third list should look like

But I dont known how to make this real.:frowning:

For this particular case, you may try this:

Thank for answer @Andreas_Dieckmann, but it’s not what I want.
The question is how make it generaly, for any lists of numbers.

@sashka364 well, its great that you don’t like @Andreas_Dieckmann answer, but truth be told, your question makes no sense the way you are asking it. Is there logic to how you want to replace numbers? If this is a bigger application please provide more examples and use cases so that we can identify the logic.

1 Like

@Konrad_K_Sobon @Andreas_Dieckmann my bad :slight_smile:

I have a certain level in the model, and somewhere in the model space, I scattered beams. I want to identify these beams at the closest level to them.


My proposal is an alternative version of Vikram’s:

Wow! Thanks!
I hope you knew how to solve it in advance, because it seems very tricky to me. How are you getting to it?! It’s really smart and easy in same time, thank you!

It’s more about knowing which tools are available and how they could potentially be used than knowing how to solve the problem.

Ready made / canned solutions are rare :slight_smile:

I know it’s already solved, but why not be a bit abstract about it? :slight_smile: