Substitute Linestyles

Substitute line styles

2 min read
Share on twitter
Share on linkedin
Share on facebook
Share on email

In Revit, line styles indicate different effects, such as a dashed or hidden line. Inevitably throughout a project, unwanted line styles will accumulate in the model. This accumulation is typically due to team members, not following standards. To ensure graphical consistency and easier management, BIM managers will generally want to consolidate line styles to the bare minimum. 


While it is easy to delete a line style, Revit will not warn you that the line style is in use. Nor will it offer you the option of substituting the line style for another. Deleting the line style will convert all model or detail lines using that style to the default <Lines> line style and make re-assigning an element’s line style very difficult. 

To solve this problem, Parametric Monkey has developed a custom Dynamo graph that substitutes a model or detail line’s line style for another. The graph, which is available as part of our Dynamo Package Development service, can be run within Dynamo Player. It requires only two user inputs – the source line style to be deleted, and the target line style.

Computational Logic

The graph first checks that the source and target line style are present in the document. If not, the graph is aborted, and an error returned. In this scenario, the user should check the spelling and re-run. Remember to ensure that you have no active commands in Revit before re-running, including closing the line styles window. Otherwise, the graph will not be able to run.

If both the source and target line styles are found, the graph collects all the model and detail lines which match the source line style and modifies them to the target line style. Due to Revit limitations, model or detail lines nested within a group will either need to be un-grouped or manually fixed. Therefore, elements which are nested within a model or detail group are excluded and returned separately for manual review. While it is technically possible to duplicate a group, modify the line styles in that group, and then replace all groups with the new group, this is too prone to errors and is best avoided.

Once all elements have been modified, and the line style no longer has any instances, the line style is deleted. 


To find out more about our Dynamo Package Development service, drop us a line and discover how we can automate your Revit workflows.

Share on twitter
Share on linkedin
Share on facebook
Share on email

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Tutorials

Documenting Stairs with Dynamo

Documenting stairs

A Dynamo workflow to document stairs by creating dimensions, number systems, spot elevations, stair run tags & min clearances.

Stair Compliance

Stair compliance

Verify stairs compliance including riser height, going length, risers per stair run & clearance between top rails.

Align Views

Align views on sheet

Use the ‘Align Views on Sheet’ Dynamo graph for a consistent graphic layout between sheets.


© 2021 Parametric Monkey
Parametric Monkey and the Parametric Monkey logo are trademarks of Parametric Monkey Pty Ltd.


Drop us a message and someone from our team will be in touch with you shortly.


Thank you for your interest. Someone from our team will be in touch soon.


To find out about upcoming public workshops or to organise a private workshop, please submit the following contact form and we’ll be in touch soon.