Revit Design Automation | Extensible Storage "Writing of Entities of this Schema is not allowed to the current add-in." Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have been using Extensible Storage in my addin for quite some time with no problems. Here is a simple example of the schema creation:
SchemaBuilder schemaBuilder = new SchemaBuilder(schemaGuid);
schemaBuilder.SetReadAccessLevel(AccessLevel.Public);
schemaBuilder.SetWriteAccessLevel(AccessLevel.Vendor);
schemaBuilder.SetVendorId("myVendorId");
schemaBuilder.SetSchemaName("DataStorageUniqueId");
schemaBuilder.AddSimpleField("Id", typeof(Guid));
return schemaBuilder.Finish();
I also have an APS addin, and recently decided to use the same Extensible Storage code inside the APS addin. Both addin files have the same vendorId.
When I create the extensible storage in my Revit Addin locally, there are no issues. When I run the same code to create a schema and create the entity in my Revit APS Addin, I get the following error: Autodesk.Revit.Exceptions.InvalidOperationException: Writing of Entities of this Schema is not allowed to the current add-in.
After loads of testing on this trying to figure out the solution, I've come up with nothing. The only thing that works is setting the write access to Public instead of Vendor. This would however mess up my schema (hence breaking all previous models with that schema), so this is not an option.
My theory to why this is a problem is that the VendorId being read is the Design Automation addin VendorId, not my addin's vendorId. I don't know an easy way to prove this, but at least wanted to throw it out there as a potential issue.
Any theories or solutions to this problem? I found one previous post on StackOverflow about this that went unsolved.