Help a Noob! Trying to select all detail lines of a specific line style within a project

I am trying to make a script that will select all detail lines in a project of a defined line style.
I have seen the following threads:

http://dynamobim.org/forums/topic/change-linestyle/

and have tried to bring those scripts into revit with dynamo player, in an attempt to make a workflow for cleaning up drafted lines in a model, so that they meet company standards. we always get a handful of unique linestyles cropping up - that look nothing like the existing standard linestyles. prior to making a new linestyle to accomodate the deviation, i want to be able to see how the line is being used - and if it is necessary, or if it is simply a result of someone importing a view from another file.

short of selecting all lines of all types in the entire project, and then filtering it down to the linestyle i want… It would be nice to be able to select just those line i want to inspect (Get item id → Select by ID → Show in model)

Any help you all can offer would be greatly appreciated.

Yes it is possible but can you show what you’ve tried so far.
Show your attempt and you will have some advice.

https://forum.dynamobim.com/t/how-to-get-help-on-the-dynamo-forums/4677

1 Like

Sorry about that - i did warn i was a noob :smile:
This is what i have, and it looks like its doing the right thing in the Dynamo window.

But then i save the script, and load it into dynamo player, and it makes no selection when i run it. i have tried re-entering the string contents with various line style names, and they all work inside of dynamo, but not within the player.

Hi,

For dynamo player, you have to change the name of the string and watch nodes. Be sure that the string is marked as an input.

1 Like

Okay - that definitely made forward progress. Thank you. However, it still does not actually seem to be SELECTING the lines… its just adding them to a list. Is there a way to get the lines to be actually selected so that Revit recognizes that they currently selected?

I’ve maybe what you want

Lines Player.dyn (4.5 KB)

YES!!! Thank you. Wow I have so much to learn… I had just found an Iron Python script for selecting items in Revit, and it wasn’t working… I guess that was because i hadn’t flattened the list…

So even though the results of the queries had all been single lists (0 List), it still needed to be flattened? Can you help me understand this any better, by any chance.

Thank you again for all your help.

There are many ways to handle singleton, list of elements or list of lists in python.
In this particular case, the python script doesn’t iterate the list of list.

The original issue seems to be solved.

But if you start a new topic, you will have help to change the python script.
This subject can be interesting for people who want to improve their python skills.

1 Like

Okay - thank you again!

The easiest is to use lacing or level on a custom node (.dyf)

Please mark the comment that solved your problem as a solution for future similar searches…

Where can I find the All Lines of LineStyle node? Is it part of a specific package? Thanks!

try https://dynamonodes.com/?s=All+Lines+of+LineStyle

Thanks, Marcel. However I just found the answer to my question in another thread.

It came from the Data-Shapes package.