-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Element type query centralised and made more logical #1154
Conversation
81bab27
to
19eb778
Compare
@BHoMBot check core |
@pawelbaran to confirm, the following checks are now queued:
There are 4 requests in the queue ahead of you. |
@pawelbaran to confirm, the following checks are now queued:
There are 4 requests in the queue ahead of you. |
@pawelbaran to confirm, the following checks are now queued:
There are 18 requests in the queue ahead of you. |
@pawelbaran to confirm, the following checks are now queued:
There are 19 requests in the queue ahead of you. |
9c53850
to
b61274d
Compare
@pawelbaran to confirm, the following checks are now queued:
There are 31 requests in the queue ahead of you. |
@pawelbaran to confirm, the following checks are now queued:
There are 62 requests in the queue ahead of you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on different Revit versions and LGTM! 👍
3c9b0ed
to
2175b79
Compare
@BHoMBot check required |
@pawelbaran to confirm, the following checks are now queued:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@pawelbaran to confirm, the following checks are now queued:
There are 15 requests in the queue ahead of you. |
Issues addressed by this PR
Closes #1146
Test files
On SharePoint.
Changelog
Construction
)Query.ElementType
stopped from modifying the queried Revit element typesAdditional comments
The problem proved to be much more complex than originally stated #1146. There were 3 parallel challenges to deal with:
First two were rather straightforward to capture and fix, just a matter of pulling the strings together. The 3rd one, however, was a bit more tricky. Until now, when
Query.ElementType
was called on physicalWall
,Beam
etc.,ToRevitElementType
method was called from within. This resulted in an attempt to convert and overwrite the parameters of the existing type (if found) instead of simply querying it. This, I believe, is fundamentally wrong, so this has been changed toQuery.ElementType
only querying the element type, but never modifying it.The above is a breaking change, but I believe it is a step in the right direction, plus it is likely to be left unnoticed by the users. The only scenario affected by the change is a
Push
of an object with its defining property (e.g.Construction
) having modified Revit parameter values (not properties) usingSetRevitParameter
method. Now, after the change,Push
of elements affects the elements, while modification of element types can be achieved by pushing the element types themselves.Sorry for the non-Revit users trying to understand the above 🙈