Filter a list using values i dont want

Hi there
i experimenting with a script, and the long and short of it is, i want to know if i can filter list coordinates (points), when all i have is a list of the points i do not want. i.e. can i remove a whole bunch of items from a list in an automated by imputing the ones i want to eliminate? I am working on script where, imagine you want decrease the length of grid spans, which would increase the number of pad foundations. i want to filter out the points that already have foundations and create new ones only on the ones don’t.

i’m anticipating this may possibly need some form of coding, like python, and am willing to have a good crack.

Thanks very much!

P.S. Sorry for the typing errors. i just thought i would add, the points in list 2 are from the pad foundations and the list 1 is from the grid intersects. The only thing i have is that a number of the values will be identical and i’m hoping this can give me something to work with.


Hi @sammgking,
These nodes might be able to help you get the results you need.

All Grid Intersections

Foundations with Footing

Foundations without Footing (aka the difference)


Thanks for your reply :+1:
Ill let ou know when ive had a chance to try it out

Hi @AmolShah
This is exactly what i want. The thing is it seems to be leaving a few points in the list. I’ve tried a few things but i’m basically stumped as to why its doing that. Its funny because I think when i do it exactly as in your image it works fine (i.e. just making the area larger instead of changing the spans and moving foundations). Still, it seems funny, cant see why its not taking everything out. Any ideas?
Really appreciate it buddy

Just thought put a clearer image up

I’m glad that it worked out for you.

If you take a closer look at those 4 circled foundation, there are two foundations at each location (one small cuboid and and one tall cuboid). So you would be getting 8 points instead of 4. And since Dynamo is only subtracting the 4 points which match the grid points. So instead of being left with 55 points you are left with 59 points (55+(8-4)).

umm? not sure i follow. The smaller foundations are ones that were created by the script where it shouldn’t have. In theory it should have taken 50 values from 105 leaving 55. But for some reason it leaves four in. This is how it was before running the script. Strange??
image 2.2

Yup, strange.
Is it possible for you to share the file with just the grids and foundations?

You want me to share the model?

or the script?

The model. But both would be more helpful.

Sure. i just tried but said it was too large. Ill try purging it down and try again

How would feel about me emailing it to you? i got it down to 6k but still to big

You can do that. Or you can upload it on Google Drive, Box, Dropbox, WeShare, etc. and share the link here.

1 Like

Thanks mate. really appreciate it. would be nice but no worries if not

Hi @sammgking,
I tried everything that I could but it seems like Dynamo has some trouble understanding that those are same points!

To my surprise, it works when I convert the point to a string.
Probably a bug or we are missing out on something crucial.

@JacobSmall Can probably help us figure this out.

Why.dyn (41.1 KB)


Any chance you could you upload that script again. im interested to see what youve done but the detail is abit unclear

I’ve uploaded the script.