Skip to content

Handling of host information refined, support for FamilyInstances hosted on linked elements plus ToRevit convert for Architecture.BuildersWork.Opening added #1127

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

Merged
merged 35 commits into from
Nov 30, 2021

Conversation

pawelbaran
Copy link
Member

@pawelbaran pawelbaran commented Nov 23, 2021

NOTE: Depends on

BHoM/BHoM_Engine#2705
BHoM/Versioning_Toolkit#179

Issues addressed by this PR

Closes #990
Closes #1012

Test files

PR-specific tests on SharePoint:

  • CreateUpdateIInstances is an updated standard test that includes the elements hosted on links
  • PullIInstances same as above, just for Pull
  • folder Openings contains a workflow that shows two concepts:
    • matching BHoM types with specific families and parameter mapping - on both Push and Pull
    • handling and leveraging the host information on Push and Pull

The above tests are meant to become the new versions of standard Alpha test files. Additionally PerformanceTest verifies the execution speed of geometrical search, which seems to be quite satisfying.

On top of the above, verifying UpdateType from the standard test library is recommended.

Changelog

  • ToRevit convert method for BH.oM.Architecture.BuildersWork.Opening added
  • RevitHostFragment introduced to consistently store the information about host Id as well as its original document in case when it is a link
  • RevitIdentifiers refined to reflect the changes in handling of host/link information
  • FindHost and ContainingElement methods added to enable geometrical search for host elements
  • Create.FamilyInstance refined to accept host elements from linked models
  • Modify.SetLocation refined to support host elements from linked models
  • LinkInstance queries refined to support the above changes
  • HostId query replaced with HostInformation to return both Id and document info
  • SetType method cleaned up

Additional comments

This is a massive PR, but was hard to split into smaller ones taken the mutual relationships between most changes - I will provide as many tests as possible to ease the pain of the reviewers.

There is one breaking change - HostId property has been removed from RevitIdentifiers fragment and moved to RevitHostFragment, but the values are not going to be copied over - this is because this would require versioning of all IBHoMObjects, which I guess would be super heavy.

@kayleighhoude @enarhi, among the test files there is a sample showing workflow with parameter and family mapping, which allows for pulling elements of wide categories (e.g. Generic Models or Mechanical Equipment) and mapping them to particular BHoM types incl. transfer of parameters to properties - I believe this is going to be neat!

@ssiimmoonnee the concept of host search could be helpful in e.g. finding hosts for windows/doors - happy to pick this up in the next PRs!

…tId on RevitHostFragment changed to string LinkDocument, code aligned to work with the changes
@FraserGreenroyd
Copy link
Contributor

@BHoMBot check serialisation

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 24, 2021

@FraserGreenroyd to confirm, the following checks are now queued:

  • serialisation

michal-pekacki
michal-pekacki previously approved these changes Nov 26, 2021
Copy link
Contributor

@michal-pekacki michal-pekacki left a 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 with success 👍

@pawelbaran
Copy link
Member Author

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 26, 2021

@pawelbaran to confirm, the following checks are now queued:

  • null-handling

@pawelbaran
Copy link
Member Author

@FraserGreenroyd what is the chance the null-handling check is simply wrong? Or could we make it at least return an informative message? I was scrolling through the entire chain of PRs a few times and feel like another hour can be used more efficiently than doing this yet another time...

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

@FraserGreenroyd to confirm, the following checks are now queued:

  • null-handling

There are 4 requests in the queue ahead of you.

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

FAO: @FraserGreenroyd
@pawelbaran is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is null-handling.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 4355675258

@pawelbaran
Copy link
Member Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 29, 2021

@pawelbaran to confirm, the following checks are now queued:

  • code-compliance
  • documentation-compliance
  • project-compliance
  • core
  • null-handling
  • serialisation
  • installer
  • versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

FAO: @FraserGreenroyd
@pawelbaran is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is project-compliance.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 4358521994

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

FAO: @FraserGreenroyd
@pawelbaran is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is null-handling.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 4358522629

Copy link
Contributor

@michal-pekacki michal-pekacki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@FraserGreenroyd to confirm, the following checks are now queued:

  • null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@pawelbaran just to let you know, I have provided a check-installer result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM_Engine

@pawelbaran
Copy link
Member Author

@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@pawelbaran just to let you know, I have provided a check-versioning result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM_Engine

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

FAO: @FraserGreenroyd
@pawelbaran is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate.

The check they wish to have dispensation on is project-compliance.

If you are providing dispensation on this occasion, please reply with:

@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 4358521994

@pawelbaran
Copy link
Member Author

@BHoMBot check copyright-compliance
@BHoMBot check dataset-compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@pawelbaran to confirm, the following checks are now queued:

  • copyright-compliance
  • dataset-compliance

There are 3 requests in the queue ahead of you.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot this is a CI/CD instruction. I am authorising dispensation to be granted on check ref. 4358521994

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@FraserGreenroyd I have now provided a passing check on reference 4358521994 as requested.

@FraserGreenroyd
Copy link
Contributor

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Nov 30, 2021

@FraserGreenroyd to confirm, the following checks are now queued:

  • ready-to-merge

There are 4 requests in the queue ahead of you.

@FraserGreenroyd FraserGreenroyd merged commit 1dfba47 into main Nov 30, 2021
@FraserGreenroyd FraserGreenroyd deleted the Revit_Toolkit-#1012-OpeningConverts branch November 30, 2021 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New capability or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce converts for BH.oM.Architecture.BuildersWork.Opening Introduce a way of applying host element information to pushed objects
4 participants