List.RemoveIfNot unexpected results

List.RemoveIfNot gives me unexpected results in Civil 3D 2021. It recognizes Polylines and Blocks but not Circles and Lines. Is it a bug?**

This solves the problem, but I’m still curious.

Hi… in revit we need to do something here for lines, not sure its the same in c3d…

1 Like

@clas.kristiansen if you over the mouse on the type input port you will see the hint for the expected type, which is a string and not an Object Type.

1 Like

The dropdown nodes resulting data type is a string if I am not mistaken.

I believe that the issue is that the Dynamo for Civil team passes “Line” as the result so Dynamo is looking for a Dynamo line rather than a Civil3D Line Object, and therefore the work-around is required.

2 Likes

I noticed that it wasn’t a string, but I couldn’t get it to work with a string “Line” “Circle”.

Now I see that the string should be Autodesk.AutoCAD.DynamoNodes.Polyline, Autodesk.AutoCAD.DynamoNodes.Circle and so on.

Thanks you lead me on the right path!

Autodesk.AutoCAD.DynamoNodes.Polyline and Autodesk.AutoCAD.DynamoNodes.Circle … and so on does it.

1 Like