Hello, i am pretty much without a clue here.
My problem is that i want to duplicate views from a revit file.
It generally works pretty fine, but now i have a revit file where the script just stuck.
Even the except doesn’t work, probably because it does not through an error.
do you guy hav an idea what could be the cause and why the duplicate function is not working?
I would be very thankfull
from Autodesk.Revit.DB import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
Schedules = UnwrapElement(IN)
filepath = IN
#Option for Duplication Duplicate / WithDetailing / Dependent
#Option = Autodesk.Revit.DB.ViewDuplicateOption.Duplicate
Option = Autodesk.Revit.DB.ViewDuplicateOption.WithDetailing
#Option = Autodesk.Revit.DB.ViewDuplicateOption.Dependent
Building = list()
for Apartments in Schedules:
Apartmentlist = list() for ScheduleApartment in Apartments: with open(filepath, 'a') as file: file.write(str(ScheduleApartment.Name)) file.write("\n") file.close j=j+1 try: newSchedule = ScheduleApartment.Duplicate(Option) Apartmentlist.append(doc.GetElement(newSchedule)) except: Apartmentlist.append(None) Building.append(Apartmentlist)