# List.RemoveIfNot unexpected results

**URL:** <https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147>\
**Category:** Civil 3D\
**Created:** [January 11, 2022, 12:08pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147 "2022-01-11T12:08:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![clas.kristiansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/clas.kristiansen/32/125076_2.png) [@clas.kristiansen](https://forum.dynamobim.com/u/clas.kristiansen)\
**Post date:** [January 11, 2022, 12:08pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/1 "2022-01-11T12:08:08Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e03089bcfe37b429712d0c171b2a6c72b963971c.png)

---

<div class="post-metadata">

**Author:** ![clas.kristiansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/clas.kristiansen/32/125076_2.png) [@clas.kristiansen](https://forum.dynamobim.com/u/clas.kristiansen)\
**Post date:** [January 11, 2022, 12:19pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/2 "2022-01-11T12:19:59Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/9/09a956f66028632330184ad99f1375a433177729.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [January 11, 2022, 12:23pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/3 "2022-01-11T12:23:56Z")

</div>

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

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/007ead8d079b91b74a9c12814102394ab98395bb.jpeg)

---

<div class="post-metadata">

**Author:** ![Paolo\_Emilio\_Serra1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paolo_emilio_serra1/32/12902_2.png) [@Paolo\_Emilio\_Serra1](https://forum.dynamobim.com/u/Paolo_Emilio_Serra1)\
**Post date:** [January 11, 2022, 1:10pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/4 "2022-01-11T13:10:10Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [January 11, 2022, 1:31pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/5 "2022-01-11T13:31:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![clas.kristiansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/clas.kristiansen/32/125076_2.png) [@clas.kristiansen](https://forum.dynamobim.com/u/clas.kristiansen)\
**Post date:** [January 11, 2022, 2:29pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/6 "2022-01-11T14:29:38Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/3/a3a594a787cf6ccfb587620705b58a2d65842ab8.png)

---

<div class="post-metadata">

**Author:** ![clas.kristiansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/clas.kristiansen/32/125076_2.png) [@clas.kristiansen](https://forum.dynamobim.com/u/clas.kristiansen)\
**Post date:** [January 11, 2022, 2:31pm UTC](https://forum.dynamobim.com/t/list-removeifnot-unexpected-results/72147/7 "2022-01-11T14:31:49Z")

</div>

Thanks you lead me on the right path!

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