Getting the linepattern of the lines used in the project (in all views)

Hello all,

I am writing a dynamo script to collect all the lines used in a project or in all views.

I have been able to get it through a serie of nodes (see the screenshot below!), I am also trying to get the linepattern associated to each linestyle, is there a solution for that?

The main reason I am doing that is to spot the used lines that I will replace with the right linestyle according to a specific graphic standard; also I would like to mention that I am new to dynamo! still learning the basics!

Thanks!

Hi @Z12 ,

I am not too familiar with Linestyles in Revit (and don’t have Revit installed on this pc at the moment) but most objects have these values stored in their parameters. Perhaps an Element.Parameters node (using the “LineStyle elements” output as input) could point you in the right direction about which parameter stores this value.

Then, if you have found the specific Revit parameter you can use the node Element.GetParameterValueByName node to get the parameter-values stored in those parameters. (Using the “LineStyle elements” output aswell)

PS: If the Element.Parameters node doesn’t work let me know and I’ll see if I can find anything myself.

1 Like

Hello and welcome…think Genius Loci have nodes there can help you

4 Likes

Thanks Sovitek, the nodes from Genius Loci were very useful! here is the result

1 Like

I’ve used the nodes from Genius Loci, but I noticed that instead of showing off the LinePatternElement of the line used in the views, it returns the ones present in the whole project!

Is there any solution to get the pattern only for the lines in the specific views? I know that there is a link between the GraphicStyleId and the LinePatternElement but I can’t find a node for this kind of action!

Hello…probably something…

1 Like

Thank you very much Sovitek! that’s the solution I was searching for!

Thanks,
where I can get the first node “Document.ActiveView”?
I have only one node says “Document.ActiveViewFromCurrentDocument” and it does not work.

This one is from spring package, but you can use ootb as well and should work too…Current Document-Document.active.view

1 Like