Hello I am new to dynamo here and I have coding background.
I am trying to make a new list to select objects that is in layer “10” and is a line.
base on the description from chatGPT I am assuming I need to check if the list 1 for list.contains elements of list 2 and output a boolean list to feed into list.filter by boolean.
there is 11 lines total and 3 in layer “10” and 1 polyline in layer “10”
the output for list.filter have in as empty and out containing one polyline
However, comparing like this is cumbersome and requires awkward logic and quite a bit of calculations, why not get all objects on layer 10 and only keep the lines using List.RemoveIfNot (or vice versa)
intersection in terms of lists means the common elements between the 2 list
meaning a list of [1, 2, 3] and [0 , 5 , 6 , 3 , 7, 10 , 1] the intersection will be [1,3]
I am assuming
object is a list of object IDs that fits the description
so I am just intersecting two list of object IDs to create a list of object ID that is a line and in layer “10”
It’s a little bit different in Dynamo
I don’t have a programmers background and started with Dynamo so I don’t think the same way, but when I start to learn about Python I find out that I understand more now after some practicing in Dynamo that I did before.
So what you want is objects of the type Line that is on layer 10?
Like this? This script select the four lines on layer 10.