RemoveIfNot in Python Script

Hi guys,

Someone could tell me how can I use the Dynamo function “RemoveIfNot” in a PythonScript?. I have a list from an intersection between a plane and a curve, so I only need the points as result of the intersection, but sometimes I got a line and I want to remove it from the list, how can I do it?

 

Thank you :slight_smile:

You can reference some of Dynamo’s nodes in Python but I don’t think it’s possible to reference built-in nodes. Tho you can always write your own little function, Maybe something along the lines of this:

2015-06-18_11-05-09

Thank you a lot! You helped me so much! It really works well, I didn’t know the “GetType()” method in Python is quite functional.