Monday, March 07, 2016

Line Styles Embedded in Families

Reading a thread at AUGI tonight prompted this post. Line Styles aren't a thing in Revit families, the option is disabled if you attempt to review them while in the Family Editor UI.

The family discussed in the thread seems innocent enough until it is loaded into a project file. These are the line styles that are in the default template (imperial).

This is the same dialog after loading the family; nearly 100 more (98) line styles show up.

The culprit is Transfer Project Standards (TPS). It is easy to transfer line styles from a project to a family. We need Object Styles in families not Line Styles. Make sure you don't select Linestyles when/IF you use TPS.

If you've already got many rogue Line Styles you can delete them from the project and in Revit 2016 you can select more than one at a time and click Delete. Just remember if Delete is disabled then you've got a built-in (system) line style selected.

What about cleaning out the family itself? They don't give us a tool to do that. Purge Unused doesn't see them unfortunately. Robert Bell, in the AUGI Thread, offers a solution though. Load the bad family into a empty template (choose the None option for example). Delete all of the line styles you don't want. Then Save the family and overwrite the original. If the family is already loaded into your project just do the same thing, delete the line styles (it's just a little harder to tell) and Save the family to overwrite the original.

While you're at it, don't use TPS on Line Patterns, like shown in the image above. You'll probably get many more than you really want too. Those can be deleted a bit more easily though.

I checked the Autodesk Exchange Apps site to see if any offer a way to purge line styles from families. I found one that does it for projects but none that claim to do it for families; at least not based on searching for that criteria. It might be something Dynamo can be used to resolve; I'll have to check into that.


Update 08/22/2016: Dale Bartlett has shared an app to purge these embedded line styles. He writes:

Please download It works for Revit versions 2014, 2015, 2016, 2017.

It is a simple but useful utility, so any feedback or comment would be appreciated.


Anonymous said...


Philip Chan said...


I do remember seeing someone post a Dynamo solution to delete linestyles.

Steve said...

I only found ones that deal with line patterns, not styles and they seemed focused on projects. May be wrong.

Anonymous said...

Check out CGS Tools.

Steve said...

It doesn't specifically say it works in families. One other tool I've tried only works on projects. It may not be accessible from the API?

Anonymous said...

I have used the CGS tools in families and tested with the file from AUGI forum. They some nice tools.

Steve said...

Thanks for letting me know.

Dale Bartlett said...

Hi Steve, I am very pleased to see this issue raised. Attached is a tool I wrote specifically to clean up un-purgeable family line styles, with a few enhancements.
Currently for 2014 and 2015, I will include a 2016 version early next week. I am not overly altruistic, but want this to be a small measure of thanks to yourself and others who provide a wealth of information to the community at large. Regards, Dale

Steve said...

Very kind of you Dale, thanks!

Matt Fleming said...

The Download link doesn't work to that zip.
Is there another one or better yet something for Revit 2016 kicking around?

Dale Bartlett said...

Hi Matt, I will update for 2016 this weekend and re-post the link. Dale