Create detail line and change line style

I haven’t done much work with actually creating things in a model with dynamo. Most of my work has been setting values of parameters or creating parameters so I have no idea what I’m doing here.

I’m trying to create detail lines and change the line style. I’m using the overall script to help develop line patterns and styles. After running parts of the script that create the line patterns and styles I would like to be able to have this part create detail lines with the names of the patterns next to them.

I’ve been able to create a detail line and I think I could create multiple lines by counting the indexes in the pattern list, but I’m running into trouble with how I can change the line style.

I’m getting this error on the DetailCurve.ByCurve node. It does create the line.

I’m getting this error on the Element.SetParameterByName node. The line style does not change when I run it.

Once again, I’m totaly lost. I’m suprised I got this far on it.Revit Dev - Line Pattern Script V2.dyn (172.1 KB)

DetailCurve.ByCurve is expecting a Dynamo curve object. You’re feeding it a model curve, which is a Revit object. You can just skip the ModelCurve.ByCurve node. Those two nodes are essentially the same things, just one for detail curves and one for model curves.

1 Like

Thanks, I think I tried so many things that I didn’t realize I added unnecessary steps. Now that that this is working I have this issue.

You might not be able to set Line Style that way or you may just have to fix your list structure. Can you show a preview of all your inputs?

1 Like

I’m using hidden lines as a test I want to eventually feed it a list of line styles.

From what I’ve been able to find I think that the node doesn’t like the system object I’m sending it from the line style node. I don’t know how to convert that to an ID. All the id nodes have given me errors so far.

Probably. The error is what’s throwing me off though. Your list levels may be causing some confusion too. Try with no list level or with @L1.

1 Like

So I had to get the line style a different way to get the correct input for the last node. All I need to do now is make it work with a list of line styles that match the order of the text as well, which should be easy. Thanks for the help.


So apparently only one post can have the solution checked. This thread had two issues. Check Nick’s first post for the solution to the first problem.

1 Like