Skip to content

Commit 089ecee

Browse files
authored
as per devloai:
- remove second call to editfamily - missing import
1 parent 82f5c08 commit 089ecee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/ListFamilySizeCreator.pushbutton/ListFamilySizeCreator_script.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pyrevit import revit, forms, script, DB, HOST_APP
88

99
output = script.get_output()
10+
logger = script.get_logger()
1011

1112
FIELDS = ["Size", "Name", "Category", "Creator", "Count"]
1213
# temporary path for saving families
@@ -155,16 +156,14 @@ def print_sorted(families, group_by):
155156
except Exception as ex:
156157
logger.warning(
157158
"Skipping family '%s': could not open for edit: %s",
158-
fam, ex
159+
fam.Name, ex
159160
)
160161
continue
161162
fam_path = fam_doc.PathName
162163
# if the family path does not exists, save it temporary
163164
# only if the wasn't opened when the script was started
164165
if fam_doc.Title not in opened_families and (
165166
not fam_path or not os.path.exists(fam_path)):
166-
# edit family
167-
fam_doc = revit.doc.EditFamily(fam)
168167
# save with temporary path, to know family size
169168
fam_path = os.path.join(temp_dir, fam_doc.Title)
170169
fam_doc.SaveAs(fam_path, save_as_options)

0 commit comments

Comments
 (0)