Hello guys,
I want to sort list 2 based on list 1. Only the relationship is not known. I know that these types belong together. But I can have more types. I tried it with the sort text component but it did not work.
sort text.gh (6.4 KB)
Hello guys,
I want to sort list 2 based on list 1. Only the relationship is not known. I know that these types belong together. But I can have more types. I tried it with the sort text component but it did not work.
sort text.gh (6.4 KB)
Here is the grasshopper file
sort text.gh (6.6 KB)
Yes the relationship is random. but in this case 1G7-01-01-00 belongs with 23KP6600-011 etc
You’ll have to set up the logic somehow.
Are there objects attached to these codes?
Do you mean that the list is random but you know the relationship for each item? In that case a simple ‘Replace Member’ component will work for you.
@Kyuubimode look at this screenshot. It shows the pairs
Yup, ‘Replace Members’ is what they were looking for. It matches their expected result from here.
@Nick31 You need to basically provide a look up table since you know the relationships.
I like your approach that’s not generic. The structure ot the expected list can be random. So that means that everytime I want to do this. I have to figure out the relations and put them in the right order. That’s something I want the script does.
How is the script supposed to know? There doesn’t appear to be a logic behind how the two lists are matched. Can you explain it?