* rhino and arc fix usage
* fix registration
* fix the rest
* use interface
* don't use rhino layer if there is no name
* formatting
* add tests
* formatting
* add to local and move
* Update OTEL to remove grpc dependency
* Fix deprecated method
* really fixed with no incremental builds for tests
* Fix references and lock
* Update nuggets
* Add Speckle v2 and v3 launch buttons to the Navisworks ribbon
- Added `LaunchSpeckleConnector` class with constants for command and plugin names
- Updated `NavisworksRibbon.name` file to include display names for Speckle v2 and v3
- Updated `NavisworksRibbon.xaml` file to include ribbon panels and buttons for Speckle v2 and v3
- Updated `NavisworksRibbon.xaml.cs` file to include commands for launching Speckle v2 and v3 connectors
- Added resources for the icons of the new buttons
* Delete AppUtils.cs and Commands.cs, add Utilities.cs
- Delete AppUtils.cs and Commands.cs (Replaced by v2 and v3 Tools)
- Add Utilities.cs for plugin utilities functionality
* Update Speckle Connector for Navisworks to use the new SpeckleV3Tool plugin and developer ID. Also, initialize the services with the correct version of Navisworks.
* Update RibbonHandler class in Navisworks connector plugin:
- Refactor the CanExecuteCommand method to handle different commandIds.
- Add a static constructor to subscribe to the PluginRecordsChanged event.
- Implement OnPluginRecordsChanged method to reset the cached state of V2 plugin availability.
- Modify ExecuteCommand method to load and activate the appropriate plugin based on the commandId.
- Add a new IsValidVersion method to check if the current version of Navisworks is compatible with the plugin.
* Update ribbon handling logic in NavisworksRibbon.xaml.cs
- Find the v2 plugin and update the availability state
- Hide the v2 ribbon tab if it exists
* Fix ribbon handling for Speckle v3 and v2 tools
Refactor the code in `RibbonHandler` to improve the handling of commands for Speckle v3 and v2 tools. The changes include:
- Extracting a new method `HandleCommand` to handle the loading and activation of plugins
- Removing duplicated code by calling `HandleCommand` for both Speckle v3 and v2 tools
- Adding null checks when finding plugin records
- Returning early if plugin loading should be skipped
* XMLDOC comments added
- Added two summary comments to describe the purpose of the methods `CanExecuteCommand()` and `ExecuteCommand()`.
* Add Speckle V2 and V3 tools to Navisworks plugin
- Added `SpeckleV2Tool.cs` file with constants for Speckle V2 tool
- Added `SpeckleV3Tool.cs` file with constants for Speckle V3 tool
* Refactor Utilities.cs for Navisworks plugin
- Add conditional compilation for DEBUG mode
* Remove debug code and comments in Utilities.cs
- Remove debug code that prints available plugins to the Debug output window
- Remove unused using statement for System.Text
* Refactor plugin activation logic in NavisworksRibbon.xaml.cs and Utilities.cs
- Simplify ActivatePluginPane method in Utilities.cs
- Remove unused parameter 'command' from ActivatePluginPane method
* Update Speckle branding and UI elements
- Changed display names for Speckle versions to reflect beta status.
- Updated XAML to simplify ribbon panel structure.
- Adjusted constants in the tool class for consistency with new naming.
* Fix formatting and improve error messages
- Added missing newlines for better readability in code.
- Updated error message to enhance clarity for users.
- Cleaned up XML formatting in project files for consistency.
- Ensured all package references are properly formatted.
* Add missing namespace for Navisworks integration
- Included the HostApp namespace to improve functionality.
- Ensures better access to required classes and methods.
* Fix message box formatting in Navisworks plugin
Updated the message box string concatenation for better readability.
* Add DisplayPathHelper class for generating display paths in Navisworks
This commit adds a new file, `DisplayPathHelper.cs`, which contains a helper class for generating display paths by traversing Navisworks model item ancestors. The `GenerateDisplayPath` method takes a `ModelItem` as input and returns a string representing the full path of display names from ancestors, stopping at the first object ancestor. If no first object ancestor is found, it returns just the model item's display name.
The helper class uses a constant `PATH_DELIMITER` to separate the display names in the generated path. It throws an exception if the input `modelItem` is null.
The algorithm works by starting from the first object ancestor and traversing backwards to the root, collecting non-empty display names along the way. Finally, it reverses the collected names and joins them with the delimiter to form the final display path string.
These changes improve code reusability and readability by encapsulating logic related to generating display paths in Navisworks models.
* Update NavisworksRootObjectBuilder.cs
- Modified the CreateNavisworksObject method to handle cases where the convertedBase or groupKey is null and return null in those cases
- Added a new private method GetDisplayPath to retrieve the modelItem and displayPath based on the applicationId
- Updated the CreateNavisworksObject methods to include the displayNamePath property in the returned NavisworksObject
* Refactor NavisworksRootObjectBuilder.cs: Add FindMeaningfulAncestorName method
This commit adds a new private method, FindMeaningfulAncestorName, to the NavisworksRootObjectBuilder class. This method is used to find the name of the most meaningful ancestor of a given NAV.ModelItem object. It iterates through the ancestors until it finds an ancestor with a non-empty DisplayName and no geometry. The found name is then used as the "name" property in the created NavisworksObject instances. Additionally, the "displayNamePath" property has been renamed to "path" for consistency.
* Refactor display path generation for Navisworks model items
- Update the helper class to generate display paths by traversing meaningful Navisworks model item ancestors.
- Skip nodes without meaningful names or geometry nodes when generating the display path.
- Reverse the collected names to build the path from root to leaf.
* Rename DisplayPathHelper.cs to HierarchyHelper.cs
- Renamed the file from "DisplayPathHelper.cs" to "HierarchyHelper.cs"
- Updated all references to the renamed file
Refactor helper class for generating display paths
- Refactored the helper class to extract hierarchical context from Navisworks model items in a single traversal
- Changed the method name from "GenerateDisplayPath" to "ExtractContext"
- Modified the method signature to return a tuple of strings (Name, Path)
- Updated the implementation logic accordingly
Improve traversal and extraction logic
- Improved the traversal logic by collecting both name and path information while traversing up the tree once
- Extracted meaningful name and path information from model items in a more efficient way
- Handled cases where model item has no meaningful name or is a geometry node
* Refactor NavisworksRootObjectBuilder.cs for improved context extraction
- Extracted the GetContext method to retrieve the name and path of a model item
- Replaced calls to GetDisplayPath with calls to GetContext for consistency
- Updated CreateNavisworksObject and ConvertBase methods to use the extracted context information instead of finding meaningful ancestor names
- Updated the "path" property in the returned NavisworksObject instances with the extracted path
* style: user facing names for frames
* style: user facing names for shells
* styling: user facing names for proxies
* style: dict utils as extension methods
* Add PeriodicThreadedEvent to EA and use it
* All timers gone
* add tests
* bug: build issues
* bug: form not being disposed properly
* feat: remove caching
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
* Add PeriodicThreadedEvent to EA and use it
* All timers gone
* add tests
* bug: build issues
* bug: form not being disposed properly
---------
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
* This is a workaround for Revit's order of operations when initializing
* Fix event listening
* Only allow methods on classes as opposed to anonymous lambdas
* formatting
* moved revit changed to fresh branch
* fix tests
* weakreference found should remove subscription
* Fix anonymous lambdas
* allow for static handlers and add tests
* Clean up
* formatting
* Change publish to avoid reentrancy issues. Change from semaphore to lock statement
* HostAppVersion
v21 and v22 following SDK updates
* Working POC for material and section proxies
* Refactoring section unpacking
Refactoring in accordance with PropertiesExtractor example
* Material unpackers
* Notes and documentation
* More explanations
* materialId
- Interim solution for viewer filtering is appending the materialId to assignments for each object
- For FRAME this was easy
- For SHELL not so easy. No GetMaterial method avaiable given a AreaObj sectionName. Implemented lightweight materialCache based on cDatabaseTable. Marked as temporary based on previous discussions
* Explicit dictionary entries
* Repeated property strings as consts
- Fair point for repeated strings in the CsiMaterialPropertyExtractor.cs
- Even more reason to include this across all repeated strings. Categories of properties screaming out for this. Added additionally
* PR review comments
- Dictionary lookups for material and section proxies
- Only create proxies for assigned sections and materials (not pretty)
* refactor(etabs): adds singleton converter cache for material and section relationships (#514)
* This is a workaround for Revit's order of operations when initializing (#511)
* This is a workaround for Revit's order of operations when initializing
* Fix event listening
* adds a singleton cache for material and section relationships to csishared
* updating extraction results and simplifying classes
* Only allow methods on classes as opposed to anonymous lambdas for Event Subscription (#512)
* This is a workaround for Revit's order of operations when initializing
* Fix event listening
* Only allow methods on classes as opposed to anonymous lambdas
* formatting
* fix tests
* weakreference found should remove subscription
* doument model store fix (#516)
* testing commit
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
* resolving conflicts, testing and small tweaks
- merged dev into branch
- added "type" parameter to group proxies for sections in order to distinguish between frame sections and shell sections
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* This is a workaround for Revit's order of operations when initializing
* Fix event listening
* Only allow methods on classes as opposed to anonymous lambdas
* formatting
* fix tests
* weakreference found should remove subscription
* Remove Dataflow usage
* format and remove dep
* merge fixes
* Fix serializer
* Add MainThreadContext
* add some main context detection
* add RevitMainThreadContext
* remove revit async?
* formatting
* use mainThreadContext
* Use more MainThreadContext
* some rearranging
* renaming
* Revit needs new run async
* merge fixes
* gather on worker, convert on main
* operations know threading but not host apps
* rhino options
* revit can receive
* autocad in progress
* need to yield for UI thread async
* revamp yield
* Found APIContext and removed it
* ArcGIS runs all workers on MCT thread
* Refactor ThreadContext and ArcGIS saving is always on a worker
* Revit threading is simplier?
* ArcGIS can not always go to the queued task
* format
* fix tekla compile errors
* Use EventAggregator to decouple exception handler and UI
* it's ALIVE
* regenerate locks
* Add Prism Evening to DUI
* clean up
* always run on background thread
* Clean up to be specific
* update etabs
* thread context
* autocad threading?
* merge fixes
* remove more async
* clean up
* fix build issues
* Do top level handling in event aggregator
* add some rhino events
* add more Rhino events and do Idle as OneTime with Id
* fix up rhino idle usages
* fmt
* can build agian
* Use valuetask
* fmt
* fix up some bridge execution to be sync
* cleanup
* add some non async paths for progress
* format
* remove needless selection
* Fixes
* Convert tekla
* selection event is used without idle
* Build fixes from merge
* Fix tests and clean up
* Add new events
* Properly dispose one time events
* Minor tekla updates