Revit Architecture Forum
Welcome to Autodesk’s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't Delete Multiple Linestyles

19 REPLIES 19
SOLVED
Reply
Message 1 of 20
CharlesBerteaux
6136 Views, 19 Replies

Can't Delete Multiple Linestyles

What the heck is the reason for buttons that do absolutely nothing?????

 

And Why does the Site Designer tool add layers to Revit???? I can understand 1 per type of object, but this is ridiculous!!

 

Revit Line Styles.png

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

19 REPLIES 19
Message 2 of 20

I don't know about all those repeated lines styles. That's crazy!

 

But you'll notice that the delete button is under a heading called "Modify Subcategories." You'll also notice that all the lines you have selected are Categories, not Subcategories.

Message 3 of 20

All those seemingly identical subcategories are clearly a programming problem.

 

As for the grayed out Delete button, that button will only be active if all of the selected items are unreferenced in your model.  At least one of the selected SW Parking Lot subcategories must be in use (perhaps all are).


David Koch
AutoCAD Architecture and Revit User
Blog | LinkedIn
EESignature

Message 4 of 20

I agree David!

 

This Siteworks issue (all the multiple subcategry lines SWXXX) has been escilated to Autodesk.

 

For now I am just going to have to manually Delete them all by hand Smiley Sad

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

Message 5 of 20

We basically built a script to handle all this nonsense....

 

Code is here for anyone interested:

 

#select a detail/model line first
selection = list(__revit__.ActiveUIDocument.Selection.Elements)
if len(selection) > 0:
el = selection[0]
styles = el.GetLineStyleIds()

if len(styles):
t = Transaction(doc, 'Delete all SW Lines')
t.Start()

for s in styles:
el = doc.GetElement(s)
if el.Name[:2] == 'SW':
print ('Line Style Deleted:\nID: {0}\tNAME: {1}\n'.format(el.Id, el.Name) )
doc.Delete(s)

t.Commit()

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

Message 6 of 20

Thank you for creating a script which automates the deletion process.

 

This is a known issue which is logged with our Development Group. We are currently investigating a possible resolution, but the permanent fix requires the code for the Site Designer add-in to be changed, and as such we do not have an immediate fix.

 

Once we do have an immediate fix, we will post it as an update to the article below:

 

Revit: Thousands of new Linestyles show up in project

 



Chris Aquino
Adoption Marketing Manager | BIM Collaborate Pro
@Aquinotecture

Message 7 of 20
Anonymous
in reply to: CharlesBerteaux

Meanwhile if anyone wants to disable the Site Designer (It won't be loaded into Revit anymore), try this:

 

The site desiger assmebly is:

AutodeskSiteDesignerForRevit2015, Version=2015.1.0.0

 

Disable it by renaming the .addin file under the folder below:

C:\ProgramData\Autodesk\ApplicationPlugins\AutodeskSiteDesignerForRevit2015.bundle\Contents\

 

Rename file:

AutodeskSiteDesignerForRevit2015.addin

To:

AutodeskSiteDesignerForRevit2015.addin.bak

(this is to make the file invisible to Revit without deleting it)

Message 8 of 20
Anonymous
in reply to: CharlesBerteaux

Where can I run this code? Pythonshell? as a macro? I need to remove thousands of line styles.

Message 9 of 20
Anonymous
in reply to: Anonymous

Yes. Run the code in RevitPythonShell

 

The most recent version of the code is here:

Wipe_deleteSiteDesignerLineStyles.py

Message 10 of 20
Anonymous
in reply to: Anonymous

Thanks eirannejad,
That script worked for "Normal" Line Styles.
I still have thousands of line style with the same name(I thought it was only possible to have unique names).
But when I run the script and point it at the offending Line Style it cannot find it. It will find other Line styles but not the one I am trying to get rid of.
I think it came in through an exploded CAD file months back, not site designer.
That's what I was told anyway.
Message 11 of 20
Anonymous
in reply to: Anonymous

Okay let's get the references right first.

There is no such thing as Normal line styles.

 

There are Line Styles and Line Patterns.

 

Site Designer creates extra Line Styles which this script removes.

 

CAD files bring Line Patterns. See if you can modify this script for your use: Wipe_deleteIMPORTLinePatterns.py

 

hope this helps.

Message 12 of 20
Anonymous
in reply to: Anonymous

Thanks eirannejad.
I said "Normal" Line Styles as the one I want to delete is not behaving like a Line Style. I cannot delete this misbehaving Line Style using any method I've come across. It doesn't show up when I list all Line Styles using pythonshell or Dynamo, but it is present in the project as a Line Style(thousands of times).

A CAD file was imported and exploded it seems, that had a layer named the exact same the misbehaving Line Style . Very odd. Most likely the file is corrupt and cannot be saved it looks like.

Thanks for your help anyway eirannejad.
Message 13 of 20
Anonymous
in reply to: Anonymous

Ha. Okay.

So you still have Line Styles that don't show up in API queries. I would highly suggest that you install RevitLookup and inspect the Line Style elements. Find their Element IDs and see if you can delete them by doc.Delete()

 

Also, you can send me a cleaned up version of your file and I can take a stab at it.

 

Thanks

Message 14 of 20
Anonymous
in reply to: Anonymous

Hi eirannejad,


Regards

Neil Reilly

ARCDOX Architecture | Documentation
Enabling & Supporting BIM | Building Information Modelling | Consultancy, Production, Support & Training

Mob +353 (0)86 250 9631
Tel +353 (0)1 437 1200
Web www.arcdox.com
Email nreilly@arcdox.com
LinkedIn http://ie.linkedin.com/pub/neil-reilly/21/82/103

508 Q-House | Furze Road | Sandyford | Dublin 18 | Ireland

RIAI (Royal Institute of Architects Ireland)Registered Architectural Practice.
Please click here to view our Email Disclaimer.
Message 15 of 20
Anonymous
in reply to: CharlesBerteaux

sorry but how do i use this script in revit?

Message 16 of 20
Anonymous
in reply to: Anonymous

You'll need RevitPythonShell installed to be able to run this script
inside the shell.

https://github.com/architecture-building-systems/revitpythonshell
Message 17 of 20
Anonymous
in reply to: Anonymous

thanks.

but IT guys prohibit us from installing third party softwares / add-ins

Message 18 of 20
Anonymous
in reply to: CharlesBerteaux

Thanks for this suggestion. How long did the script run in Python to delete your 12,000 lines? I am trying it now and have been waiting about 20 minutes to delete one line type, of which there were hundreds, and wondering how to tell if it is working.

 

Thanks!

Message 19 of 20
Anonymous
in reply to: Anonymous

It took the script the first time I had ran it about 7 hours to churn through them. Another time it took 20 minutes. No idea why.



Sent from my Samsung Galaxy smartphone.
Message 20 of 20

Was there ever a solution for the greyed out "delete" option, other than running a script? As someone else stated, my IT will not allow the third-party software to run a script.

 

My issue isn't 12000 line types. It's like 10, so if there is a manual solution it is doable.

 

One post said its because it is reference somewhere in the file, but I've went through the file and can't find it anywhere.

 

Thanks in advance for your time and help with this matter! - Sarah

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report