Skip to content

Enum reflecting Revit categories added and category matching mechanism refactored #1312

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 10 commits into from
Feb 27, 2023

Conversation

pawelbaran
Copy link
Member

@pawelbaran pawelbaran commented Feb 15, 2023

Issues addressed by this PR

Closes #1226
Closes #1295

Test files

On SharePoint - open your fav model and try pulling by category chosen from dropdown. Dropdown UX improvement has been proposed in BHoM/Grasshopper_UI#677 and BHoM/BHoM_UI#450.

Changelog

  • BH.oM.Revit.Enums.Category added with all Revit categories along with human-readable labels in attributes
  • category matching mechanism has been refined in a way that if a category is correctly added to the above enum, it will both appear in the UI dropdown as well as become available in BH.Revit.Engine.Core.Query.BuiltInCategory(string, bool)
  • CategoriesWithNames method added that returns a collection of built in categories with correspondent labels that are consistently supported by the system

Additional comments

Now we should be able to freely extend the list of supported categories @travispotterBH - for now I added Revision from the nonstandard ones.

@pawelbaran pawelbaran added the type:feature New capability or enhancement label Feb 15, 2023
@pawelbaran pawelbaran self-assigned this Feb 15, 2023
@pawelbaran
Copy link
Member Author

Ah, also the UI of the enums has been tweaked in BHoM/BHoM_UI#448 @travispotterBH

@pawelbaran
Copy link
Member Author

I have just pushed a surgical commit that is probably easiest to review in isolation - it is only removal of redundant method parameters, so you should only see minor removals, no other changes.

@pawelbaran
Copy link
Member Author

@BHoMBot check core
@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

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

  • check core
  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@pawelbaran
Copy link
Member Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

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

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

There are 7 requests in the queue ahead of you.

@pawelbaran
Copy link
Member Author

@BHoMBot check null-handling

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

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

  • check null-handling

There are 21 requests in the queue ahead of you.

@pawelbaran
Copy link
Member Author

@BHoMBot check versioning

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

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

  • check versioning

@pawelbaran
Copy link
Member Author

@BHoMBot check required

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

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

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

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 16, 2023

The check versioning has already been run previously and recorded as a successful check. This check has not been run again at this time.

@vietle-bh
Copy link
Contributor

I've gone through the code and all looks good. Having an issue with obtaining a Rhino license on my laptop though, so will test this in Grasshopper as soon as IT sorts Rhino out for me 👍

Copy link
Contributor

@vietle-bh vietle-bh left a comment

Choose a reason for hiding this comment

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

In my test, clicking on the Category dropdown menu gave a 3-4 seconds delay.
The list isn't sorted but I guess it's just how Revit orders these values:

image

image

@pawelbaran
Copy link
Member Author

Thanks for review @vietle-bh, on your comments:

Copy link
Contributor

@vietle-bh vietle-bh left a comment

Choose a reason for hiding this comment

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

The category list is sorted alphabetically and works like a dream with searches 😍

image

image

@pawelbaran
Copy link
Member Author

@BHoMBot check compliance

2 similar comments
@pawelbaran
Copy link
Member Author

@BHoMBot check compliance

@pawelbaran
Copy link
Member Author

@BHoMBot check compliance

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 27, 2023

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

  • check code-compliance
  • check documentation-compliance
  • check project-compliance
  • check branch-compliance
  • check dataset-compliance
  • check copyright-compliance

@pawelbaran
Copy link
Member Author

@BHoMBot check core
@BHoMBot check null-handling
@BHoMBot check serialisation
@BHoMBot check versioning
@BHoMBot check installer

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 27, 2023

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

  • check core
  • check null-handling
  • check serialisation
  • check versioning
  • check installer

There are 6 requests in the queue ahead of you.

@pawelbaran
Copy link
Member Author

@BHoMBot check ready-to-merge

@bhombot-ci
Copy link

bhombot-ci bot commented Feb 27, 2023

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

  • check ready-to-merge

There are 4 requests in the queue ahead of you.

@pawelbaran pawelbaran merged commit 8fb3eb5 into develop Feb 27, 2023
@pawelbaran pawelbaran deleted the Revit_Toolkit-#1226-CategoriesAsEnum branch February 27, 2023 21:51
@bhombot-ci bhombot-ci bot mentioned this pull request Mar 13, 2023
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.

Update BuiltInCategory Method to include all built in categories Revit_oM? : Revit Built-in Categories as Enum
2 participants