Hi guys, I've spent a while lurking in this forum but this is my first post here! Hopefully it goes ok - I ran a search but haven't found a solution to this specific problem so here goes:
We're having problems with Revit 2015 duplicating line styles. This is similar to other problems I've read about where Site Designer duplicates line styles (with the prefix 'SW'). This problem seems to have been fixed in Revit 2017.
The duplicate linestyles can be found in:
Visibility Graphics > Model Categories > Detail Items
Our Revit has chosen a few linestyles to replicate thousands of times. In practice, our model works fine until someone has to enter a View Template, Visibility Graphics or the Object Styles menu. I've read Revit 2017 lets you batch-delete object subcategories, but we can't do this in 2015 so I'm looking for an automated solution instead of hitting delete thousands of times.
The linestyles which are being duplicated are: PTE Hidden 1, PTE Hidden 5, PTE Hidden 6, PTE Hidden 7, PTE Solid 6, PTE Solid 7 (seems to be random, there are about 40 line styles which have the PTE suffix but only a few are getting replicated).
I've tried deleting these line styles using PythonRevitShell, SharpDevelop and Dynamo. I've consulted the following:
This says a similar problem is caused by Site Designer, gives links to two forum discussions below:
(I've tried this Python Script in RevitPythonShell: it ran but didn't help)
(Tried this script too, no luck)
I tried the below Dynamo Workflow to highlight the linetypes, get their object ID, used Manage > Select by ID in Revit and delete. This approach makes Revit thinks for a long while, seemes to delete them from the Dynamo lists.... but if I open the View Template they're all still there (even after purging the file).
Below is a shot of the Python Script used:
I found a post on Konrad Sobon's site, in the comments (August 15 2015 at 3:13am) he suggests a couple of workflows to delete line styles (rather than line patterns): http://archi-lab.net/delete-imported-line-patterns-using-dynamo/
Tried these, didn't have any luck, first graph:
And the custom Python node used in the second graph:
Not to give up too easily, I turned to SharpDevelop using this script from BoostYourBIM:
Which threw up some kind of API error:
I would be incredibly grateful if someone could suggest a way to delete our 1000s of rogue linestyles!
Thanks for reading! (And sorry for all the links / images!).