Looking for arcs in a selection of polylines

Hello everyone
I am trying to create a graph that would look for arcs in a list of polylines. I get stuck right after I apply a FilterByBoolMask node, not sure how to deal with the nested lists, I guess. I’ve attached a screen shot with the graph and the results and also the DYN file.
Any help would be greatly appreciated, thanks in advance.


look for arcs 2.dyn (17.2 KB)

What outcome are you looking for? You split the PolyCurves into individual components and check for Arcs, but that has changed your list structure to be a different number of items from the original list of elements. You can’t mask the sublists back to the original list then.

It sounds like you want to filter out any element whose PolyCurve contains an Arc. In that case, you just want to know if any of the components are Arcs. You can do that by then checking to see if your list of component booleans has any true values (List.AnyTrue) or you can just check to see if the list of string components contains "Arc" from the beginning (List.Contains). That will leave you with 3 conditions for 3 elements.

3 Likes

Take a look here.
Create ArcDimension in autocad

You’ve correctly detected the problem. My list structure is changing once I explode the components. So, once the script is detecting an arc in one of the polylines, I want it to highlight/ select that polyline for me, not just the arc segment.

I’ve tried to follow your suggestions. I could not find an “List.AnyTrue” node, but I’ve found “List.TrueForAny”, however it requires a “predicate” as input, and I have no idea what that is.

Next, I’ve tried “List.Contains”, but what that does is to put everything in a single bucket. If it will find an arc in one of the polylines, it will just output “True”, with no indication as to which polyline the Arc segment was found in.

Any further hints, please ?

You’ll have to show us some screenshots so we can see what you’re dealing with. You may have to adjust list levels to get the conditions to check the sublist rather than the top level list.

Hi @pmit,

Here’s one approach that you could try.

1 Like

This looks really promising, but unfortunately, I cannot find the List.AnyTrue node. I am using Civil 3D 2001 and Dynamo 2.5.2. Can you please let me know what version are you using ?

The above was created with Civil 3D 2025.1. You could try this as an alternative approach:

1 Like

Worked like a charm ! Thanks, Jensen, not sure how to thank you enough for your patience. All the best !

1 Like