Get Total Length of Line Type in Active View Only

I am struggling to add a filter for selected line styles in active view only, the graph collects all selected line type in the project, is there a way to add a current view or select a view. Greatly appreciate your help:

Assuming you mean Detail Lines, you can get the OwnerViewId and match it with the active view. There are also custom packages with nodes for getting elements in a view or checking visibility based on view.

1 Like

Not just Detail Lines, it could be Model line too. I can change the script to filter elements in active view, but then i can get name of those specific lines. I hit a wall when it comes filtering them out.

Hello


cordially
christian.stan

1 Like

Since model lines are not view specific, you would have to use a method that checks based on visibility. This can still be a little tricky as elements can be “hidden” in a view in ways that they’re still technically “visible”. Getting them based on view like the node @christian.stan suggested is still your best bet.

2 Likes

This works, thank you, however, now it calculates the totals of all lines in selected view. Getting the ids to match seems to fail:

1 Like

You are asking for Element.Id on a text output (plug into an element)

cordially
christian.stan

1 Like

This works @christian.stan Thanks, just a quick question though, is there a way to group the same types together instead of showing individual results:

1 Like

You can use group by key to group with lineType key
edit:

cordially
christian.stan

1 Like

Your looks a lot cleaner :smile:

Mine is an ugly attempt of getting those names and param together:

Thank you for your help, Ill try your vresion.

1 Like

the main thing is to try and understand (the connection of incoming and outgoing at each node, what do I have, what do I want to send, how to transform it, these are the questions that I ask myself posed at each stage),
remain humble,
everything has been through the beginning except the designers (there must be many exceptions)

Cordially
christian.stan

1 Like

Totally on board with your comment. :grinning:

Managed in the end to get the final output, by grouping lists of outputs:

Thank you for you for your help!

1 Like