But those selected elements are all individual parts right? They need to be grouped by location - one sublist per row.
So i am trying to get the x,y, and z coordinates to do the sublist, but dynamo does not seem to be extracting the points.
If theyâre not point-based families or systems they wonât have a location point. Youâll probably have to look at the location curves.
You can use Surface.PointAtParameter to get the center point of the surfaces then sort them by location like you were originally attempting to do.
I was able to extract and sort the list by Point.X, but when i plug that information into the python script i am still getting an error. See snip below.
They need to be sorted and grouped. The python script has to know which row each part is in as well so it knows which parts are adjacent above and below. Each row should have its own sublist in the list of parts. This part is going to be tricky because your wall is not at 90 degrees.
Since I am not to savvy at Dynamo and am not sure how to continue I think I am going to abandon this project. Thanks for the help.
Youâre so close. You have your parts sorted by X, but you need to first group them by Z.
I use Sort/GroupByKey but you can use Sort/GroupByFunction as well. Once theyâre grouped by elevation you need to sort the sublists by X coordinate (using list levels).
I sorted by Z coordinates first then sorted my X coordinates. What I noticed is out of the 63 panels selected only 9 are showing up after the acquiring the Point.X coordinates. I think I got all the inputs correct, but when I run the script I still have the same colors next to each other.
Iâm only showing part of my graph there. Youâd have to figure out how it fits into what you already have. Youâll also need to sort and group the actual elements the same way otherwise you havenât actually made any changes when you apply the materials.
Hereâs everything working.
Just wanted to say thank you for all of the help. I was able to get the script to work, but still had some issues with some of the panels having the same color next to them. I assume there was something different when I translated the script from the example to project.
If you share your graph and code I can take a look at it.