Scaling by percentage

I am new to Dynamo and I am trying to create a script that scatters elements rotates and scales elements randomly.

I’ve edited some existing scripts and I have an issue, if you see the attached image below:
I am trying to get the initial values of the parameter called “Height” of the families and multiply them by two numbers (0.8 and 1.2 - the second I forgot to fill out in the example) and to create a minimum and a maximum value that would work as minimum and max percentage. When I try the red version in the image only some instances of the first family are scaling and the others scatter but have the same height.
When I use the Code Block marked with green everything works fine, but the result is not the desired one.

Could please anyone help me?


I think it’s a list issue, and turn the “Math.Remap” node “Newmax and Newmin” entries @L1 and check your. Then change the “Element SetparambyValue node” to “Lacing>Longest” if necessary.

If your problem persists, please share an image as your lists are open.


Can you show us the outputs of all your nodes in the red section?

Thank you for your fast answers!
Durmus_Cesur, I don’t quite understand what you mean. I have changed The “Newmax and Newmin” to @L1, but I don’t know what you mean further.


Yeah, I’m guessing your list structure is all messed up. You’re getting sublists of sublists with your new range. Look at all the outputs of your nodes: Are they what you were expecting? Do they make sense? It’s hard to tell you what’s going on when we can only see a small portion of your graph.

If I replace the red rectangle with the Code Block in green from the first image it works fine but with those values and not with a percentage of the “Height” parameter. Does that mean that the problem is there, in the red rectangle?

Like I said, it’s likely due to your list structure and how you’re handling the data. You’re Height values come from 3 family instances but you’re trying to apply them to 24 elements. Those Height values are also in separate sublists which is causing problems with your ranges. Try to make your list structure and quantity match between your elements and their values.