Skip to content

Commit

Permalink
Merge branch 'jmcouffin-wipe_schemas' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	extensions/pyRevitTools.extension/pyRevit.tab/Project.panel/Wipe.pulldown/Wipe Data Schema.pushbutton/script.py
  • Loading branch information
eirannejad committed May 15, 2022
2 parents 21bdc30 + 97add29 commit 9bd1f62
Showing 1 changed file with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@ def name(self):

schemas = DB.ExtensibleStorage.Schema.ListSchemas()

sschema = \
sschemas = \
forms.SelectFromList.show([DataSchemaItem(x) for x in schemas],
multiselect=False)
multiselect=True) or []

if sschema:
for sschema in sschemas:
with revit.Transaction("Remove Schema"):
if HOST_APP.version > 2020:
DB.ExtensibleStorage.Schema.EraseSchemaAndAllEntities(
schema=sschema,
overrideWriteAccessWithUserPermission=True
)
else:
doc.EraseSchemaAndAllEntities(sschema)
try:
if HOST_APP.version > 2020:
DB.ExtensibleStorage.Schema.EraseSchemaAndAllEntities(
schema=sschema,
overrideWriteAccessWithUserPermission=True
)
else:
doc.EraseSchemaAndAllEntities(sschema)
except Exception as e:
print(e)

0 comments on commit 9bd1f62

Please sign in to comment.