[CONNECT C++] Delete Item Type Library: reasons for failure

I'm writing code to delete an Item Type library from a DGN file. ItemTypeLibrary.Delete() returns a SchemaDeleteStatus value.  While some values are clear, what do the following mean?

  1. SCHEMADELETE_ProviderNotFound: what is the provider if not the active DGN file — a DGNLib?
  2. SCHEMADELETE_ProviderDoesNotSupportDelete: presumably because it's attached read-only?
  3. SCHEMADELETE_SchemaHasStoredInstances: instances that are attached to DGN elements, or something else?
  4. SCHEMADELETE_SchemaIsReferenced: referenced by what — another schema or something else?
Parents
  • 1. The IDgnECProvider object responsible for persisting data that uses this schema. For Item Types, it's always the ECXAttributes provider, so you will never see this.

    2. Consider the IDgnECProvider which is responsible for supplying element properties via schemas like BaseElementSchema. You cannot delete that schema; if you tried you'd get this result. Again, not relevant for ECXAttributes.

    3. Yes. You can't delete a schema that is referenced by persistent data, otherwise that data becomes unreadable.

    4. Yes. You can't delete a schema that is referenced by another persistent schema, except in specific cases which I will not get into - otherwise that schema and any data which references it become unreadable.

    Answer Verified By: Jon Summers 

Reply
  • 1. The IDgnECProvider object responsible for persisting data that uses this schema. For Item Types, it's always the ECXAttributes provider, so you will never see this.

    2. Consider the IDgnECProvider which is responsible for supplying element properties via schemas like BaseElementSchema. You cannot delete that schema; if you tried you'd get this result. Again, not relevant for ECXAttributes.

    3. Yes. You can't delete a schema that is referenced by persistent data, otherwise that data becomes unreadable.

    4. Yes. You can't delete a schema that is referenced by another persistent schema, except in specific cases which I will not get into - otherwise that schema and any data which references it become unreadable.

    Answer Verified By: Jon Summers 

Children
No Data