For some reason my drawing had created several duplicates of my grading critera. For example, my drawing has the following critera:
Cut to Surface
Cut to Surface.1
Cut to Surface.2
Cut to Surface.3
Cut to Surface.4
I did not create all these criteria, they just appeared one day. The problem is that I can't seem to be able to delete the duplicate ones. I get an error saying that the criteria "is currently in use, so it can not be deleted". I have deleted all the grading in my file and I still get this error. I have tried RECOVER and AUDIT several times with no luck.
Any suggestions?
Thank you.
OK understood. 99 percent of the time, if a drawing corrupts, it is when I am grading. I interpretted it to be the acad commands. Thanks for the time to clarify.
No problem John. You're helping out great here I just wanted things to be clear for future readers.
John Mayo
I had about 30 of these in a dwt and when I edited each individually they had a parameter locked (like slope format, or target). Once I unlocked the parameter I could delete each one.
Hope this helps.
~Christina
I ended up creating a temp grading criteria group. I then dragged and droped the duplicate criterias to the new temp set and refreshed the Grading Criteria Sets folder. You should then see the duplicates have been moved to the temp criteria set with the "in-use" arrow now gone. Keep doing this until you have them all in the temp set and then delete the whole set.
*edit* - I found that I had to create a whole new set and move all my wanted criterias to this new set. Then right click on my old set and "replace with..." to the new one. After that, I was able to move duplicates to the temp set to then delete.
Hi all,
I found a solution through some .NET code. For me, I wanted to get rid of all the Grading Criterias with "Standard" in the name. There were about 20, and they were in use. Running the code listed below worked pretty well... though I still had to close and reopen the drawing for it to refresh properly.
Feel free to mod to your liking... Hope it helps you out.
<CommandMethod("DeleteStandardGradingCriterias")> Public Sub DeleteStandardGradings()
Dim db As Database = Application.DocumentManager.MdiActiveDocument.Database
Dim doc As Autodesk.AutoCAD.ApplicationServices.Document = Application.DocumentManager.MdiActiveDocument
Dim ed As Editor = doc.Editor
Dim CivilDoc As CivilDocument = CivilApplication.ActiveDocument
Using tr As Transaction = db.TransactionManager.StartTransaction
Dim GCSC As ACD.Styles.GradingCriteriaSetCollection = CivilDoc.Styles.GradingCriteriaSets
For Each GSCid As ObjectId In GCSC
Dim gcs As ACD.Styles.GradingCriteriaSet = TryCast(GSCid.GetObject(OpenMode.ForWrite), ACD.Styles.GradingCriteriaSet)
ed.WriteMessage(vbLf & gcs.Name)
For Each GSid As ObjectId In gcs.GradingCriteriaIds
Dim gc As ACD.Styles.GradingCriteria = TryCast(GSid.GetObject(OpenMode.ForWrite), ACD.Styles.GradingCriteria)
ed.WriteMessage(vbLf & gc.Name)
If gc.Name.Contains("Standard") Then
gc.Erase()
ed.WriteMessage(vbLf & "Erased... ")
End If
Next
Next
tr.Commit()
End Using
Steve Hill
Civil Designer / .NET Developer
AutoCAD Certified Professional
AutoCAD Civil 3D Certified Professional
http://redtransitconsultants.com/
Autodesk Exchange Store
Twitter | LinkedIn
Please select the Accept this solution button if my post solves your issue or answers your question.
Does anyone find this odd that the same thing happens with the point groups. I don't even use grading styles and they are multiplying (I have a hundred or so now). I've tried the suggested solutions and nothing works so far. I believe this is also causing Civil 3d 2016 to run extremely slow. I can delete the extra point groups but not the grading styles.
Totally agree with you John on the unstable part of grading objects. I have typically used them to generate a feature line and i remove them from my drawing. Never have issues when I do that. But not being able to delete these unwanted grading criteria styles is very annoying. I am trying to clean up our template and this is the only area of our styles that give me trouble. I can't use the replace with for anything. -PURGESTYLES is useless to me because as i mentioned, I'm cleaning up our company template.
I had to handle a large set of duplicates just this last week. I seemed to have found a pretty easy way to remove them. I created a screencast showing the method I used on the list I had trouble with.
It seems to work 100%.
Archie - YOU ARE THE MAN!!!!!!!
This worked perfectly. Thank you!
Joe Cyganiak
Thank you sir!
This is the best solution here, you should be the first message up there and labeled as Resolved.
Guillaume Levac, tech.
Just needed this and saw it. Awesome Archie! Worked perfectly.
this _purgestyles idea, after fixing the defaults, actually works! Thanks much!
Mike
Well, this is nice 🙂
Bravo man, bravo!
It's been picking my brain half of the morning 😄
Hi.
This solution isn't working for me.
And i don't know why.
And i don't know how to use the .NET code solution.
Grading = Verschneidung (german)
Grading Style = Verschneidungsstil (german)
Grading Criteria = Verschneidungskriterium (german)
Hello!
Could it be that, when you click "grading creation tools -> select a criteria set" your OLD set is still selected as IN USE?
If so, try to select the new one, then purgestyles. What i found just now, in 2021 all the criteria moved to the new group and marked as unused after purgestyles.
Cheers,
Iggy