Purge Line Patterns

Purge Line Patterns

Anonymous
Not applicable
13,803 Views
13 Replies
Message 1 of 14

Purge Line Patterns

Anonymous
Not applicable

Hi all,

 

I've done some research and based on what I have read, it seems there is no way to simply purge out unused line patterns. I figured I would try asking just in case someone had found someway to do so - is there an easier way to delete unused line patterns other than finding which ones are note used and deleting them manually; aka PURGE?

 

If there is no way, would anyone have or know which line patterns Revit uses from the start, that way I will know which ones I can manually delete and which ones I should keep? I have tried importing some CAD line styles that I want to use and simply deleted all the line patterns that were not imported, but this caused a few elements, like grid lines, to change to solid lines. It is easy to see and change the line patterns of certain things in the line styles menu, for instance the <Demolished> line style, but for things like level lines, grid lines, etc. I have to manually determine which line pattern they use as to not delete them out.

SO I wanted to know if anyone had a complete list of the elements and the line pattern they use out of the box so I do not delete them!

 

Please help!

Thanks!

0 Likes
13,804 Views
13 Replies
Replies (13)
Message 2 of 14

RDAOU
Mentor
Mentor

Hello @Anonymous

 

You can check the default ones using either of the following:

  1. You can start a new raw project from a default template...Revit stores the line styles in the default project template
  2. You can use API to extract them from a template file ... AN EASY AND SIMPLE CODE CAN BE FOUND HERE

 

To Clean/Purge them out...Other than doing so manually; so far I am aware of 2 ways;

 

  1. One way is using Dynamo...Konrad SOBON has the code on HIS WEBSITE ARCHI-LAB.NET and it was discussed as well on the DYNAMO FORUM HERE (USE WITH CAUTION - it is not meant to be fore purging UNUSED...)
  2. Another way is using API... you can check the following video out and if you find it appealing; you can see if the guys on the API forum would help you out to develop it further to suit your needs...REVIT API FORUM HERE

 

EDIT: If you find the above helpful "Mark as Solution"...if you know the above info already simply just ignore this post...it will be useful for other forum members seeking answers for a similar question.

YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION


Message 3 of 14

Anonymous
Not applicable

Hello @RDAOU,

Thank you for your response, though I don't think it is exactly what I am looking for.

 

To better clarify:

 

I want to delete all of the line patterns that Revit comes standard with after swapping the patterns that are used with the patterns I import.

 

Through my own research, I have located a few line patterns being used by elements -

     Grid lines use line pattern - grid line 1/2"

     Level lines use - grid line 1/2"

     In manage phases, demolished lines use - demolished

     In manage phases, temporary lines use - dash 1/16"

 

I have adjusted these to one of 8 line patterns I have imported from AutoCAD, as well as every line in the line styles menu.

 

Does anyone know of the other locations/elements where Revit sources default, out of the box line patterns so I can adjust them?

 

Eventually I would like to delete out all the line patterns that are not needed/used - and be left with what I have imported via AutoCAD.

 

Thanks!

 

 

0 Likes
Message 4 of 14

smbrennan
Collaborator
Collaborator

@Anonymous wrote:

 

 

Eventually I would like to delete out all the line patterns that are not needed/used - and be left with what I have imported via AutoCAD.

 

Thanks!

 

 


I would recommend avoiding this. In fact, I would recommend avoiding importing CAD directly into a Revit at all. The way entities are constructed in AutoCAD do not work well in Revit. This is a pretty common statement you'll find across the web. If you can link files, that's better than importing. If you are manipulating the linework in Revit and that's why you're importing it, then you're better of bringing that DWG into a family, import it there, trace over the lines with Revit lines, delete the import, and then you can copy and paste from the family to your project. I actually delete all of the imported linetypes in my files and linked files from architects/engineers whenever I receive them. 

Shawn B.

      |   
To help improve Autodesk Products, please Click Here to Vote for ideas and submit your own.
Message 5 of 14

fg
Enthusiast
Enthusiast

