Hi experts,
I was trying to use the List.setdifference node but it doest not work for me. Can you guide me where am I going wrong.
Hi experts,
I was trying to use the List.setdifference node but it doest not work for me. Can you guide me where am I going wrong.
If you showed the node previews it would help us understand what you’re dealing with and would likely show you where the problem lies. Alignments
already returns a list. By “creating” a new list for that information, you’re really just adding another list dimension. Now your inputs are the wrong structure and the node thinks you’re looking for a list of lists. Creating a list for the selected alignment is correct, because the selection is a single object but SetDifference
requires a list input.
here are the previews. What I am trying to do is remove the selected alignment in the list. basically I want to delete all alignments except the one that is selected.
Remove the List.Create between Alignments and List.SetDifference, it is possible you are comparing a list to the selected alignment
what will be the better approach? i wanted to delete all alignments except the one selected. can you guide on what nodes to be use. Thanks a lot for your time.
Try this:
Notice above you have a list of lists of alignments (@L3), while below you a list of one alignment (@L2).
If that doesn’t work it’s because of what you’re comparing, not the real object but a reference to it built in Dynamo two separate ways. Comparing handles and using a List.FilterByBoolMask will do the trick if that is the case.
Hi I am a beginner, can you enlighten more about comparing handles and List.FilterByBoolMask. I have tried your suggestion and still it does not work.
This will do the trick and should work for all supported Civil 3D builds without any dependency on a 3rd party package or a node with breaking changes:
hi Jacob that works great! thank you so much. now one more thing how do I go about deleting the filtered alignment? the Object.Delete node will not work after the List.FilterByBooleanMask results.
I am guessing we need for convert back the Handles into alignments.
Hi, you need to feed your objects (List Before Python 1, you must keep python1) , not your strings, into the List.FilterByBoolMask.
Sincerely,
Christian.stan
oh my!.. now i understand. Thanks a lot!