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

Can't delete duplicate grading criteria

40 REPLIES 40
Reply
Message 1 of 41
gr8gonzo0
5017 Views, 40 Replies

Can't delete duplicate grading criteria

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.

40 REPLIES 40
Message 21 of 41
john.mckenzie
in reply to: jmayo-EE

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.

Message 22 of 41
jmayo-EE
in reply to: john.mckenzie

No problem John. You're helping out great here I just wanted things to be clear for future readers.

John Mayo

EESignature

Message 23 of 41
john.mckenzie
in reply to: jmayo-EE

Absolutely.

Message 24 of 41
jmayo-EE
in reply to: john.mckenzie

Ok finally testing grading objects in 2014....

John Mayo

EESignature

Message 25 of 41
cdavis0114
in reply to: gr8gonzo0

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

Message 26 of 41
ArchD
in reply to: cdavis0114

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.

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
Message 27 of 41
stevenh0616
in reply to: gr8gonzo0

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.

Message 28 of 41
tbalian
in reply to: cshumake

Works perfectly. Thanks!
Message 29 of 41
bberry
in reply to: ArchD

This was it! I sure wish I would've searched a bit more diligently for a solution in the beginning. Pour a beer for my lost brain cells, if you have the capacity to remember to, after figuring this out.
Message 30 of 41
mackland
in reply to: bberry

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.

Message 31 of 41
Joe
Enthusiast
in reply to: jmayo-EE

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. 

Joe Cyganiak
Senior Designer
AutoCAD Civil 3D 2020
Win 10 Pro 64
Message 32 of 41
mackland
in reply to: Joe

In my line of work, I don't even use grading styles and this worries me along with the duplicate point groups that are created in the same manner.

I do notice that these duplicate objects/styles show up after a long pause or "lock" of autocad civil 3d. I also believe that it has something to do with civil points and loosing "track" of the points then when it catches up with or "unlocks" it sees the points as new and creates styles based on the info in the point data. It sees a style that exists and that triggers a copy to be made with an incremental number added. We've had this problem with point groups since civil 2009 thru 2016. No solutions in site.

I can't help but think they are related. I also believe it affects performance to some degree.



Mark Ackland
Cad Tech

[compass_rgb]


2631 Ginger Woods Parkway, Suite 100, Aurora, Illinois 60502
Phone: (630) 820-9100 Fax: (630) 820-7030
www.clsurveying.com

These documents in this electronic format are being provided to you at your request. This electronic data is provided for the recipients use only. Due to the unsecured nature of these electronic documents and the inability of the originator to establish controls over the use thereof, Compass Surveying Ltd. assumes no responsibility for any consequences arising out of the use of this data. It is the sole responsibility of the user to check the validity of all information contained herein. The user shall at all times refer to the signed and sealed paper copies of the document(s). The user shall assume all risks and liabilities resulting from the use of this data
Message 33 of 41
ArchD
in reply to: Joe

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%.

 

 

  1. Create a temporary Criteria Set
  2. Create a temporary Criteria within that set
  3. Set the newly created Criteria Set and Criteria to default within the commands
  4. Use PURGESTYLES to remove the old criteria set, unchecking all styles that you need to keep. (Continue to hold Shift while unchecking to make sure all that are highlighted are unchecked)
  5. The duplicate criteria will end up in the temporary Criteria set
  6. Use PURGESTYLES again to remove the duplicates, remembering to uncheck the styles you want to maintain.

 

Archie Dodge
Applications Expert - Infrastructure Solutions Division
IMAGINiT Technologies
Message 34 of 41
Joe
Enthusiast
in reply to: ArchD

Archie - YOU ARE THE MAN!!!!!!!

 

This worked perfectly. Thank you!

 

Joe Cyganiak

Joe Cyganiak
Senior Designer
AutoCAD Civil 3D 2020
Win 10 Pro 64
Message 35 of 41
HQGL01
in reply to: ArchD

Thank you sir!

This is the best solution here, you should be the first message up there and labeled as Resolved.

 

Guillaume Levac, tech.

Message 36 of 41
mathewkol
in reply to: ArchD

Just needed this and saw it.  Awesome Archie!  Worked perfectly.

Matt Kolberg
SolidCAD Professional Services
http://www.solidcad.ca /
Message 37 of 41
mmcwilliams323
in reply to: cshumake

this _purgestyles idea, after fixing the defaults, actually works! Thanks much!

 

Mike

Message 38 of 41
igi_pop
in reply to: ArchD

Well, this is nice 🙂

Bravo man, bravo!

It's been picking my brain half of the morning 😄

Lenovo ThinkCenter M920f; Win10pro x64; i5 9500 @3GHz; 16GB RAM; Radeon RX550X
"I'd rather have a bottle in front of me, than a frontal lobotomy."

AutoCAD Civil 3D Certified ProfessionalAutoCAD Civil 3D Certified Professional
Message 39 of 41

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)

Message 40 of 41

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

Lenovo ThinkCenter M920f; Win10pro x64; i5 9500 @3GHz; 16GB RAM; Radeon RX550X
"I'd rather have a bottle in front of me, than a frontal lobotomy."

AutoCAD Civil 3D Certified ProfessionalAutoCAD Civil 3D Certified Professional

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

Post to forums  

Rail Community


Autodesk Design & Make Report