-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCheckDimStylesForRounding.py
More file actions
32 lines (27 loc) · 1.13 KB
/
CheckDimStylesForRounding.py
File metadata and controls
32 lines (27 loc) · 1.13 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
#========================================================================#
# _____ __
# \_ \__ _ _ __ \ \ __ _ _ __ ___ ___ ___
# / /\/ _` | '_ \ \ \/ _` | '_ ` _ \ / _ \/ __|
# /\/ /_| (_| | | | | /\_/ / (_| | | | | | | __/\__ \
# \____/ \__,_|_| |_| \___/ \__,_|_| |_| |_|\___||___/
#
#
# The Script looks at all of the DimensionStyles to check if they have
# had rounding applied
# The first filter selects only Dimension Styles that are not set to
# Use Default Settings. It is assumed that Default Settings are not set
# to use rounding.
#
# March 2019
#
#========================================================================#
theDimStyles = (
FilteredElementCollector(doc)
.OfClass(DimensionType)
.Where(lambda ds: ds.GetUnitsFormatOptions().UseDefault.Equals(False))
)
for aDimStyle in theDimStyles:
fo = aDimStyle.GetUnitsFormatOptions()
if fo.RoundingMethod.Equals(RoundingMethod.Nearest):
DSName = Element.Name.GetValue(aDimStyle)
print DSName + " is rounded to " + str(fo.Accuracy) + " (" + fo.DisplayUnits.ToString() + ") "