I am looking for some guidance on how to properly sort a sublist by a specific property within the list of Property Set Data. I am using the Property.Value and Property .Name Nodes to capture the Data of each item. I want to sort all of the lists by the “Handle”, ascending. I do not want to sort the list of property set data
itself.
You could take the first item from each list and sort those, then find indices of the sorted tiems in the non-sorted list, and then reorder the lists based on those indices.
Pull the object’s handle (not all the property values but just the one you want) and sort the List of Objects by the Key of the property value using a List.SortByKey node.
Maybe a little clarification to what I am trying to achieve. When selecting objects from with C3D via a crossing box or selection box, the objects are sorted in a certain order. The order remains the same. When you select objects separately. the order may vary from time to time. When you export data with one selection sequence and update the data and then use a separate selection sequence to update the information in the Property sets, there are errors. Is there a way to sort the objects regardless of whether you select them individually in a different order or select them with a selection box? I can sort the selection, but I am having issues with the List.Sortbykey.
In a perfect world I would recommend that you sort the element, not the sublists of properties thereof. Once sorted then you pull the properties and get to work. Less items in memory this way.
In a less perfect world, try the ‘list’ input should be @@L3
and the ‘keys’ should be @L1
.