<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to force delete Style Manager elements? in AutoCAD Architecture Forum</title>
    <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12869191#M676</link>
    <description>&lt;P&gt;I tried to find PropertySetData and Classification Definition inside objects to delete the link, but is impossible to find the exact object. I tried to delete everything inside Style Manager and select "applies to" to no objects, but still is not possible to delete a classification definition that duplicate itself silently.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It's there any method to force delete any style, property, classification definition or anything?&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jun 2024 22:48:42 GMT</pubDate>
    <dc:creator>jtm2020hyo</dc:creator>
    <dc:date>2024-06-29T22:48:42Z</dc:date>
    <item>
      <title>How to force delete Style Manager elements?</title>
      <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12869191#M676</link>
      <description>&lt;P&gt;I tried to find PropertySetData and Classification Definition inside objects to delete the link, but is impossible to find the exact object. I tried to delete everything inside Style Manager and select "applies to" to no objects, but still is not possible to delete a classification definition that duplicate itself silently.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;It's there any method to force delete any style, property, classification definition or anything?&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jun 2024 22:48:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12869191#M676</guid>
      <dc:creator>jtm2020hyo</dc:creator>
      <dc:date>2024-06-29T22:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to force delete Style Manager elements?</title>
      <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12870339#M677</link>
      <description>&lt;P&gt;I am not aware of a "super purge" command that would delete a Classification Definition.&amp;nbsp; As you know, you will not be able to purge a Classification Definition in Style Manager if it is referenced anywhere.&amp;nbsp; I am also not aware of a native ACA command that would tell you where all of the references are.&amp;nbsp; Perhaps it is possible in a customization, but I have never tried to do that (for either purging or determining references).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to purge a Classification definition:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;All object Styles that reference it (check the Applies To tab of the Classification Definition to see which Styles to examine) must be set to *Unspecified*.&lt;/LI&gt;
&lt;LI&gt;All object instances to which the Classification Definition applies must be set to &lt;STRONG&gt;By style (*Unspecified*)&lt;/STRONG&gt;.&amp;nbsp; An object override will make the Classification Definition un-purgeable.&lt;/LI&gt;
&lt;LI&gt;All Schedule Table Styles that apply to all or a subset of the objects to which the Classification Definition applies would have to have all of the classifications unchecked.&lt;/LI&gt;
&lt;LI&gt;&amp;nbsp;In the Display Manager, all of the Display Sets have to have the display of all of the classifications enabled (checked).&amp;nbsp; In testing this tonight, I found that if I disabled the display of one classification in a Display Set, and then purged that classification, I still could not purge the Classification Definition.&amp;nbsp; I did not spend any additional time down that rabbit hole, to see if saving/closing/reopening the drawing "reset" the "memory" of the now-deleted classification, allowing the Classification Definition to be purged.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 01 Jul 2024 00:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12870339#M677</guid>
      <dc:creator>David_W_Koch</dc:creator>
      <dc:date>2024-07-01T00:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to force delete Style Manager elements?</title>
      <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871347#M678</link>
      <description>&lt;P&gt;Well, I quickly tested this with just one SpaceObjetcs.&lt;BR /&gt;Both via STYLEMANAGER and via .NET seem to work properly.&lt;BR /&gt;It is necessary to do more in-depth testing but I think it is totally possible.&lt;BR /&gt;Follow the content in this link:&amp;nbsp;&lt;A href="https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Cannot-remove-Property-Set-Definitions-from-a-drawing-in-Civil-3D.html" target="_blank" rel="noopener"&gt;https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Cannot-remove-Property-Set-Definitions-from-a-drawing-in-Civil-3D.html&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;Have you tested this correctly?&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public void DeletePropertySetDefinition ( )
{
  string propSetDefName = "SpaceObjects";           
  Document doc = Application.DocumentManager.MdiActiveDocument;
  Database db = doc.Database;

  using (Transaction trans = db.TransactionManager.StartTransaction())
  {
     DictionaryPropertySetDefinitions propSetDefDict = new DictionaryPropertySetDefinitions(db);

     if (!propSetDefDict.Has(propSetDefName, trans))
        return;               

     ObjectId propSetDefId = propSetDefDict.GetAt(propSetDefName);
     PropertySetDefinition propSetDef = (PropertySetDefinition)trans.GetObject(propSetDefId, OpenMode.ForWrite, false, false);
     propSetDef.SetAppliesToFilter(new System.Collections.Specialized.StringCollection(), false);
     propSetDef.SetAppliesToFilter(new System.Collections.Specialized.StringCollection(), true);
     propSetDef.Erase(true);
     trans.Commit();
  }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:38:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871347#M678</guid>
      <dc:creator>Gepaha</dc:creator>
      <dc:date>2024-07-01T12:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to force delete Style Manager elements?</title>
      <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871472#M679</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/565180"&gt;@Gepaha&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That works fine for Property Set Definitions.&amp;nbsp;&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3529276"&gt;@jtm2020hyo&lt;/a&gt;&amp;nbsp;is trying to purge a Classification Definition.&amp;nbsp; I see no equivalent to PROPERTYSETCLEAN for Classification Definitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Removing all of the items from Applies To for the Classification Definition will make it disappear from Styles and Objects, but it is still visible in Display Sets.&amp;nbsp; Even if you check all of classifications in the Display Set, if classifications were set in Styles or on Objects, the Classification Definition remains unpurgeable, and you will not be able to reset the Styles to *Unspecified* or the objects to By style (*Unspecified*) until you add the object type(s) back to the Classification Definition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps a customization can clear the settings without manually editing one-by-one, but there does not appear to be an out-of-the-box command that does so (or at least not one that has "classification" in the command name).&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 13:05:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871472#M679</guid>
      <dc:creator>David_W_Koch</dc:creator>
      <dc:date>2024-07-01T13:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to force delete Style Manager elements?</title>
      <link>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871691#M680</link>
      <description>&lt;P&gt;Yes you are correct, it appears there is no such thing as "CLASSIFICATIONCLEAN", but it appears to work correctly with customization.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt; public void DeleteClassification()
 {
     string clasDefName = "Space Occupancy";
     Document doc = Application.DocumentManager.MdiActiveDocument;
     Database db = doc.Database;
     using (Transaction trans = db.TransactionManager.StartTransaction())
     {
        DictionaryClassificationDefinition clasDefDict = new DictionaryClassificationDefinition(db);

        if (!clasDefDict.Has(clasDefName, trans))
           return;

        ObjectId clasDefId = clasDefDict.GetAt(clasDefName);
        ClassificationDefinition clasDef = (ClassificationDefinition)trans.GetObject(clasDefId, OpenMode.ForWrite, false, false);
        clasDef.AppliesToFilter = new System.Collections.Specialized.StringCollection();
        clasDef.Erase(true);               
        trans.Commit();
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 14:29:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/autocad-architecture-forum/how-to-force-delete-style-manager-elements/m-p/12871691#M680</guid>
      <dc:creator>Gepaha</dc:creator>
      <dc:date>2024-07-01T14:29:49Z</dc:date>
    </item>
  </channel>
</rss>

