Exporting detail lines from dynamo to revit with line style

Hi all,

I wish to export detail lines from Dynamo to Revit with a certain line style. All I found was either the simple export node DetailLine.FromCurve (which has no line style) or a way to change the line style of existing Revit lines.

Goal: Exporting curves from Dynamo to Revit model lines with specific line style.

Thank you!

1 Like

Is there a solution to defining the DetailLine Style before exporting them to Revit?

You can use Element.SetParameterByName to set the Line Style parameter

1 Like

Thank you @Yna_Db, that’s helpful.

I was hoping to create the lines in a different view though.
Do you have an idea how this could work?

Not sure I get the issue, but I just have one more tip: there’s a node to retrieve all line styles in Archi-Lab Grimshaw, please see here:

The picture above (most recent) shows how I am able to export the lines from Dynamo to Revit, and this works fine. The problem is, that I can’t influence the view to which the lines are exported. I wish to export them to a different view, but don’t know how to add the “view” node before the lines are created in Revit.

In my original post, I showed the two opens of exporting lines from Dynamo to Revit. Both work fine. The problem is that the left option allows me to set the view to which I export the lines in Revit (but not the line style). The right scheme allows me to set the line style but not the view. I need a combination of both.

I hope this explains the problem a little better. :slight_smile:

Thank you!

The solution is to set the Line Style parameter value after the creation of the line: simply plug the Element.SetParameterByName node after DetailLine.FromCurve

That was my first thought too but it always results in an error. I think the reason is that “detailLine” isn’t an “element”.

It should work correctly with the node I mentioned earlier:

1 Like

Thank you @Yna_Db
It won’t work for me. Even if I simply plug in a line… (update: I took out the Z coordinate of the points to make sure the line is on the level I chose, but it still shows the same error. It creates the line but in the default setting of “Thin Line”)

Not sure that detail lines can be drawn in 3D. You could give a try with ModelCurve.ByCurve to see if it works better…

It must be a bug.
I tried everything… from a new project file, new family file. With Detaillines and Modellines it just won’t work.
I can’t believe how difficult it is to create a line in another view with a specific line style.
Did anyone encounter the same problem before?

Did you also try to change the view? It could be that you’re simply pointing to a view template…

Yes, I also tried that.

Try to change the level of the input “element” to @L1, maybe it will work then.

1 Like