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

Fix(Navisworks): CNX-1329 - Fix Saved Sets Filter to Properly Handle Nested Folders #631

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

jsdbroughton
Copy link
Contributor

@jsdbroughton jsdbroughton commented Feb 26, 2025

The NavisworksSavedSetsFilter class only retrieves saved sets at the top level and doesn't correctly handle selection sets within folders. The IndexOfGuid method also fails to find selection sets within nested folders.

Changes

  1. Updated GetSavedSets() to recursively collect all saved sets from all folders in the hierarchy
  2. Implemented a better path display format using ">" as the separator to show the folder hierarchy
  3. Replaced IndexOfGuid usage with ResolveGuid on the root document object to properly locate saved sets regardless of their position in the folder structure
  4. Improved hierarchical naming to display the folder path from root to leaf

Implementation

  • Added recursive traversal of the selection sets hierarchy to discover all saved sets
  • Created a proper hierarchical naming scheme that shows parent-child relationships
  • Fixed GUID resolution by using the Navisworks API's ResolveGuid method

This update ensures users can select and use saved sets anywhere in the folder structure, not just at the root level.

- Updated exception messages to be more informative based on visibility settings.
- Simplified the logic for throwing exceptions when no model items are found.
- Introduced new methods for collecting saved sets and building hierarchical names.
- Simplified selection set resolution with a more concise approach.
- Updated initialisation of items to use arrays instead of lists.
- Improved error handling when resolving GUIDs for selection sets.
Copy link

linear bot commented Feb 26, 2025

@jsdbroughton jsdbroughton changed the title Fix(Navisworks): CNX-1329 - Allow for selecting nested sets for selection Fix(Navisworks): CNX-1329 - Fix Saved Sets Filter to Properly Handle Nested Folders Feb 26, 2025
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.71%. Comparing base (3ff4075) to head (95432f6).

Additional details and impacted files
@@          Coverage Diff          @@
##             dev    #631   +/-   ##
=====================================
  Coverage   8.71%   8.71%           
=====================================
  Files        227     227           
  Lines       4370    4370           
  Branches     545     545           
=====================================
  Hits         381     381           
  Misses      3974    3974           
  Partials      15      15           

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

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.

1 participant