Filter/Remove Out Zero Length Lines

Hi Everyone,

What is the best way to filter or remove out the zero length lines in this list. I am using the lines to create Revit Column Grids. But size some lines are zero length, I am getting this error.

Thanks for the help.

you need to filter by Zero-value with Z or y it Z. or you can remove null valuewith List clean node.

Hello @_Vijay - thank you for the reply.
I can use the (Manage.RemoveNulls) after creating the Grid.Byline. This works well.

But I was hoping to filter out the zero line length values before creating the Grid.ByLine. I appreciate if you pint me to an example.

if you can share your sample file it will easy help you.

@zakim Try something like this:

Or a simple Curve.Lenght > 0 will suffice

@Daniel_Hurtubise Nope

1 Like

A one line method: DSCore.List.Clean( Math.Round( crv.Length, 6 ) > 0 ? crv : null, false );

However I wonder if maintaining the original curves would be a better method as the source lines likely have some intent which would be lost by discarding the curve. If that is the case than something like this might be more useful: crv.ExtendStart(100).ExtendEnd(100);

2 Likes

Thank you all @jacob.small @_Vijay @Daniel_Hurtubise @AmolShah for your great help. :slight_smile:
It worked very well.