It is astonishing to me how such a simple need as this is not only unacheivable in OTB Revit, but no one seems to have created a simple and straightforward macro, API, Dynamo, Add-in etc to accomplish this.  Either that or no one wants to share it.   I have been chasing this elusive target myself for years now to no avail.  It is also quite amazing that even coders/ developers etc seem to confuse Line Styles with Line Patterns, and imported patterns with unused patterns.

Message 6 of 14

smbrennan
Collaborator
Collaborator

It's out there. Have you checked https://dynamobim.org/? It's the type of community that if you put something out there that you've tried yourself first, you're more prone to getting a response. Simply asking someone else to do a job for you doesn't yield results. Dig hard enough and you can find it. 

Shawn B.

      |   
To help improve Autodesk Products, please Click Here to Vote for ideas and submit your own.
0 Likes
Message 7 of 14

fg
Enthusiast
Enthusiast
Thank you for a response.



I would like to say first that I am an architect and not a coder, so
although I have “coded” since 1982, it is not really my forte. Secondly,
since this is an AutoDesk forum, I am expressing dissatisfaction that such
an obvious basic need has been neglected for so long. (And of course one of
the reasons there is such a need for this is because Line patterns are
viral and Revit does not allow one to delete multiple Line Patterns at
once). Finally, I object to your innuendo that I am somehow begging
someone to do my job for me – the real point of my post was that in fact I
have dived deeply into the sea of wide and various pools of API and Dynamo
forums, including the one you mentioned and, after investing significant
amounts of time ALL ROADS HAVE ALWAYS LED TO A DEAD END. If one is looking
to “simply” purge (not *delete* but PURGE) all unused (not *imported* but
ALL UNUSED)line *patterns (*not Line Styles but LINE PATTERNS) from a
project it seems as if there is always some Revit limitation that cannot be
overcome. For some reason all threads on this topic seem to a) die when
they hit this wall or b) end with someone saying “it is kinda like *X*
(even though it isn’t)and go figure it out yourself”. All this was
understandable in Revit 2008, but is really quite ridiculous now.



Once upon a time there was an add-in that worked, but that has not been
updated in many generations.


Message 8 of 14

RobDraw
Mentor
Mentor

You are posting in a user help forum. Your comments would be more appropriately directed to the product feedback page or ideas forum.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Message 9 of 14

Anonymous
Not applicable

@fg wrote:

Once upon a time there was an add-in that worked, but that has not been
updated in many generations.



Yep...people change jobs or get busy with personal issues.  I know some that are not allowed to create their own add-ins while working for their current company as it will be seen as proprietary.   Yeah, I miss that add-in, and I'm not the greatest at Dynamo so I have to do the click-delete method...but I'm learning.

 

We should ask (bug) the gentleman behind pyRevit to add it to his Wipe list.

Message 10 of 14

fg
Enthusiast
Enthusiast
I am asking for help. In fact I am begging for help. Please help me purge
unused Line Patterns! The added commentary was only added to clarify that
all the suggestions are inadequate – as well as clarify how and why they
are inadequate. They are not addressing the real problem.



And in fact, neither is this reply addressing the problem, it is only
dismissing it. How would posting to the product feedback and ideas forum
graveyards going to help me PURGE UNUSED LINE PATTERNS?


0 Likes
Message 11 of 14

RobDraw
Mentor
Mentor

@fg wrote:
I am asking for help. 

 

Why didn't you say that? Your posts were rants at best. There were no questions.

 

Good luck!


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
0 Likes
Message 12 of 14

Anonymous
Not applicable

So after some digging into the old Purger add-in I believe that the newer Project Sweeper is what it morphed into and is a paid add-in.   Will work with 2017-2019.

https://apps.autodesk.com/RVT/en/Detail/Index?id=1584767121205671211&appLang=en&os=Win64

 

$2 a year is way worth it.  The Line Style cleaner though I think the pyRevit UI is easier.

Message 13 of 14

fg
Enthusiast
Enthusiast

I will try that, thank you.  

0 Likes
Message 14 of 14

PremJBB
Explorer
Explorer

I decided to hold down the ALT key and keep pressing D then Y keys repeatedly. It took me five minutes to get all of 1000 pattern deleted.