Skip to content
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

Feat(Revit) : load missing types on receive #2646

Merged
merged 44 commits into from
Jun 27, 2023

Conversation

connorivy
Copy link
Contributor

@connorivy connorivy commented Jun 7, 2023

Description & motivation

Changes:

  • added elementTypeMapper class whose job is to either create or update a type map between incoming "types" and element types that exist in the project
    • The TypeMap's job is just to store the data
  • added familyImporter class whose job is to walk the user through importing family symbols into the active project
  • created interfaces IHostTypeAsStringContainer and ITypeMap that get passed to the DUI viewModel and allow DUI to access the data that is in the document
  • created IRevitElementTypeRetriever and implemented it on the converter. This allows the connector to pass objects to the converter and allows the converter (who knows about Objects) to query the objects for their types. It also exposes a couple element type retreival methods that cache the retrieved values in a new cache class
  • create ElementTypeInfo class to consolidate a bit of information about different categories and IElementTypeInfoExposer to let the converter expose that category info to the mapper (in the connector)
  • created new missingIncomingType dialog that pops up by default when there are incoming types that don't exist in the project
  • created conversionCache object to store elementTypes (and eventually other things) during mapping so we can retrieve them faster during conversion
  • deleted a lot of old code that did the same thing but worse

Screenshots:

Validation of changes:

manual sending and receiving. The tests project is no longer in the speckle sharp repo so we'll definitely need to figure out what to do about that and run / create some tests

Checklist:

  • My pull request follows the guidelines in the Contributing guide?
  • My pull request does not duplicate any other open Pull Requests for the same update/change?
  • My commits are related to the pull request and do not amend unrelated code or documentation.
  • My code follows a similar style to existing code.
  • I have added appropriate tests.
  • I have updated or added relevant documentation.

References

#1240

@teocomi teocomi self-requested a review June 8, 2023 17:31
@teocomi teocomi added enhancement New feature or request revit issues related to the revit connector. labels Jun 8, 2023
@teocomi teocomi linked an issue Jun 8, 2023 that may be closed by this pull request
@teocomi
Copy link
Member

teocomi commented Jun 20, 2023

As discussed on discord, we need to ensure that loadable family instances are supported too. Since the family name is missing from the UI it could be confusing for the user to know what is missing and what to map to (some families of the same category would have the same type name eg window1-50x100cm, window2-50x100cm).

image

@AlanRynne AlanRynne added this to the 2.15 milestone Jun 26, 2023
@connorivy connorivy merged commit 0a16cec into dev Jun 27, 2023
@connorivy connorivy deleted the revit/connor/load-missing-types branch June 27, 2023 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request revit issues related to the revit connector.
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Dynamically load missing families on receive
3 participants