<?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 Re: Not able to delete Extensible Storage schema in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11581383#M22678</link>
    <description>&lt;P&gt;I did purge as suggested above with mixed results - see below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to create a minimal example but I am in the middle of creating a "generic" storage system and, in order to save time, I created an example by extracting only the parts needed from this.&lt;/P&gt;&lt;P&gt;Scenario 2, below, applies to 2021, 2022, &amp;amp; 2023&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I use Revit DB Explorer to check the status of the elements.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two scenario:&lt;/P&gt;&lt;P&gt;both start with a new, "empty" model.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;scenario 1 - "purge first"&lt;/P&gt;&lt;P&gt;1. open model&lt;BR /&gt;2. run ExStoreTest&lt;BR /&gt;3. Write&lt;BR /&gt;4. Delete&lt;BR /&gt;5. Exit&lt;BR /&gt;6. check schemas: they are still in memory (expected)&lt;BR /&gt;7. purge unused: purge all&lt;BR /&gt;8. close &amp;amp; save model&lt;BR /&gt;9. open model&lt;BR /&gt;10. schemas do not exist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;applies to 2021, 2022, &amp;amp; 2023&lt;BR /&gt;scenario 2 - "save first"&lt;BR /&gt;1. open model&lt;BR /&gt;2. run ExStoreTest&lt;BR /&gt;3. Write&lt;BR /&gt;4. Delete&lt;BR /&gt;5. Exit&lt;BR /&gt;6. check schemas: they are still in memory (expected)&lt;BR /&gt;7. close &amp;amp; save the model&lt;BR /&gt;8. open the model&lt;BR /&gt;9. check schemas: they ARE still in memory (not expected)&lt;BR /&gt;10. purge unused: no ex storage schemas listed&lt;BR /&gt;11. purge all anyway&lt;BR /&gt;12. close &amp;amp; save the model&lt;BR /&gt;13. open the model&lt;BR /&gt;14. check schemas: they ARE still in memory (not expected)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But of course, I cannot have the user manually, purge the schemas - especially, in my case, they may change multiple times during a session.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 05:14:26 GMT</pubDate>
    <dc:creator>JeffStuy</dc:creator>
    <dc:date>2022-11-28T05:14:26Z</dc:date>
    <item>
      <title>Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729533#M22648</link>
      <description>&lt;P&gt;I'm trying to put together a command to erase Extensible Storage (ES) data and the corresponding Schemas for our addin in case if unwanted by the users or corrupt. I had no luck so far.&amp;nbsp;&lt;/P&gt;&lt;P&gt;After the ES data has been written to the file it won't go away. I am being able to delete the DataStorage elements with no troubles, but the schemas keep popping up after erasing them.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The procedure I'm trying is:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open the Revit file with the saved ES data.&lt;/LI&gt;&lt;LI&gt;Delete all the DataStorage elements holding the data.&lt;/LI&gt;&lt;LI&gt;Save and close Revit, reopen the file again.&lt;/LI&gt;&lt;LI&gt;Erase all schemas created by our addin.&lt;/LI&gt;&lt;LI&gt;Save and close Revit to make sure I clear the schemas in memory.&lt;/LI&gt;&lt;LI&gt;Start Revit again.&lt;/LI&gt;&lt;LI&gt;Use the Schema.ListSchemas() function with no documents open to make sure our custom schemas are not loaded, this clears out.&lt;/LI&gt;&lt;LI&gt;Open the file and use the&amp;nbsp;Schema.ListSchemas() function, now all the schemas that I have erased previously reappear after opening the file!&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I'm using the same procedure found in the "ExtensibleStorageUtility" code example in the Revit SDK in a macro (code below).&lt;/P&gt;&lt;P&gt;One observation I have that if I close Revit without saving after step 4 I get no warning to save the file as if no changes happened to the file, although I'm doing the erase inside a transaction.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.caddmicrosystems.com/blog/cadd-helpdesk-hot-picks-classification-manager-schema-error/" target="_blank" rel="noopener"&gt;This article&lt;/A&gt; has some info on ES and Schema behaviors that I tried to utilize but didn't work.&lt;BR /&gt;&lt;BR /&gt;Below is the macro function I'm using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;		public void DeleteSchemas() {
			
			var uiDoc = this.ActiveUIDocument;
			var document = uiDoc.Document;
			
			var message = "";				
			IList&amp;lt;Schema&amp;gt; schemas = Schema.ListSchemas();
			int deleted = 0;
			int count = schemas.Count;
			
			using(Transaction tErase = new Transaction(document, "Erase EStorage")){
				
				tErase.Start();
				
				foreach (Schema schema in schemas.Where(s=&amp;gt; s.VendorId == "MYAD"))
				{
					//Note-this will delete storage of this schema in *all* open documents.
					try{
						document.EraseSchemaAndAllEntities(schema);
						Schema.EraseSchemaAndAllEntities(schema, true);
						deleted++;
					} catch {
						
					}
				}
				tErase.Commit();
			}
			
			message =string.Format( "{0} storage elements out of {1} were deleted.", deleted.ToString(), count.ToString());
			
			TaskDialog.Show("ExtensibleStorageUtility", message);
		}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any light on this would be much appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 06:42:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729533#M22648</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-02T06:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729569#M22649</link>
      <description>&lt;P&gt;How is your schema created? Maybe your add-in create it when it's loaded?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 07:07:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729569#M22649</guid>
      <dc:creator>guillain.jolivet</dc:creator>
      <dc:date>2021-11-02T07:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729588#M22650</link>
      <description>&lt;P&gt;I would avoid the try/catch with an empty catch-all. Using that, you will never notice if anything goes wrong. Never catch all exceptions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2017/05/prompt-cancel-throws-exception-in-revit-2018.html#5" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2017/05/prompt-cancel-throws-exception-in-revit-2018.html#5&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an old article by The Building Coder on erasing extensible storage:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2013/11/erasing-extensible-storage-with-linked-files.html" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2013/11/erasing-extensible-storage-with-linked-files.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the problem persists, I would suggest putting together a minimal reproducible case for deeper analysis:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 07:25:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10729588#M22650</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-11-02T07:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10730748#M22651</link>
      <description>&lt;P&gt;No, the schema is created on demand.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 17:04:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10730748#M22651</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-02T17:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10752628#M22652</link>
      <description>&lt;P&gt;Thank you for the swift reply&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already looked at all the Schema related posts in the building coder blog, none helped solving the issue in hand.&lt;BR /&gt;&lt;BR /&gt;After further investigation, it turned out that the &lt;STRONG&gt;Schema.EraseSchemaAndAllEntities(...)&lt;/STRONG&gt; function is &lt;U&gt;working fine in Revit 2019&lt;/U&gt;, it is in &lt;U&gt;Revit 2022 that it is failing&lt;/U&gt;. I haven't tried the in-between versions but I suspect that this is the case for 2021 as well as it is in that version that the API change happened of deprecating this function from the Schema class and providing one in the Document class.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have attached 2 Revit files with embedded macros for versions 2019 and 2022, both files have the same code except that the 2022 file is using the new&amp;nbsp;&lt;STRONG&gt;Document.EraseSchemaAndAllEntities(...)&lt;/STRONG&gt; function along with the deprecated one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;To replicate the issue:&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Open file &lt;STRONG&gt;es test-V22.rvt&lt;/STRONG&gt; in Revit 2022&lt;/LI&gt;&lt;LI&gt;Run the embedded macro &lt;STRONG&gt;ListSchemas&amp;nbsp;&lt;/STRONG&gt;to examine the OOTB existing schemas&lt;/LI&gt;&lt;LI&gt;Run the embedded macro&amp;nbsp;&lt;STRONG&gt;WriteESData&amp;nbsp;&lt;/STRONG&gt;to write sample extensible storage data&lt;/LI&gt;&lt;LI&gt;repeat step #2, you should see a new entry of&amp;nbsp;&lt;STRONG&gt;MYID:&amp;nbsp; SomeData&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Save the file&lt;/LI&gt;&lt;LI&gt;Run the embedded macro &lt;STRONG&gt;DeleteSchemas&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Repeat step #2, you should see that the new entry is gone&lt;/LI&gt;&lt;LI&gt;Save the file&lt;/LI&gt;&lt;LI&gt;Close Revit 2022 (Just to make sure that the schemas are cleared from memory)&lt;/LI&gt;&lt;LI&gt;Open Revit and the file again&lt;/LI&gt;&lt;LI&gt;Repeat step #2, the &lt;STRONG&gt;MYID:&amp;nbsp; SomeData&amp;nbsp;&lt;/STRONG&gt;schema reappears again!&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;If you follow the same steps on the file&amp;nbsp;&lt;STRONG&gt;es test-V19.rvt&amp;nbsp;&lt;/STRONG&gt;in Revit 2019 the deletion will be successful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope I am doing something silly, but I really think that it is an issue with the API update.&lt;BR /&gt;Please let me know if you need further info on the test case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 04:46:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10752628#M22652</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-12T04:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10765286#M22653</link>
      <description>&lt;P&gt;Dear Sam,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for not following up immediately and thank you for pointing out this again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;&amp;nbsp;just discussed and resolved a similar issue in another thread here in the forum, and I am pretty sure that addresses the same root cause. His explanations will hopefully help resolve your problem as well:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2021/11/new-analytical-model-api.html#6" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2021/11/new-analytical-model-api.html#6&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I very much hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 05:41:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10765286#M22653</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-11-18T05:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10767847#M22654</link>
      <description>&lt;P&gt;Thank you for your reply&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;, I much appreciate all the help you provide.&lt;/P&gt;&lt;P&gt;I read through the new blog post and the solution by&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;, and I'm sorry to say that it does not address the issue I'm having.&lt;/P&gt;&lt;P&gt;The solution and guidelines are addressing DataStorag and Schema &lt;U&gt;creation&lt;/U&gt; and &lt;U&gt;retrieval&lt;/U&gt;, I don't have issues there, and I can say that we are following the proposed best practices mentioned in the blog post for the creation procedures:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Schemas are being created on-demand&lt;/LI&gt;&lt;LI&gt;Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;new Entity(Schema)&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;instead of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;new Entity(GUID)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Not passing entities&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ByRef&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;Utilizing &lt;STRONG&gt;ExtensibleStorageFilter&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;STRONG&gt;Schema.Lookup(SchemaGuid)&lt;/STRONG&gt;.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;My issue is with &lt;U&gt;deleting&lt;/U&gt; the schema, which is working fine in 2019 but not in 2022.&lt;/P&gt;&lt;P&gt;I am testing this in freshly created Revit files which I have included in my previous response with embedded macro code. The same code is being used in both files, but the 2022 one is not working.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason we are seeking Schema deletion is that when a Revit file that contains a newer version of the schema (adding more fields for example) and it has a linked Revit file with an older version, Revit will display a warning when the file is opened. This warning dialog is hindering our client's automation software that opens Revit files and process them automatically. We don't have control over that software nor want to suppress this warning because, while we are sure that this will not affect the tools we are developing and the integrity of the file, we can't guarantee that for all other vendors and the suppression will hide all such warnings for data coming from all the installed addins. Our goal is to provide a tool to delete our schema from the linked files to resolve the issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really hope this can be looked at by the development team to see if it is a bug caused by the API update that took place in Revit 2021.&lt;BR /&gt;&lt;BR /&gt;Thank you again for all your help!&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 06:03:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10767847#M22654</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-19T06:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768117#M22655</link>
      <description>&lt;P&gt;I've not looked into this it should be possible to delete the schema if it is not used regardless, so that does seem wrong (especially if it previously worked). Did you have schema conflicts in the 2019 version though?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However one thing that occurred to me as I read your latest message is that you should only get that warning in the first place if you've done something wrong in terms of managing the schemas. When you create a schema with a GUID that is that version forever. To add additional members you should create a new version and transfer the data (leave the old one alone not reuse it's GUID).&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 09:44:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768117#M22655</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-11-19T09:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768127#M22656</link>
      <description>&lt;P&gt;Oh wow, well spotted!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very sorry I missed that, Sam. You say:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;a newer version of the schema (adding more fields for example)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;No such thing exists! &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you have created such a situation, you are in serious trouble. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please refer to numerous articles by The Building Coder pointing out that an existing schema cannot be modified:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2013/08/deleting-and-updating-extensible-storage-schema.html#3" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2013/08/deleting-and-updating-extensible-storage-schema.html#3&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.23" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#5.23&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 09:41:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768127#M22656</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-11-19T09:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768410#M22657</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed the procedure above (2022 version only) and was also not able to remove the schema, so regardless of misuse something seemingly warranting some further investigation with the&amp;nbsp;EraseSchemaAndAllEntities methods perhaps. i.e. this is a clean file to start with presumably.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that the macro doesn't delete the DataStorage element but I deleted this manually&amp;nbsp;prior to step 6. However I still wasn't able to permanently remove the schema.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I note that the old method (Schema.EraseSchemaAndAllEntities) has a boolean overrideWriteAccessWithUserPermission which is not present in the new Document method of the same name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This may be a conceptual choice going forward but may be part of the issue (changes to underlying method that serves both). Also the test was only conducted within the macro environment (add-in id is explicitly set in the attribute).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made the below minor change so any exceptions would show up but still no exceptions were reported:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="211119.PNG" style="width: 856px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/991560i7C3177DA7C7B05C7/image-size/large?v=v2&amp;amp;px=999" role="button" title="211119.PNG" alt="211119.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 12:43:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768410#M22657</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2021-11-19T12:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768935#M22658</link>
      <description>&lt;P&gt;Thank you for the follow-up&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1035859"&gt;@RPTHOMAS108&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/824630"&gt;@jeremy_tammik&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Your observation is spot-on, my usual procedure is to change the guid if I ever change something in the schema so a new schema would be created, but it looks like I missed doing that in one class, and this is why I am seeking the deletion functionality. This should not be an issue for future updates, but I need to provide a resolution for the models edited by the current version.&lt;/P&gt;&lt;P&gt;And again, the issue with not being able to delete the schema is irrelevant to what I did wrong.&lt;/P&gt;&lt;P&gt;Appreciate the help!&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 14:39:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10768935#M22658</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-19T14:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10773535#M22659</link>
      <description>&lt;P&gt;OK, so it seems I have to pass this on to the development team for further analysis. Are the two sample files that you shared above in a fit state to be passed on to them, or is there anything that can be simplified or cleaned up before I go ahead? Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Nov 2021 13:21:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10773535#M22659</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-11-22T13:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10776889#M22660</link>
      <description>The files are in their simplest forms, they are freshly made out of the architectural template and contain no elements, just the embedded macro scripts.</description>
      <pubDate>Tue, 23 Nov 2021 16:40:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10776889#M22660</guid>
      <dc:creator>snajjar</dc:creator>
      <dc:date>2021-11-23T16:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10859918#M22661</link>
      <description>&lt;P&gt;Happy New Year!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your confirmation and patience. Thanks also to Richard for pointing out this existing thread in the new one raising a similar question:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/error-with-new-api-schema-revit/m-p/10858918" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/error-with-new-api-schema-revit/m-p/10858918&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have &lt;A href="https://autodesk.slack.com/archives/C0SR6NAP8/p1641399621212600" target="_blank"&gt;passed on&lt;/A&gt; both issues to the development team for further analysis and hopefully some helpful advice.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 16:26:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10859918#M22661</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-01-05T16:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10863616#M22662</link>
      <description>&lt;P&gt;The devteam replied:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV id="C0SR6NAP8-1641399621.212600-thread-list-threads-flexpane_1641413908.213800" class="c-virtual_list__item" tabindex="-1" role="listitem" data-qa="virtual-list-item"&gt;
&lt;DIV class="c-message_kit__background c-message_kit__message c-message_kit__thread_message" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--default"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;After running DeleteSchemas macro, open Manage &amp;gt; Purge Unused. In the tree, select Extensible Storage Schema.&lt;BR /&gt;Check the schema a9dc2b48 and click OK to purge it.&amp;nbsp;Run ListSchemas - the schema is purged.&amp;nbsp;&lt;SPAN style="font-family: inherit;"&gt;So, please use Purge Unused to delete schemas without entities.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV id="C0SR6NAP8-1641399621.212600-thread-list-threads-flexpane_1641542199.001100" class="c-virtual_list__item" tabindex="0" role="listitem" data-qa="virtual-list-item"&gt;
&lt;DIV class="c-message_kit__background c-message_kit__background--hovered c-message_kit__message c-message_kit__thread_message" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover c-message_kit__hover--hovered" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--default"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__left" role="presentation"&gt;
&lt;DIV id="tinyMceEditorjeremytammik_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;I pointed out that this question comes from add-in developers automating processes and asked how they should run the purge command programmatically. We'll see what they come up with next.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 07 Jan 2022 08:02:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/10863616#M22662</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-01-07T08:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11145297#M22663</link>
      <description>&lt;P&gt;A similar issue came up again with a new customer, and the devteam underline:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;DIV class="p-rich_text_section"&gt;I would strongly recommend to any developer &lt;U&gt;not to reuse a GUID for a new or modified schema for any reason&lt;/U&gt;, even if you think it has been purged from one document it may not be purged from other documents and you are setting yourselves up for a potential in-memory conflict.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;We have seen this many times from developers who copied and did not modify the GUID in our samples.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class="c-message_actions__container c-message__actions" role="group"&gt;
&lt;DIV class="c-message_actions__group" role="group" aria-label="Message shortcuts" data-qa="message-actions"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 May 2022 18:58:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11145297#M22663</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-05-03T18:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11385914#M22664</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Hi, have you found a solution to your problem?&lt;/SPAN&gt;&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I probably had the same problem&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Aug 2022 10:27:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11385914#M22664</guid>
      <dc:creator>2537747694</dc:creator>
      <dc:date>2022-08-28T10:27:23Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397400#M22665</link>
      <description>&lt;P&gt;Very recently I faced the same issue, that for some projects I got InternalException while trying to remove ExtensibleStorage schemas. The exception does not occur after I unloaded IFC links.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 11:03:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397400#M22665</guid>
      <dc:creator>Songohu_85</dc:creator>
      <dc:date>2022-09-02T11:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397548#M22666</link>
      <description>&lt;P&gt;Wow. Thank you for a very interesting observation. It would be nice (and very useful) if the other parties concerned could test and hopefully verify this solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 12:24:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397548#M22666</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2022-09-02T12:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to delete Extensible Storage schema</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397957#M22667</link>
      <description>&lt;P&gt;I created a very small example with IFC link (link with a few walls created in Revit2020).&lt;BR /&gt;In the file you will find 4 macros:&lt;BR /&gt;1. To create example schema&lt;/P&gt;&lt;P&gt;2. To remove example schema&lt;/P&gt;&lt;P&gt;3. To list all schemas&lt;/P&gt;&lt;P&gt;4. To remove all schemas&lt;BR /&gt;In Revit2020 I am not able to remove any schemas when the IFC link is loaded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Update: InternalException when removing schemas occurs also when there is more than one project file opened (Revit 2020)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Kind regards&lt;BR /&gt;Marek&lt;/P&gt;</description>
      <pubDate>Tue, 06 Sep 2022 09:45:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/not-able-to-delete-extensible-storage-schema/m-p/11397957#M22667</guid>
      <dc:creator>Songohu_85</dc:creator>
      <dc:date>2022-09-06T09:45:05Z</dc:date>
    </item>
  </channel>
</rss>

