Hi all,
Im trying to change parameter by ViewSheetSet.
For example a VSS contains 20 sheets, i want to change a parameter for all sheets in this VSS. “Approved By” for example.
it works when i let the user choose Sheets instead of ViewSheetSet, but manualy selecting 50 sheets still takes alot of time. trying to adapt it to work with ViewSheetSets (single and multi selected VSS if possible).
i tried adapting this, but cant get it to work Get views from viewset?
Here is the code i got so far. any help is greatly appriciated!
SetSheetSetParameter.dyn (20.5 KB)
I tried unwrapping all sheets from selected sheet sets using this python code:
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
app = DocumentManager.Instance.CurrentUIApplication.Application
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
viewSet = UnwrapElement(IN[0])
viewSets = FilteredElementCollector(doc).OfClass(ViewSheetSet)
for i in viewSet.Name:
if i.Name == viewSet.Name:
vs = i
else:
continue
OUT = [i.ToDSType(True) for i in vs.Views]