Skip to content

Conversation

bimgeek
Copy link
Contributor

@bimgeek bimgeek commented Aug 21, 2025

Description

Adds the processed category field to the properties, while maintaining the existing top-level category field.
Related to 2163.

User Value

We have helper functions in Power BI that deals with properties. Having category field under properties makes interacting with Revit properties much easier as everything is in one place, under properties.

Changes

  • ClassPropertiesExtractor.cs: Added GetCategoryName() method with DirectShape handling logic and included category in properties dictionary
  • RevitElementTopLevelConverterToSpeckle.cs: Refactored to use shared category processing method, eliminating code duplication

Result

  • Category now appears in both the top-level field and under properties
  • No breaking changes

Screenshots

image

Validation of changes

  • Tested with native Revit elements
  • Tested with DirectShapes

Copy link

linear bot commented Aug 21, 2025

@bimgeek bimgeek requested a review from clairekuang August 21, 2025 14:08
@bimgeek bimgeek marked this pull request as ready for review August 21, 2025 14:08
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.20%. Comparing base (0bfeef6) to head (aa47893).
⚠️ Report is 4 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1038   +/-   ##
=======================================
  Coverage   41.20%   41.20%           
=======================================
  Files         109      109           
  Lines        3080     3080           
  Branches      293      293           
=======================================
  Hits         1269     1269           
  Misses       1765     1765           
  Partials       46       46           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bimgeek bimgeek closed this Aug 21, 2025
@bimgeek
Copy link
Contributor Author

bimgeek commented Aug 21, 2025

From Claire's response:

I'm not a fan of duplicating props / muddying our object model without having a strategy for doing things consistently.

Adding this means now category is found in 4 places: on the object's collection, on the revitobject, inside the properties as a semantic name, and inside the props for revit's internal name.
For bashboards, it may end up making sense to add categories/types/etc as proxies instead.

Unless this is preventing a key feature in powerbi or users have complained, I would rather us not change the object model until we get more feedback on bashboards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants