Calculate Totals in Active View

I am trying to calculated totals of selected elements length in active view, but for some reason its counting in entire project:

The “All Lines of LineStyle” node pulls all lines in the entire project and not the active view. You can set up a filtering mechanism as shown below. There may be a better way, but this works with what you have already setup.

1 Like

Strange, it throws an error in my case:

Are you selecting manualy or through data-shapes ?

Sorry was away from my computer. Weird. It’s thinking the Select is an input and not a function. You can remove the “lns =” in front of it as shown in line 3 in the image. I was doing some other testing and forgot to remove it before posting. If that doesn’t work, try adding “Revit.” to the front as shown in line 4 in the image. Lines 3 and 4 are doing the same thing, so you won’t need both.

1 Like

If you can’t get the code block to work correctly, you can just use OOTB node as shown.

image

1 Like

This is great Samuel! Let me try to select this way. Thank you for your help.

1 Like