-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAUDIT_ReportDesignOptionsAndSets.py
More file actions
32 lines (27 loc) · 1.26 KB
/
AUDIT_ReportDesignOptionsAndSets.py
File metadata and controls
32 lines (27 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
theOptionSets = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_DesignOptionSets)
theOptions = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_DesignOptions)
optionSets = {}
setCounter = 0
print 'There are [' + theOptions.Count().ToString() + '] Design Options across [' + theOptionSets.Count().ToString() + '] Design Option Sets in this model'
for anOption in theOptions:
#If the Design Option Set is already recorded, just add the option to it's list of options
optionSetId = anOption.LookupParameter('Design Option Set Id').AsElementId()
# Check if this is an option within an existing
# option set or a new option set
if optionSetId in optionSets:
optionSets[optionSetId].append(anOption)
else:
optionSets.Add(optionSetId,[])
optionSets[optionSetId].append(anOption)
# Output the results
if optionSets.Count > 0:
print 75 * '-'
# Print the name of Each Option Set, then its Options
for optionSet in optionSets:
theOptionSet = doc.GetElement(optionSet)
setCounter += 1
print setCounter.ToString().zfill(2) + ') ' + theOptionSet.Name
# Print all of the options within the Option Set
for op in optionSets[optionSet]:
print '\t\t+\t\t' + op.Name
print '' # <--<< Blank line between Option Sets.