Skip to content

Commit

Permalink
Merge pull request #2135 from 3Pinter/3Pinter-patch-forms-init
Browse files Browse the repository at this point in the history
Joris van der Meulen > patch forms init
  • Loading branch information
jmcouffin authored Mar 4, 2024
2 parents f48b820 + 2ba8399 commit 45afa37
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions pyrevitlib/pyrevit/forms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2682,15 +2682,16 @@ def select_parameters(src_element,

if include_type:
# collect type parameters
src_type = revit.query.get_type(src_element)
param_defs.extend(
[ParamDef(name=x.Definition.Name,
istype=True,
definition=x.Definition,
isreadonly=x.IsReadOnly)
for x in src_type.Parameters
if x.StorageType != non_storage_type]
)
if src_type is not None:
src_type = revit.query.get_type(src_element)
param_defs.extend(
[ParamDef(name=x.Definition.Name,
istype=True,
definition=x.Definition,
isreadonly=x.IsReadOnly)
for x in src_type.Parameters
if x.StorageType != non_storage_type]
)

if exclude_readonly:
param_defs = filter(lambda x: not x.isreadonly, param_defs)
Expand Down

0 comments on commit 45afa37

Please sign in to comment.