I’m struggling with some ghpython and it is because it somehow does my calculation 32 times instead of 1 so I get a weird answer. The reason it does it seems to be linked to the highest brep number (Since I have breps for walls, windows, floors etc.). As you can see on the picture I try to calculate the line lenght of the edges of the floor (basically the circumference) and the correct answer is 160 as I get, but when the walls are connected to the scripte it gives me a list of 160 and a length of 32. Hopefully the picture shows it - I think this might be a common mistake that you guys are familiar with. For information I have changed the inputs in the python module to take breps
Thanks for your time, have a nice day.
I think your inputs need to be handled as lists, please post your GH file
I think I tried that already, but I have uploaded the file with this message so you can check. Thank you
WindowCalc_python_simple.gh (85.2 KB)
right click on each of the 4 inputs and set List Access, this way Python component will recognise each input as a single List of things (if you don’t do so, because you have 32 items as input in ‘walls’, the Python component will execute its code 32 times)
 you don’t have to necessarily set ‘list access’ to all the inputs blindly, it just depends on the type of behavior you want the script to have, for instance in this case you might just want to set ‘walls’ with List Access and the component will work, but I feel like you might want to use lists on all of them
Thank you so much I only did it for the ext_floors before ^^ And of course it was the walls being the problem.