Substitute Linestyles

Substitute line styles

2 min read

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.

Leave a Reply

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

Sync Room Parameters

Sync room parameters

A Dynamo workflow to synchronise instance-based room parameters, such as apartment number, nested within a Revit model group.

Rhino Inside Revit for Dynamo users

Rhino.Inside Revit for Dynamo users

Learn some of the key differences between Dynamo and Rhino.Inside Revit and discover the benefits of migrating certain Dynamo workflows to Rhino.Inside Revit.

Views from Sun with Rhino.Inside Revit

Views from sun with Rhino.Inside Revit

Learn how to generate views from the sun using Rhino.Inside Revit to visually verify the results of a Ladybug solar access heatmap.


© 2023 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.