Introduces caching mechanisms for fragment IDs and geometry to avoid redundant processing, significantly enhancing geometry conversion speed.
Adds methods to clear caches and retrieve statistics for performance monitoring and memory usage estimation.
Handles COM exceptions and invalid operations more gracefully, preventing crashes and improving stability.
Introduces a `ComScope` struct to automatically manage the
lifecycle of Navisworks COM objects using RAII principles.
This prevents memory leaks caused by unreleased COM objects,
addressing a common issue with Navisworks interop.
Refactors geometry processing logic to handle instances more efficiently.
It now correctly applies transformations for single objects, ensuring accurate placement in the scene.
Simplifies processing of transforms where necessary for single objects.
Removes redundant logging.
Introduces instance geometry handling for more efficient and accurate Navisworks data streams.
This includes:
- Scoping the `InstanceStoreManager` to each conversion session.
- Creating a "Geometry Definitions" collection to store shared geometry.
- Adding instance definition proxies to the root collection.
Addresses issues with duplicate geometry and improves stream performance.
Streamlines display value extraction by injecting the geometry converter.
This change simplifies the DisplayValueExtractor by removing its dependencies on settings and logging.
It now directly uses a GeometryToSpeckleConverter instance, which is passed in, for converting model item geometry.
Adds a service to manage shared geometry and instance definition proxies.
This system uses two stores for geometry definitions and their instance proxies,
facilitating efficient handling of shared geometry. It provides methods for
adding, retrieving, and clearing geometries, ensuring deduplication and
optimized memory usage.
Adds geometry instancing to improve performance and reduce data size when converting Navisworks models with shared geometry.
It identifies shared geometries based on fragment paths, extracts the base geometry once, and creates instance references with transforms. This reduces data duplication and improves loading times in Speckle.
Improves handling of COM array data for fragment ID generation and includes comprehensive logging for debugging instancing issues.
Introduces a shared project file for the Navisworks converter, promoting code reuse and consistency across different Navisworks converter implementations.
This file includes common data extractors, data handlers, helpers, services, and settings, reducing duplication and improving maintainability.
Introduces an instance store manager to handle shared geometry, which includes separate stores for geometry definitions and instance proxies.
This change prepares for the implementation of an instancing pattern compatible with .NET Framework.
It also registers settings from a factory to resolve conversion settings.
Creates a singleton service for deduplicating geometry during conversion.
This service stores mesh objects, preventing redundant processing of identical geometries by leveraging application IDs.
It uses a dictionary and a hash set to optimize lookup and storage, and includes thread safety mechanisms.
* reuse existing materials
* comment out purge material
* fix: unnecessary using directives
* more details in exception message and remove material purge.
---------
Co-authored-by: Björn Steinhagen <88777268+bjoernsteinhagen@users.noreply.github.com>
* POC
* some fixes
* Handle autocad, rhino and sketchup receives
* Handle revit receive
* Fix transform issues
* fix: custom mesh id logic
* Hash function
* Merge pull request #1142 from specklesystems/jedd/cnx-2657-hashing-the-meshes
feat(revit)!: Use Hash function for mesh geometry instance ids
* Use v2 style transform
* extra comments
* experiment1
* correct transform logic and disposal
* corrected transform logic
* simplify (maybe) the transform combination
* refactor(revit): replace tuples with DisplayValueResult record for display values (#1145)
* Clear instance proxies per conversion
* fix: material assignment on revit receive (#1146)
* Fix: enable send caching (#1148)
* Enable caching without definition proxy noise
* Log element id relationship while creating cache to filter after conversion to attach root
* Update RevitRootObjectBuilder.cs
* Clear cache on document swap
* More clean up
* fix(revit): defer material proxy population to prevent duplicate instance mesh IDs (#1155)
* fix(revit): defer material proxy population to prevent duplicate instance mesh IDs
* chore: formatting
* chore: campsite
* refactor: throwing on cache error
* refactor: move material proxy population into cache singleton
* fix: di
* fix(rhino): match cleaned block names when purging instance definitions (#1156)
* fix(rhino): match cleaned block names when purging instance definitions
* refactor: simplification
* chore: comments
* refactor: use .Contains
---------
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Co-authored-by: Björn Steinhagen <88777268+bjoernsteinhagen@users.noreply.github.com>
* Push doc to callers if possible
* use check for active doc earlier. Use doc instead of linked doc
* Use passed in current doc instead of getting active doc each time
* fmt
* Remove extra using
* Make revit exception be a conversion exception
* Use ApplicationException
* chore: variable name
---------
Co-authored-by: Björn Steinhagen <steinhagen.bjoern@gmail.com>
* Avoid using blam operator to ignore nulls
* Making more null docs be handled
* formatting
* throw instead of silent failure
* push dependencies upwards
* push up more document handling
* Pass doc rather than regetting it
* added comment
* move doc null check
* fix: expose Select All and Invert Selection in ValueSet context menu
* feat: "Always select all" toggle to collection and property selectors
* refactor: auto-select instead of always select
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix: clear `Base.id` to force serializer recomputation of mutations
* fix: same treatment for blocks
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix: `QuerySpeckleObjects` index out of range with type-specific outputs and path filtering
* chore: unnecessary using statement
* refactor: simplify ternary operator chain to if statements
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix: collection order inconsistency in RootObjectUnpacker
* fix: adam
* refactor: use List instead of HashSet in SplitAtomicObjectsAndInstances
* fix: no need for .ToArray()
* chore: sdk version bump
* Getting a key on exception could result in null reference exceptions
* Unique id does not exist?
* Use CreationGUID which isn't null
* add comment
* Generate keys differently
* more robust solution that doesn't use hashcode
* Progress the final sqlite message....can still take a while
* Update SDK to alpha for testing
* fixes speed tests
* Add more tests from AI
* add more detail to progress message
* Fixed tests to make sense
* Update SDK to 3.5.2
* Revit files persist model card data to a file like Tekla instead of into the file
* fmt
* fixes logger
* Update Connectors/Revit/Speckle.Connectors.RevitShared/HostApp/RevitDocumentStore.cs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* adds missing path and properties to model object casting
* slight optimization to not retrieve material twice when color is inherited from material
* enables casting of non-geometrybase geometry like points
* adds casting of model object in case of no baked geometry id
* adds block def casting for non-baked definitions also
* creates appid in case of empty for non-baked objects
* Update SpeckleGeometryWrapperGoo.ModelObjects.cs
* Reduce allocations of scoped items
* update SDK to 3.4.6
* add SpeckleSolveInstance
* fix SDK update
* Update SDK to 3.4.8
* Just setup a context if things are used without first setitng one up
* fixes material wrapper casting
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* Flattens pseudo class properties
Handles properties that are not dictionaries by adding them to a "pseudo class properties" category.
This commit flattens those properties into the main dictionary for easier access.
Also filters specific property names like "ClassName" and "DisplayName".
* Avoids processing empty property sets
Prevents processing of objects with no category dictionaries, improving performance and avoiding potential errors.
Changes `bannedNamesForProps` from `List` to `HashSet` for faster lookups.
* Uncomments continue statement.
Re-enables the `continue` statement within the hierarchical property handler.
This ensures that the loop proceeds to the next iteration when a specific condition is met, which prevents unintended behavior.
* Make a Rhino 8 importer
* adjust things to not require SDK changes
* something like this
* rhino importer cli sketch
* fix deps and solutions
* things build
* move to files
* change signatures of things to not require sendinfo or accounts
* formatting
* Fix test
* Reuse some account
* Fix logging and possible error
* formatting
* add active doc disposal
* add global try/catch
* merge fix
* add rhino importer
* add SLN and use it
* have to put back the extension rename
* SDK update
* Try out loading the plugin manually
* don't need the mac SLN
* fix lock
* fix lock again?
* Use the location of the assembly, not current
* Fix lock file
* fix lock on windows
---------
Co-authored-by: Chuck Driesler <cdriesler.iv@gmail.com>
* adds additional raw converters to grasshopper
* adds plane, vector, and interval to supported property value types
* Update Speckle.Converters.RhinoShared.projitems
* merge conflict resolutions
* Refines origin mode handling logic
Improves validation of origin mode settings to ensure
valid values are processed correctly. If the origin
mode is null or invalid, a default is returned, reducing
errors and clarifying logic.
Cache eviction has been maintained for previous types
only when necessary, enhancing performance efficiency.
* Simplifies the retrieval of the origin mode setting by consolidating conditions into a single if statement.
* Improves cache eviction logic by removing redundant checks and ensuring defaults are applied correctly.
Simplifies the handling of saved viewpoints and group items.
Removes legacy defensive checks and clarifies conditions for adding viewpoints.
Ensures that only non-empty groups are processed, improving efficiency.
Relates to ongoing feature enhancements.
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* adds url by token component
* Add gubbins for passing Account objects and AccountResource objects to include token usage
* format
* add bits to make things work?
* revert usage of SpeckleApplication
* review fixes
* more reverts
* Fix tests
* token is correct now
* fix build
* fixes url resource exception and adds new icon
* Made model cards dumb and moved conversions
* can build NW
* actually, remove dead code
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
also changes the output type of create collection to be a collection param, to enable previewing
Co-authored-by: Björn Steinhagen <steinhagen.bjoern@gmail.com>
* extract properties from c3d block references
* cleans up property set structure and adds properties to autocad root to speckle
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* easy changes
* generics are fun
* second pass
* reverted cancellation changes
* bring back receive
* ConfigureAwait(false);
* worker count
* lock files, that will need to be changed before pr
* updates
* notnull
* minor tweaks
* made stable tag
* locks
* locks
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* Refactors hierarchical name building for saved items
Moves hierarchical name construction to a new helper class.
Modifies the selection set filtering logic to enhance clarity.
Updates the root item handling to streamline the recursive logic.
Improves code maintainability and readability.
* Adds saved views filter for object selection
Implements a new filter to manage saved views in the application.
Enables users to select and manage saved viewpoints effectively.
Implements logic to resolve saved views and collect visible object IDs based on current selections, enhancing the user experience in managing views.
Improves selection efficiency and overall usability.
* Adds new view filter for sending operations
Updates service registration to include the new filter for improved data handling.
* refactors property group to support nesting
* adds support for nesting speckle props
* build fixes
* removes unused fields
* refactors for simplicity on adding props to atts
* formatting fix
* updates speckle props error message
* get properties for ADB entities is back
* removed comment
* added comment, changed condition to filter CDB entities
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix (Rhino) Missing group from applicationIdMap fix
* Throw a better exception when an application id is missed
* back to collection and added log statement
* Only log errors and observe them if they're speckle related. Others log if possible and let bomb out the app
* stacktrace is nullable
* Process the exceptions as inner exceptions
* Null handling
* Change how it's fixed
* ToString
---------
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
* Don't log conversion errors to seq?
* add cancellation
* Make a generic handler for receive conversions
* Use for all receives?
* for cancellations, rethrow
* add vibe tests
* fix up receive cancellation
* fmt
* made ReceiveOperationManager with revit
* everything compiles
* fmt
* add tests
* This check shouldn't report to seq
* Don't log conversion errors to seq?
* add cancellation
* Make a generic handler for receive conversions
* Use for all receives?
* for cancellations, rethrow
* add vibe tests
* fix up receive cancellation
* fmt
* Rhino uses SendOperationManagerFactory
* revit now uses it
* autocad and civil use it
* csi, tekla and NW
* add test
* formatting
* tested with rhino and revit
* formatting
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* updated converters after text class update
* fix after text class changes
* packege version bump after text calss update
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* feat: inherit names for create collection and create properties poc
* feat: `KeyWatcher` class for tab key auto inheritance on connecting
* docs: bonus comments
* feat: setting to always inherit
* chore: `AlwaysInheritNames` default to `false`
* feat: `AlwaysInheritNames` status of setting banner
* refactor: consistency with "names" not "nicknames"
* feat: persist `AlwaysInheritNames` setting
persist setting when closing and reopening script
* feat: automatic name inheritance for variable parameters
- automatic parameter name updates when source component names change
- event subscription shenanigans to SpeckleVariableParam for ObjectChanged events
* fix: refresh when setting enabled and ensure behaviour after
* fix: auto update when toggled after connection and document reload fix
fixes issue where enabling "Always inherit names" after connecting components didn't work and parameter names were lost when reopening saved documents.
* refactor: get rid of code duplication
* refactor: `CreateCollection`
* feat: auto-resizing of components after name change
* feat: disable parameter renaming if automatically inheriting names
* Revert "feat: disable parameter renaming if automatically inheriting names"
This reverts commit 4b348aeba0.
* fix: grey out naming when auto inherit
* Updates legacy logo files
* Replace v3 logo resources
* Differentiates legacy connector
Makes the legacy connector distinguishable in the UI.
This ensures that users can easily identify and select the correct version.
* feat: cast typing poc for brep
* refactor: more types to cast w seperate methods
* refactor: attempt to reduce verbosity
* fix: subd and pointcloud only for rhino8
* refactor: cast to geo first
* chore: remove redundant `success`
* refactor: cycomatic complexit and adding missing casts
- `TryCastTo<T>` too complex -> cycomatic complexity error. refactored into separate methods
- added missing casts of circle, arc, extrusion and hatch
* refactor: cyclomatic complexity and adding missing casts
- `TryCastTo<T>` too complex -> cyclomatic complexity error. refactored into separate methods
- added missing casts of circle, arc, extrusion and hatch
* refactor: move Rhino 8 casting methods to ModelObjects partial file
* AccountService and AccountManager need interfaces. RootObjectUnpacker is done by AddConnectors
* Use Application slug instead of parsing it. Fix DI usage
* revert files
* add back usage of the interface
* resolve merges
* feat: allow casting from speckle properties to user content poc
* docs: thoughts
* fix(grasshopper): add CastToModelObject fallback for Rhino7 builds
* chore: remove raw rhino type cast
* adds automatic input gen
* prettier
* fizes null prop value exceptions
also fixes unrelated bug that will allow users to bake on selected layer (if obj has no path)
* adds ability to deconstruct speckle props, and also to create empty props
* by default add an input parameter
---------
Co-authored-by: Björn Steinhagen <steinhagen.bjoern@gmail.com>
* add text converter to GH
* Get the first matching Property named Value
* adjust parameter description (debatable)
* add text converter to GH
* Get the first matching Property named Value
* adjust parameter description (debatable)
* add text converter to GH
* Get the first matching Property named Value
* adjust parameter description (debatable)
* fake commit
* Revert "fake commit"
This reverts commit 702fbce8d5.
* adjusts comments and factors in text scale in rhino
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix: left-click enabled for `SpeckleSelectModelComponent`
* fix: left-click instead of right-click
- `RespondToMouseDown` to disable component selection when clicking the button
- `RespondToMouseUp` to respond to left-click and not right-click
* refactor: left-click instead of right-click description
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* add slnx and generate from it (but got errors)
* can generate slnx
* Can generate hostapp specific slnx
* use slnx for build and clean up
* Revert as we're still on 8 SDK
* really not use slnx for builds
* Make the code generate SLNs too
* use existing consts
* add grasshopper
* Don't generate old slns for slugs
* add SLNX info to the readme
* forgot revit 26
* add MixPanel manager like v2
* add mixpanel to send and receive
* fix tests
* Delete old events
* Don't track receive and send operation
They are already tracked by UI - we shouldn't track them on low level, they always need to be tracked with UI clicks etc
* Pass account from outside
* Add email if available
* Add mixpanel to GH
* Add ui dui3 prop as default
* Remove mixpanel object from tests
* renames categories
* TODO notes for NodeRun later
* Add note for account id nullability
* Grasshopper specific send and receive info for workspace ids
* Auto property
* isMultiplayer prop for mixpanel
* fix mismatch in account id and user id
* Helper function for convertion source app name to slug
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* add base revit 26 projects
* fix up cef replacement
* fix up revit 2026 events
* add revit events
* fixes for revit 26
* use right version of DI for Revit26
* add Revit26 to local
* fmt
* use visual studio to fix slns
* Add revit to installer constants
* move webview stuff to 2026 specific area to avoid build issues
* update locks
* Revit 2026 wants to invoke scripts with RevitTask. Abstract RevitTask
* fmt
* fix project copying
* use 3.2 SDK
* fix build
* Revit 2025 is now CEF vulnerable
* add SendProgress to not overload revit context
* update Revit 26 lock files
* update locks
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* Don't throw exceptions but handle missing model cards and log it.
* Change another thing to not throw
* RunMain for Revit should always run on the Revit context
* add comment
* feat: Boilerplate project for Grasshopper v3
* Working POC receive with working Rhino conversions
* v3 Receive outputs most objects, very basic
* feat: Working initial nodes
Receive, Collection, URL parsing for models, root object unpacking
* feat: unpacking logic wip
* feat: total wip expand collection node
* wip
* wip
* feat: adds value type component, all is very raw and wip
* mega wips
* wip wip
* wip
* wip
* wip: conversions (wip!)
* wip: centralises converter access in grasshopper
makes life... easier
* wip: filter objects by path
* wip: various cleanup
* wip: more cleanup and comments
* dev merge build fixes
* Adds Alan's select model component
* adds point, pointcloud, and hatch display to grasshopper object
* adds send component
* fixes send component and adds additional bitmap icons
* Update GrasshopperSendOperation.cs
* adds url to send component
* fixes fallback conversion bug
* feat(grasshopper): asyncify send and receive nodes (#694)
* adds async component base
* adds reference to async component
* adds async to send component
* updates receive async to be a separate component
also adds cancellation, auto receive, progress
* package lock updates
* updates send async with cancellation, progress, and more
* Update packages.lock.json
* Update Local.sln
* reorganize classes
- refactor create collection node to not duplicate logic
- adds model object support to object goo cast method
* adds bake to params
* castfrom bug
* fix converter bugs after dev merge
* adds layer baker and bake to objects
* cleans up typed converters for brep, extrusion, subd
* fixes modelobject casting
* adds bake to object param
* updates object and collection baking
* feat(grasshopper): add property receive nodes (#690)
* adds property path selector and filter by path components
* Update PropertyGroupPathsSelector.cs
* Auto stash before merge of "claire/cnx-1428-property-paths-selector-node" and "origin/claire/cnx-1428-property-paths-selector-node"
* fix dev merge issues
* Update packages.lock.json
* Create packages.lock.json
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* refactors everything to use new speckle collection class
* fixes bake bug
* uses observable collections to add proper baking to create collection nodes
* Update SpeckleCollectionWrapper.cs
* fix/feat: various
re-applies topology; prevents mutation on send; renames wrapper classes to have wrapper in name etc.
* chore: package.lock.json commit.
this might be not needed?
* feat(grasshopper): polishes property filtering nodes (#714)
* refactors properties to cast to simple types
* updates property groups
* merge conflict fixes
* fixes property group bugs
* fixes model object property group cast
* fixes property group cast
* update param category
* fixes output tree generation
* supports model object casting in the path selector
note: model objects will also register in the path list, along with their props. need to fix this
* feat(grasshopper): add create data object node (#719)
* Avoid multiple enumeration issues when saving if we copy the list first (#713)
* add create data object component
* fixes extrusion display
* adds name and user strings dynamically to output model objects
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* Revert "feat(grasshopper): add create data object node (#719)"
This reverts commit 04bd151da3.
* feat(grasshopper): adds create object node (#724)
* Avoid multiple enumeration issues when saving if we copy the list first (#713)
* add create data object component
* fixes extrusion display
* adds name and user strings dynamically to output model objects
* undo geometry list to geometry in object goo
* Update SpeckleGrasshopperObject.cs
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* adds create property group component (#725)
* fixes property bug
* more prop casting fixes
* feat(grasshopper): add support for grasshopper in rhino 7 (#733)
* moves gh 8 to shared project
* adds grasshopper 7
* moves model object logic into partial class files
* Update Local.sln
* adds brep extrusion and subd receive to data objects
* Update DataObjectConverter.cs
* package locks
* feat(grasshopper): add support for sending and receiving colors (#745)
* feat (revit): receive Region as native FilledRegion (#696)
* regions with failed viewId
* render stuff in the first found suitable view
* use native or fallback conversion depending on the view
* better comments
* implement conditional conversion
* remove comment
* comment
* unload Root Host converter
* fix highlighting the model
* inject PlanView converter
* specify views in which receive is supported
* throw unsupported views in advance
* remove redundant check
* ViewManager added; View check is moved to the beginning of receive operation (to throw once and not for every object)
* simplify and remove unused
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* adds color baker to receive
* Update SpeckleGrasshopperObject.ModelObjects.cs
* adds colors on send
* Update GrasshopperColorUnpacker.cs
* removes host object builder (unneeded)
* fixes navisworks package locks
---------
Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
* fixes layer baking (#746)
* adds preview to speckle object params (#747)
* fix(grasshopper): renames collections, publish, and load (#748)
* renames collections, publish, and load names
* adds bool run to sync load and publish
* creates expand object component (#750)
also refactors previews for collections to be on the parameter
* chore(grasshopper): changes collection path selector to omit input collection name (#751)
* changes collection path selector to omit input collection name
also fixes preview bug in collections
* changes direct object path to colleciton name instead of "_"
* fixes path bug for objects directly inside input collection
* feat(grasshopper): add support for sending and receiving render materials (#753)
* adds support for render materials on receive and create speckle object
also adds a speckle material wrapper and param
* fixes receiving and baking bugs
* Update GrasshopperColorUnpacker.cs
* Update GrasshopperSendOperation.cs
* update locks
* feat(grasshopper): adds regex search to valueset component (#754)
* adds regex search to valueset component
* Update SpecklePropertyWrapper.cs
* cleans run
* feat(grasshopper): adds icons to all components fml (#755)
* adds param icons
* adds all icons
* Update FilterPropertiesByPropertyGroupPaths.cs
* Update Speckle.Connectors.GrasshopperShared.projitems
* fixes async send exception (#758)
* small fix to publish to include created version
* simplifies speckle model resource to model link
* dev changes
* more dev merge fixes
* Revert "more dev merge fixes"
This reverts commit 1323c336c7.
* Revert "dev changes"
This reverts commit c5ff149bb6.
* Revert "Merge branch 'dev' into grasshopper"
This reverts commit 8bcc70cced, reversing
changes made to 2ae80cc7ba.
* fixes material baking on objects (#767)
* not really a fix, but optimizes enumeration (#769)
* fixes exception, and also removes dynamic keys prop (#772)
* adds better tooltip and warning (#773)
* adds casting from speckle object to model object (#774)
* feat(grasshopper): adds render material to model object cast if it exists (#775)
* adds casting from speckle object to model object
* casts render material if it exists
* Update SpeckleGrasshopperObject.cs
* fixes send async issue
* feat(grasshopper): add filter objects node (#778)
* updates resources
* adds a temporary filter object component
* Update GetCollectionObjects.cs
* fixes bugs in collection and filter nodes
* adds nuget
* adds missing package references
* adds missing prop
* fixes default render material bug (#779)
* feat(grasshopper): changes expand obj node to deconstruct node (#781)
* changes expand obj to deconstruct
* Update ComponentUtils.cs
* fixes bug in deconstruct node
* update package locks
* Reverted revithostobjectbuilder to match dev
* Reverted revit converter to match dev
* reverts changes to various files in importers, local, and sdk
* reverts changes to tests and rhino send binding
* updates local with grasshopper
* more merge conflict resolutions
* more merge conflict build fixes
* removes extra tests
* removes unused package locks
* feat(grasshopper): adds casting of collections to model layers (#790)
* adds casting to model layers
* Account Service fixes
* feat(grasshopper): make create object a passthrough (#791)
* changes create speckle object to a passthrough node
also adds casting from model object to material and properties
* Update SpeckleMaterialWrapper.ModelObjects.cs
* repackages objects into data objects on send (#794)
* allows for creation of multiple property groups (#799)
* bump nuget
* refactor(grasshopper): removes Base inheritance on wrappers (#802)
* removes base inheritance and adds new speckleWrapper class
* removes all base inheritence
* small send bugs
* Feat(gh): add search to account and project node (#804)
* Add search and show more components for projects, models, versions
* Cleanup
* Proper button for show more versions
* Fix build errors
* feat(grasshopper): filter objects node now outputs list of removed objects (#805)
* allows for creation of multiple property groups
* adds second output to filter objects component
* removes load on open option
* add path to create speckle object output
* Update CreateSpeckleObject.cs
* Update FilterSpeckleObjects.cs
* feat(grasshopper): add layer to model object casting (#807)
* preserves layer on model object casting, if exists
* Update SpeckleCollectionWrapper.cs
* adds deep copying and fixes more mutations in create collection and send
* adds casting of speckle mat to render mat, and hides url param
* bug fixes
* removes dataobject grouping (#809)
* fix(grasshopper): adds support for pointcloud and hatch (#811)
* adds missing pointcloud and hatch conversions
* changes name of create speckle object
* removes passthrough speckle object name change
* should fix topology issue
* throws clearer exception when casting unbaked model objects to speckle objects
* Dim/gh props (#812)
* feat: makes property creation node item based
* feat: makes property paths selector output a flat list regardless of input structure
* feat: adds simple & clean get obj props
* feat: leaner output param diff
allows for connections to be held when swapping nodes and such
* feat: cleanup (replaces old component with new)
* adds error and returns in case of bad type input in create props
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix(grasshopper): materials stuff (#816)
* fixed by always sending new id on the wrapper.
* Update CreateSpeckleObject.cs
* fix(grasshopper): more material bugs (#817)
* fixes render material proxy assignment bug
* retrieves model object color and material depending on source
* chore(grasshopper): adjusts icons and names (#818)
* adjusts icon sizes, cleans up names
* removes wrongly sized icons
* update locks
* Update GrasshopperReceiveOperation.cs
* feat(grasshopper): adds sample scripts and documentation (#822)
* adds docs and sample scripts
* Update Speckle Grasshopper - Sample Scripts.gh
* updates sample scripts and docs
* fixed units (#823)
* removes unneeded files
* removes changes to unrelated files
* re-adds missing controlpoint converter
* oops wrong folder
* Update ControlPointToSpeckleConverter.cs
* fixes geometry mutation bug in speckle object passthrough node
* Feat(gh): workspaces and search wizard (#820)
* WIP
* Menu handlers for projects and models
* Extract all handlers outside
* Remove account from handlers
* Reset version count
* Add workspaces
* Introduce SpeckleOperationWizard
* Move sync ops to dev section
* Fix sdk remainings
* Organize files and namespaces
* Remove context menu setters
* Bump sdk to 3.3.0
* Get the last selected account id from config
* Add workspaces to select model component
* Handle workspaces
* Add separator at ctor
* Get rid of from last fetched collections in wizard
* Reorder public privy functions
* Bump sdk 3.3.3 for project with permissions
* Remove expire solution on account change
* Move SolveInstanceWithUrlInput to wizard
* Better state handling on search
* handle account switch
* close menu explicitly when reset
* Have workspace logo
* Don't populate menu completely after search
* Logo as prop in workspaces
* Create a workspace flow
* Bump sdk back to 3.3.3
* Fixed DI
* Fix unplug URL state
* Set icon null when reset workspace
* personal projects as workspace
* Handle project permissions over pasted URL
* Clean up the main component
* handle all errors at the top level for wizard component
* Set last used account id to config
* Change the message level to warning for accounts
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
---------
Co-authored-by: Alan Rynne <alan@speckle.systems>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
* WIP
* Menu handlers for projects and models
* Extract all handlers outside
* Remove account from handlers
* Reset version count
* Add workspaces
* Introduce SpeckleOperationWizard
* Move sync ops to dev section
* Fix sdk remainings
* Organize files and namespaces
* Remove context menu setters
* Bump sdk to 3.3.0
* Get the last selected account id from config
* Add workspaces to select model component
* Handle workspaces
* Add separator at ctor
* Get rid of from last fetched collections in wizard
* Reorder public privy functions
* Bump sdk 3.3.3 for project with permissions
* Remove expire solution on account change
* Move SolveInstanceWithUrlInput to wizard
* Better state handling on search
* handle account switch
* close menu explicitly when reset
* Have workspace logo
* Don't populate menu completely after search
* Logo as prop in workspaces
* Create a workspace flow
* Bump sdk back to 3.3.3
* Fixed DI
* Fix unplug URL state
* Set icon null when reset workspace
* personal projects as workspace
* Handle project permissions over pasted URL
* Clean up the main component
* handle all errors at the top level for wizard component
* Set last used account id to config
* Change the message level to warning for accounts
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
* feat: add send rebars as solid toggle
* feat: rebar `displayValue` default of centrelines
* feat: sending rebars as solid poc
- need to refactor to avoid duplicate code
- is this the best way? what if user view isn't fine?
* refactor: extract common code and code comments
* refactor: reduce code duplication in DisplayValueExtractor with record
* refactor: wording volumetric not solid
* fix: explicit check for "Type ID" and subsequent send of id
* fix: internal definition name
* docs: some comments
* refactor: internal name check in ParseParametersSet not GetValue
* fix: ToString for id return
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* support TextEntity
* add alignment; split to lines
* add rotation; add textDot converter
* simplify text splitting check
* adapt to changes in Text class
* fix
* optimize
* adjust namespace
* global usings
* more specific alignment conversions
* aesthetic fixes
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* feat: makes property creation node item based
* feat: makes property paths selector output a flat list regardless of input structure
* feat: adds simple & clean get obj props
* feat: leaner output param diff
allows for connections to be held when swapping nodes and such
* feat: cleanup (replaces old component with new)
* adds error and returns in case of bad type input in create props
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* preserves layer on model object casting, if exists
* Update SpeckleCollectionWrapper.cs
* adds deep copying and fixes more mutations in create collection and send
* adds casting of speckle mat to render mat, and hides url param
* bug fixes
* allows for creation of multiple property groups
* adds second output to filter objects component
* removes load on open option
* add path to create speckle object output
* Update CreateSpeckleObject.cs
* Update FilterSpeckleObjects.cs
* fix: getting builtinCategory
i think this has moved from atomicObject level to inside properties (at some stage) which broke this and caused category to always be null
* docs: comment on accessing builtInCategory
* docs: extra comment
* docs: live pr review
* refactor: not loud about missing property anymore :(
* fix: main model DocumentToConvert with transform
- was previously hard-coded to null, therefore never transformed
* fix: accounting for reference point setting w linked model
combine mainModelTransform and linkedModel.GetTotalTransform().Inverse to align the linked model’s elements correctly under the main model’s chosen reference point.
* changes create speckle object to a passthrough node
also adds casting from model object to material and properties
* Update SpeckleMaterialWrapper.ModelObjects.cs
* Caught error with SpiralDirection
Caught error with SpiralDirection
* Applied a fix to getting all AlignmentSubEntitySpiral properties so they return null if an exception is thrown
* Applied same solution to AlignmentSubentityArcToSpeckleRawConverter and AlignmentSubentityLineToSpeckleRawConverter
* Update AlignmentSubentitySpiralToSpeckleRawConverter.cs
* Update AlignmentSubentitySpiralToSpeckleRawConverter.cs
* formatting
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* Ci experiment
* with comma
* is_public_release
* Pass fileversion via envars
* semver
* to main
* keep fetch depth on linux
* last test (tm)
* Updated workflow-dispatch
* Fetch depth now required for prs too
* and for tests too
* target main
* add tests for receive operation
* clean up some items and tests
* First initialization changes for SDK 3.2
* Update to SDK 3.2
* merge fixes
* fmt
* ifc changes
* fix tests and remove fakes again
* fmt
* remove extra tests from local sln
* update locks for 3.2
* fix mismerge
---------
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
* adds support for render materials on receive and create speckle object
also adds a speckle material wrapper and param
* fixes receiving and baking bugs
* Update GrasshopperColorUnpacker.cs
* Update GrasshopperSendOperation.cs
* add autocad 26 stuff
* fix targets and remove some duplication
* add 2026 gubbins
* Fix build for Autocad and new projects
* fmt
* fmt when new line doesn't picked up
* add to local
* can do a receive in civil
* only show debounced items in console
* add civil to build consts
* add civil 26 to local sln
* Bump nuget and project references from 2025 to 2026
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* changes collection path selector to omit input collection name
also fixes preview bug in collections
* changes direct object path to colleciton name instead of "_"
* feat (revit): receive Region as native FilledRegion (#696)
* regions with failed viewId
* render stuff in the first found suitable view
* use native or fallback conversion depending on the view
* better comments
* implement conditional conversion
* remove comment
* comment
* unload Root Host converter
* fix highlighting the model
* inject PlanView converter
* specify views in which receive is supported
* throw unsupported views in advance
* remove redundant check
* ViewManager added; View check is moved to the beginning of receive operation (to throw once and not for every object)
* simplify and remove unused
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* adds color baker to receive
* Update SpeckleGrasshopperObject.ModelObjects.cs
* adds colors on send
* Update GrasshopperColorUnpacker.cs
* removes host object builder (unneeded)
* fixes navisworks package locks
---------
Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
* Adds Navisworks 2026 connector
Introduces a new connector for Navisworks 2026, enabling Speckle to interact with the latest version of the software.
This includes project files, dependency configurations, and plugin manifest updates.
* Adds support for unreleased Navisworks version
Adds provisional support for a newer, unreleased version of Navisworks.
Uses a temporary workaround to handle the version number until the official SDK is available.
* Updates Speckle dependencies
Updates the Speckle.Objects, Speckle.Sdk, and Speckle.Sdk.Dependencies packages to version 3.1.8 in the Navisworks connector.
This ensures compatibility and incorporates the latest features and fixes from the Speckle ecosystem.
* Updates Navisworks 2026 support
Uses the correct enum value for the 2026 Navisworks version.
This ensures that the application correctly identifies and supports the
specified version when it becomes available in the SDK.
* Updates WebView2 and adds System.Reactive
Updates the WebView2 package to the latest version.
Adds the System.Reactive package.
* Also lock the converters dependency
* Fix local.sln
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
* feat: poc for independant view returns for instance
- next commit will optimise unnecesarry / redundant for loops
* refactor: earlier exit in FindLinkInstanceForDocument
- early exit in FindLinkInstanceForDocument in no transform
- linq expression for matching transform hash
- some docs
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* regions with failed viewId
* render stuff in the first found suitable view
* use native or fallback conversion depending on the view
* better comments
* implement conditional conversion
* remove comment
* comment
* unload Root Host converter
* fix highlighting the model
* inject PlanView converter
* specify views in which receive is supported
* throw unsupported views in advance
* remove redundant check
* ViewManager added; View check is moved to the beginning of receive operation (to throw once and not for every object)
* simplify and remove unused
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* clean send (except closed circular arcs)
* split functions
* include inner loops for complex regions
* reorient only polycurves with arcs
* regions to host
* merge conflict
* substract regions on receive
* optimize
* add checks
* fix icurve, receive hatches
* hatch receive
* reduce dataObject conversions
* finally hatches are recorded in a database
* regrouped
* simplify
* rename
* send hatch (only the first)
* remove hatches for now
* comment
* fixed icurve converter and reference in DataObject converter
* reformat
* hatch to speckle
* hatch to host
* hatch receive works
* set solid pattern on receive
* send properly and throw if complex hacth
* calculate mesh area from region
* prevent Autocad crash by catching exceptions in the middle of transaction
* sending both polylines and curves for hatches
* boolean operation for sending hatches
* turned 2d Hatch curves into 3d - now Brep creation doesn't fail!
* circles handled
* construct both polyline and vertices in parallel
* handling splines on receive
* comments
* don't reverse proper segments
* basic comment fixes
* open block table for write more concise
* use top-level transaction
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* Avoid multiple enumeration issues when saving if we copy the list first (#713)
* add create data object component
* fixes extrusion display
* adds name and user strings dynamically to output model objects
* undo geometry list to geometry in object goo
* Update SpeckleGrasshopperObject.cs
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* Avoid multiple enumeration issues when saving if we copy the list first (#713)
* add create data object component
* fixes extrusion display
* adds name and user strings dynamically to output model objects
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* fix(revit): sening via views with correct visibility to linked models
* handle not null
* pass path name to function instead full doc
* refactor: move common code outside
* docs: commenting on known limitations
* refactor: preprocessor directive specific stuff back in place
* refactor: oversight on common code
* fix: method name
* docs: cleanup
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* refactors properties to cast to simple types
* updates property groups
* merge conflict fixes
* fixes property group bugs
* fixes model object property group cast
* fixes property group cast
* update param category
* fixes output tree generation
* supports model object casting in the path selector
note: model objects will also register in the path list, along with their props. need to fix this
* Bjorn/cnx 1359 have a setting in UI whether include or not (#646)
* feat(revit): linked model settings
* docs: cache invalidation note
* Feat(revit): linked models POC (#656)
* cleanup on RefreshElementsIdsOnSender
* POC for multiple and copied linked models
* fix render materials for copied linked models
* comment
* comment
* split linked models with collections
* style: ci potential null on key
* style: not null
---------
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
* feat(revit): sending linked model poc round two (#657)
* Added IFC app name (#648)
* test: add tests for threadcontext (#651)
* add tests for threadcontext
* add test for extensions
* remove needed usage
* fix for looking for model store (#654)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* test: Send Operation tests (#652)
* add tests for threadcontext
* add test for extensions
* remove needed usage
* move cancellation
* Only add send operation tests
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* chore (autocad/civil): add regen after receive (#650)
* regenerates doc
* moves regen to receive base binding
* Update AutocadReceiveBaseBinding.cs
* feat: linked model send responsive to ui
- current throw just a placeholder
- small variable name refactor
* fix: object reference not set to an instance of an object
* fix: display value extractor
* refactor: converterSettings as readonly field
* feat: warning in response to ui setting not enabled
* docs: todos etc.
* Revert "Merge branch 'dev' into bjorn/cnx-1360-get-linked-models-on-send-function-according-to-setting"
This reverts commit 7202058a98, reversing
changes made to 4bc9ec2352.
---------
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* fix: transform needed to be inversed (#659)
* feat(revit): linked models send by category (#666)
* docs: notes on collection filtering
* feature: RevitCategoriesFilter with linked models too
poc
* docs: notes
* feat(revit): commit structure (#675)
* feat: collection structure switch
- poc
- if linked models, send nested
- if not linked, send flat
* docs: comments on updates
* docs: comment on exception swallowing
* fix: nullability
* refactor: linked model helper class and refactor (#682)
* fix: premature processing of linked models
- add early check for linked models setting
- skips expensive element collection for linked models when disabled
- add empty document contexts for linked models when disabled to maintain warning generation (HACK)
- improve code readability with clearer variable names and comments
* refactor: category ids outside of linked model processing
- inefficient to repeat for every document
* fix: improve separation of concerns for linked model handling
- extract linked model processing to a dedicated method
- add IsLinkedDocument flag to DocumentToConvert class
- move linked model warning generation to RevitRootObjectBuilder
- make RevitSendBinding responsible only for element collection
* refactor: dedicated LinkedModelHandler class for linked model processing
- extract linked model element collection logic to a separate class
- improve separation of concerns between flow control and element collection
- add clear documentation explaining the responsibility boundaries
* fix: duplicate if check still floating around
* docs: over-explaining myself
* Fix(revit): do not use converter settings in element unpacker (#687)
* fix resetting the selected object ids after collecting the elements
* Pass document to element unpacker for the sake of linked models
* fix: send by categories mode
---------
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
* fix(revit): handle multiple linked model instances with transform hashing (#688)
* feat: linked model transform caching in RevitRootObjectBuilder
Add transform-specific hashing to properly handle multiple instances of the same linked model. Uses transform properties to create a unique suffix for the applicationId, preventing cached objects from being incorrectly reused across different transform contexts.
* more comments
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* fix: handle null elements when unpacking linked model groups
- add null element check before GroupBy in ElementUnpacker to prevent NullReferenceException
- improve robustness when processing groups in linked models
- add documentation explaining linked model element handling throughout UnpackElements method
- edge case where group member elements might not resolve properly in linked contexts
* make linked model setting true by default
* Fix(revit): illegal attempt to modify document (#700)
* Run refresh object ids in revit task
* Proper not null
* await instead .result
* feat(revit): collection structure for multiple linked model instances (#701)
* feat: suffix for instances of linked model
* Extract out GetIdFromDocumentToConvert
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* Correct receive default setting for linked models even if irrevelant
* Fix post conflict
* Cleanup the code
* Add comment
---------
Co-authored-by: Björn Steinhagen <steinhagen.bjoern@gmail.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* adds async component base
* adds reference to async component
* adds async to send component
* updates receive async to be a separate component
also adds cancellation, auto receive, progress
* package lock updates
* updates send async with cancellation, progress, and more
* Update packages.lock.json
* Update Local.sln
* Update CorridorDisplayValueExtractor.cs
For unknown reasons, sometimes trying to get the PropertySetDefinitionName throws an exception.
Updated to catch this, ignore that propery set, and move to the next one. It is never the "Corridor Identity" property set that has this issue, so there should be no missing data.
* .
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* Add affected usage with tag math
* use this branch as a test branch
* adjust test
* fix github action
* build refactor to get affected work
* Lazy affected
* put if statement on job
* add conditions around build and publish for linux
* affected tests and small refactor
* fmt
* verbose
* full checkout
* more testing and made things more clear
* adjust installer test branch
* add comments
* use zip on release
* detect main release
* use right trigger for release
* fix build
* maybe fix if statement...version env var don't work
* use current branch, not target branch
* test installer should be stored
* write to github action env vars
* use the env var correctly
* format
* set the output version as before
---------
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
* Refactors idle manager to shortcut call check
* fix tests
* Match the id of idle action with the function name
it is more safe with this way bc we might accidentially skip some deferred actions if we use class name
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* Improve error messages for object conversion
- Updated exception messages to be more informative based on visibility settings.
- Simplified the logic for throwing exceptions when no model items are found.
* Refactor saved sets filter logic
- 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.
* Use a concurrent dictionary to cache types since the converter is effectively a singleton
* Don't modify the collection in the getter
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* Remove unused path constants and update namespace
Deleted an unnecessary file for path constants. Updated the namespace in the remaining file to better reflect its purpose and added a new constant for material separation.
* Remove unused send filters
- Deleted the send filters list and related parameters from the constructor.
- Cleaned up code to streamline the binding process.
- Updated comments for clarity on behaviour expectations.
* Update Navisworks object creation logic
- Added extraction of parent path from the group key.
- Changed applicationId to use the parent path instead of the group key.
* Add path cleaning method and simplify geometry resolution
- Introduced `GetCleanPath` to remove material signatures from paths.
- Updated `ResolveIndexPathToModelItem` to use the new path cleaning method.
- Simplified `ResolveGeometryLeafNodes` to use expression-bodied member syntax.
* Improve geometry node grouping logic
- Added material signature handling for merging nodes.
- Enhanced grouping to only include anonymous geometry nodes.
- Introduced a method to create material signatures based on properties.
- Updated the parent path extraction from composite keys.
* Added an extendable signature generation pattern
- Simplified the grouping of anonymous geometry nodes.
- Replaced material signature generation with a new method for better clarity.
- Added functionality to include additional material properties in the signature.
- Improved hash generation for consistent property representation.
* Update material separator in path constants
Changed the material separator from "::MATERIAL::" to "::". This simplifies the constant and may improve compatibility with other components.
* Changed how the parent path is derived from the group key.
- Introduced a cleaner method to get the parent path.
- Updated applicationId to use the full composite key for uniqueness.
* Updated node path retrieval to use a more concise method.
- Simplified the creation of `mergedIds` by using a single variable for group keys.
- Removed unnecessary comments and whitespace for cleaner code.
* Add missing import for Navisworks constants
Included the Navisworks constants import to ensure proper functionality.
* Replaced custom hash function with MD5, suppressing related warnings.
* pass cancellation token to individual features
* move count to a separate function
* remove per-layer progress report
* fix count
* reorder
* count layers only once
* move count to "unpacking selection" activityFactory
* remove outdated comment
- Excluded "Transform" category from processing.
- Added a list of excluded properties: "Hidden", "Required", "Internal_Type".
- Improved handling for the "Item" category to add non-excluded properties directly to root level.
- Ensured only non-empty property dictionaries are processed.
* Add preserve model hierarchy feature
- Introduced PreserveModelHierarchySetting to manage hierarchy preservation.
- Updated NavisworksSendBinding to include new setting.
- Added HierarchyBuilder class for future functionality.
- Enhanced ToSpeckleSettingsManagerNavisworks with caching for the new setting.
- Modified conversion settings to support model hierarchy preservation.
* Add Navisworks hierarchy builder class
Implemented a new class to rebuild the Navisworks document hierarchy from geometry leaves, maintaining parent-child relationships. Key updates include:
- Added constructor and private fields for managing geometry and conversion services.
- Developed a method to build the hierarchical structure of Speckle objects.
- Implemented logic for climbing up the document structure to resolve missing ancestors.
- Introduced methods for converting model items and pruning empty collections.
* Refactor hierarchy handling in object builder
- Added support for preserving model hierarchy.
- Introduced a new hierarchy builder for nested structures.
- Adjusted flow to handle flat mode when hierarchy is not needed.
* Refactor model item conversion logic
- Simplified the conversion method for Navisworks ModelItem.
- Consolidated geometry and non-geometry object creation into single methods.
- Added parameter for property handler to streamline property retrieval.
- Improved clarity by reducing redundancy in code structure.
* Refactor hierarchy builder for cleaner conversion
- Replaced custom conversion method with a direct call to the converter.
- Removed redundant code related to converting ModelItem to Speckle Collection.
- Streamlined the process of handling model items in the hierarchy.
* Remove unnecessary comment in hierarchy builder
Cleaned up the code by deleting a redundant comment about resolving ModelItem from a path string. This helps improve readability without losing any functionality.
* Catch exceptions and reprocess them around RevitTask
* Added SpeckleRevitTaskException to know when exceptions are jumping over revit task to handle the UI
* add comments
* Add fatch when
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* Add Saved Sets Filter
* formatting
* !!!
* fml
* Unclear why formatting rules are not being applied
* !!!
* !
* fixed?
* Add new filter for saved sets in Navisworks
- Included a new file for NavisworksSavedSetsFilter.
* POC ISendFilterSelect
* Align saved sets filtler with ISendFilterSelect
* No DI for send filters
* reverse condition
* Remove ISendFilterSelect from revit views
* Add notes
* Improve object selection error handling
- Updated logic for retrieving model items to use selected paths.
- Enhanced error messages based on visibility settings of objects.
- Simplified null checks for selected items in filters.
---------
Co-authored-by: Jonathon Broughton <jonathon@stardotbmp.com>
* Claire/revit areas curves fix (#610)
* fixes display values for get_geometry method, and changes modelcurves to be sent as revitobject
also removes `level` prop in objects and adds the units and elevation to the level collection instead
* Update Speckle.Converters.RevitShared.projitems
* removes top level pointcloud converter
* Update RevitElementTopLevelConverterToSpeckle.cs
* Update property handling interface
Changed method to retrieve properties from Navisworks model items. Updated the method signature for clarity and improved functionality.
* Add property retrieval method to handler
Implemented a new method for getting properties from model items. It processes property sets and returns a dictionary of category values, enhancing the functionality of the property handler.
* Fix namespace formatting and improve property handling
- Cleaned up the namespace declaration.
- Added a check to ensure properties are a dictionary before processing.
- Streamlined property validation logic for better clarity.
* Simplified the `AddModelProperties` method signature by reducing parameters.
* Refactor property handling in base class
- Added a new method to retrieve properties from model items.
- Simplified the structure of processed property sets by removing nested dictionaries.
* Add hierarchical property retrieval method
Implemented a new method to get properties from model items.
- Introduced `GetProperties` to collect and filter hierarchical properties.
- Enhanced data handling with improved dictionary management for properties.
* Fix namespace formatting issues
Updated the namespace declarations in property handler files to ensure proper formatting.
* Refactor model item conversion logic
- Updated the method for converting Navisworks ModelItems.
- Simplified the creation of non-geometry objects.
- Removed unnecessary property handling code.
- Enhanced clarity by restructuring return values.
* Refactor model item conversion logic
- Simplified the conversion method for model items.
- Added a new method to handle geometry objects.
- Introduced property handling based on user settings.
- Improved clarity and maintainability of the code.
* Refactor geometry property handling
- Updated comments to clarify property merging rules.
- Removed unused methods for creating geometry and non-geometry objects.
- Simplified code structure for better readability.
* Refactor conversion method for brevity
Streamlined the `Convert` method to use an expression-bodied member. Removed unnecessary null check block and simplified the logic for better readability.
* Fix import statement formatting
Updated the import statement for consistency by removing an invisible character.
* Add class properties handling to property dictionaries
- Integrated class properties extraction into both property handlers.
- Updated logic to add or update entries in the property dictionaries based on extracted class properties.
- Ensured null checks for class properties before processing.
* Refactor property handling methods
- Removed the AssignPropertySets method for simplification.
- Streamlined GetProperties to directly return processed property sets.
- Cleaned up unnecessary checks and loops for better readability.
* Add ClassPropertiesExtractor to service registration
- Registered a new ClassPropertiesExtractor for better property handling.
- Kept existing property handlers and settings management intact.
* Refactor HierarchicalPropertyHandler for clarity
- Removed redundant property assignment logic.
- Integrated class properties extraction directly into the main method.
- Simplified error handling by eliminating unnecessary checks.
* Refactor property assignment methods
Removed the AssignProperties and AssignClassProperties methods to streamline property handling. Kept the abstract method for getting properties while maintaining the overall structure of the class.
* Refactor ClassPropertiesExtractor to instance method
Changed ClassPropertiesExtractor from static to instance class. Updated GetClassProperties method to be an instance method, allowing for better flexibility and potential state management in the future.
* Cleans civil3d props
also removes catchment and network proxies. this info is now captured in assignments
* Update ClassPropertiesExtractor.cs
* some bug fixes
* Update PartDataExtractor.cs
* adds parcel areas and excludes labels
* fix: ensure operations run on main thread to prevent etabsexceptions
* pr comments
* fix: ensure consistent exception handler usage in selection binding
* feat: material type distinction
* refactor: mixed concerns
Some structural asset stuff was in the MaterialQuantitiesToSpeckle.cs
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* clean properties in revit
also adds properties to non-dataobjects and changes grids to have a curve display value after removing curve prop on grids
* removes number from room since this is included in params
* refactors supported categories and throws when all selected objects are unsupported categories
* stupid typos
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* feature: database table extractor
* feature: frame length extraction
* feat: shell area extraction
* feat: frame length extraction
* feat: shell area extraction
* docs: cleaned up object extractors
* refactor: extensible database table extraction
* flexible indexing (can be defined by user, defaults to typical use-case of "UniqueName")
* better variable naming and more descriptive (better than csi's api)
* some fail safes e.g. when forgetting to put indexingColumn in array of columns to fetch
* refactor: using DatabaseTableExtractor for material name lookup
* lookup for material name of a shell can use the database table extractor and simplifies EtabsShellPropertiesExtractor a lot
* fix: openings shouldn't look for material assignments
Frustrating way Etabs handles openings - they shouldn't be a SHELL. Anyways. Rant over
* refactor: database table extractor handles dictionary lookups
* Fix threading bug
* untangle revit
* adds brepx converter
also changes groups to not be created if list conversion returns 1 or less objects
* revert rhino
* revert autocad
* revert rest
* remove event agg and rhino implementation
* remove event aggr from revit
* remove event aggr from autocad and civil
* remove event aggr tests
* remove event aggr from tekla
* Remove event aggr for navis
* remove event aggr from csi etabs
* remove event aggr for arcgis
* remove remaining pieces
* adds brep converter
* push autocad to run operations on main thread
* adds teklaidlemanager
* bring navis idle manager back
* run send on main
* adds extrusionx and subdx support
* adjusts converter return types to fallback case
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: Dogukan Karatas <karatasdogukan@gmail.com>
* adds name and properties to rhino and autocad
* move properties extractor to converter and updates attributes event listener
* moves name and properties back to connector because abstract rhinoobjectconverter doesn't capture all top level converters
* Update RhinoObjectToSpeckleTopLevelConverter.cs
* Update ServiceRegistration.cs
* adds explicit conditions for object attribute change event
* feat: simplifies rhino implementation
* fix: comments out acad usage as we can't test it
* fix: civil services (removal of acad props extraction)
* Update RhinoSendBinding.cs
* Update PropertiesExtractor.cs
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* feat: thermal and structural asset extraction initial scope
* feat: thermal and structural asset extraction poc
* feat: property set extraction (1/3)
* feat: property set extraction (2/3)
- scaling internal units can't be so complicated?
- to discuss :(
* feat: property set extraction (3/3)
- Simplification to just extract density from structural asset (if present)
- Just one property extraction => no need to create material proxy
- Scaled from internal units to match scaling to model units which occurs on other material quantities
* feat: display parameter unit with associated quantities
* feat: added name of structuralAsset to material quantities
* fix: safe string conversions
* fix: explicitly returning cached value
* fix: validation before dict insertion
* style: dict access
* fix: nullability
---------
Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
* 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
* First pass of moving IFC to connectors repo
* Fix some errors and ignore others
* fix namespaces and exceptions
* fix namespaces
* formatting
* Fix namespaces and move stuff
* add linux ci
* more csproj changes
* importer stuff will be the nuget
* add pack version and to Local sln
* do a nuget push on main
* fix restore
- Add reference to `Autodesk.Navisworks.Api.DocumentParts.DocumentDatabase`
- Add `_lastSavedState` field to store the last saved state
- Compare current state with last saved state before saving
- Update last saved state after successful save
- Rename `ClearAndSave` method to `ClearAndSaveThisState` for clarity pseudo override
- Reset last saved state when clearing models
* Add ColorUnpacker
* Add ColorConverter helper class for Navisworks conversion
This commit adds a new file, ColorConverter.cs, to the Helpers folder in the NavisworksShared project. The ColorConverter class provides methods for converting Navisworks colors to System.Drawing.Color, generating color hash strings, and getting human-readable color names.
* Refactor NavisworksMaterialUnpacker.cs for improved color conversion
The code changes in this commit refactor the NavisworksMaterialUnpacker.cs file to improve the color conversion process. Specifically, the ColorConverter class is now used to convert Navisworks colors to standard colors. This change enhances the accuracy and reliability of color conversions throughout the codebase.
* Add NavisworksColorUnpacker class to improve color unpacking logic
The commit adds the `NavisworksColorUnpacker` class to improve the logic for unpacking colours from Navisworks objects. It introduces a new method `UnpackColor` that takes in a list of Navisworks objects and a dictionary of grouped nodes. The method iterates over the objects, skips non-2D elements, and extracts colour information based on the selected representation mode.
The commit also introduces a helper method `Is2DElement` that checks if a given model item is a 2D element by examining its geometry using the ComApi.
Additionally, a new class `PrimitiveChecker` is added to implement the callback interface for checking primitive types in Navisworks geometry.
These changes aim to enhance the accuracy and efficiency of color unpacking for Navisworks objects.
* Add NavisworksColorUnpacker to service registration
Add NavisworksColorUnpacker to service registration
This commit adds the NavisworksColorUnpacker class to the service registration in the NavisworksConnectorServiceRegistration.cs file. Additionally, it includes the necessary changes in the NavisworksRootObjectBuilder.cs file to inject the NavisworksColorUnpacker dependency.
* Refactor BuildAsync function to reduce complexity
- Validate input parameters before processing
- Initialize root collection with name and units
- Convert all model items and store results
- Validate conversion results to ensure successful conversion
- Build final elements by grouping sibling geometry nodes and adding remaining non-grouped nodes
- Add proxies (render materials and colors) to the root collection if applicable
* feat: adds support for group selection events
* feat: stores group objects separately so we don't reconvert them
this will be necessary as well for layer change events later down the line
* chore: comments
* Rhino panels should be treated as if they might have been used before as Panels.Closed isn't called
* formatting
* Only Reinitialize when Rhino 8 and greater
* format
* Navisworks needs proper Async to update UI thread inline
* Tested Autocad and Rhino
* format and fix
* ArcGIS should yield too
* async/await for Tekla and ETABs
* Navisworks Connector Init
* Build crap
* Moar Init
* WIP - not yet working
* Minor fixes
* Fix missing constuctors
* unfix
* Test commit
* Test commit
* Remove Dataflow usage
* format and remove dep
* merge fixes
* Fix serializer
* Add MainThreadContext
* add some main context detection
* add RevitMainThreadContext
* remove revit async?
* Handle Document Events
* Document Model Store
* Proper implementation
* package updates
* updated to dev
* Document Events binding ???
* registration order
* Minimised events subscribed and handle new document state to clear models
* Stub Send command
* Refactor Connector class to change access modifier of Container property
The commit modifies the access modifier of the Container property in the Connector class from public to private. This change improves encapsulation and ensures that the property can only be accessed within the class itself.
* Fix NavisworksDocumentStore model list initialization and document validation
The commit fixes the initialization of the Models list in the NavisworksDocumentStore class. Instead of assigning an empty array, it now uses the Clear() method to clear the existing models.
Additionally, the commit improves the document validation logic by checking if critical properties are accessible before considering the document valid. It also handles cases where the document is disposed.
These changes ensure proper initialization of model lists and accurate document validation in NavisworksDocumentStore.
* Effectively debouncing on the SDI changes events
* Get Selected Objects
* ElementSelectionExtension is a collection of helpers to aid the resolution of intent
* [Navisworks] Manage document and model state changes
- Refactor NavisworksDocumentEvents to manage both document and model state change notifications
- Update comments to reflect the new functionality
- Rename SubscribeToEvents method to SubscribeToDocumentModelEvents for clarity
- Add HandleDocumentModelCountChanging and HandleDocumentModelCountChanged methods to track model count changes
- Update OnDocumentModelCountChanged method name to NotifyValidModelStateChange for clarity
- Update UnsubscribeFromEvents method name to UnsubscribeFromDocumentModelEvents for clarity
- Remove unused constants from NavisworksDocumentStore class
* formatting
* use mainThreadContext
* Use more MainThreadContext
* Update Navisworks API references and fix typos
- Update references to `Autodesk.Navisworks.Api` namespace to `NAV` namespace
- Fix typo in file name: `GlobalUsings.cs` renamed to `GlobalUsing.cs`
- Update references to `ModelItem` type from `Autodesk.Navisworks.Api` namespace to `NAV.ModelItem`
- Update references to `Document` type from `Autodesk.Navisworks.Api` namespace to `NAV.Document`
- Update references to database related types from `Autodesk.Navisworks.Api.Data` namespace to `NAV.Data`
- Add new file: NavisworksRootObjectBuilder.cs
- Remove unused using statements
* Add Navisworks2024 converter dependencies and update project references
- Added "Objects.Converter.Navisworks2024" to the packages.lock.json file with dependencies on "Speckle.Converters.Common" and "Speckle.Navisworks.API"
- Updated the Speckle.Connectors.Navisworks2024.csproj file to include a reference to "Speckle.Converters.Navisworks2024.csproj" and "Speckle.Converters.Common.csproj"
- Added "speckle.converters.common" to the packages.lock.json file with dependencies on "Microsoft.Extensions.Logging.Abstractions" and "Speckle.Objects"
- Renamed files:
- NavisworksConversionSettings.cs -> NavisworksConversionSettingsFactory.cs
- GlobalUsings.cs -> GlobalUsing.cs
- NavisworksConversionSettings.cs -> Settings/NavisworksConversionSettings.cs
- NavisworksConversionSettings.cs -> Services/NavisworksToSpeckleUnitConverter.cs
- NavisworksConversionSettings.cs -> ToSpeckle/NavisworksRootToSpeckleConverter.cs
* feat: Add NavisworksSendBinding changes
- Added Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging namespaces
- Added Speckle.Connectors.Common.Operations namespace
- Added Speckle.Connectors.DUI.Exceptions, Speckle.Connectors.DUI.Logging, and Speckle.Connectors.DUI.Models.Card namespaces
- Added Speckle.Sdk and Speckle.Sdk.Common namespaces
- Updated constructor of NavisworksSendBinding class to include additional parameters
- Updated Send method in NavisworksSendBinding class to include try-catch block for handling exceptions during send operation
- Updated CancelSend method in NavisworksSendBinding class to call the cancellation manager's CancelOperation method with the modelCardId parameter
- Added ResolveIndexPathToModelItem method in ElementSelectionExtension class to resolve the model item path from an index path string
- Added ResolveGeometryLeafNodes method in ElementSelectionExtension class to resolve geometry leaf nodes from a model item
- Updated Send method in NavisworksSendBinding class to use the resolved model items for sending data
* Update namespace in Navisworks plugin files
- Update namespace from "Speckle.Connector.Navisworks.NavisPlugin" to "Speckle.Connector.Navisworks.Plugin" in Commands.cs, DockableConnectorPane.cs, and NavisworksRibbon.xaml.cs files.
* Add Navisworks sending operations and converters
- Added sending operations for Navisworks models
- Registered the root object builder and send operation for Navisworks model items
- Added Navisworks converters to the service registration
- Updated the NavisworksRootToSpeckleConverter to handle null targets and validate target type before conversion
* Add folder to project items
- Added a new folder to the project items in the Navisworks converter.
- The folder includes the necessary files for extensions, global using, service registration, and conversion settings factory.
* Refactor NavisworksConversionSettings class to use properties instead of fields
- Convert fields to properties in NavisworksConversionSettings class
- Update constructor to initialize properties instead of fields
* Add Navisworks conversion settings factory and store initialization
- Add `INavisworksConversionSettingsFactory` to the constructor of `NavisworksSendBinding`
- Initialize `_conversionSettingsFactory` in the constructor of `NavisworksSendBinding`
- Initialize the conversion settings store with `_conversionSettingsFactory.Create(NavisworksApp.ActiveDocument)`
* Change element selection path separator from '.' to '/' in ElementSelectionExtension.cs
This commit updates the code in ElementSelectionExtension.cs to change the default separator used for resolving a Navisworks model item's unique index path representation. The previous separator was '.', and it has been changed to '/'. This change ensures consistency and compatibility with other parts of the codebase that rely on this representation.
* Add Navisworks model item to Speckle converter
- Add `ModelItemToSpeckleConverter.cs` file for converting Navisworks model items to Speckle objects.
- Update `GlobalUsing.cs` to include `SSM` namespace.
- Update project file `Speckle.Converters.NavisworksShared.projitems` to include the new converter file.
* some rearranging
* renaming
* Revit needs new run async
* merge fixes
* gather on worker, convert on main
* Update Speckle.Objects and Speckle.Sdk versions to 3.1.0-dev.200
- Updated the requested and resolved versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in packages.lock.json files for Connectors/Navisworks/Speckle.Connectors.Navisworks2024 and Converters/Navisworks/Speckle.Converters.Navisworks2024 directories.
- Also updated the contentHash values for both packages.
Note: This commit updates the versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in the mentioned directories' packages.lock.json files, along with their respective contentHash values being updated as well.
* operations know threading but not host apps
* Add Navisworks and 2024 projects, along with their connectors and converters
This commit adds the Navisworks project, along with the 2024 project. It also includes the connectors and converters for both projects.
* 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
* update etabs
* thread context
* autocad threading?
* Add Navisworks conversion settings and modes
This commit adds new files for Navisworks conversion settings and modes.
- The `ConversionModes.cs` file defines enums for representation mode and origin mode used during conversion.
- The `NavisworksConversionSettings.cs` file represents the settings used for Navisworks conversions, including properties such as document, units, origin mode, hidden elements, visual representation mode, and more.
- A new factory class `NavisworksConversionSettingsFactory.cs` is added to create instances of the conversion settings with calculated values based on the active document.
- A new file `GeometryHelpers.cs` which contains a static class `GeometryHelpers`. The class provides a method `VectorMatch` that compares two vectors to determine if they are approximately equal within a given tolerance. The method takes in two vectors and an optional tolerance value, and returns true if the vectors match within the tolerance, otherwise false.
* Add ArrayExtensions.cs for converting arrays to generic type arrays
This commit adds a new file, ArrayExtensions.cs, which contains an extension method for converting arrays to generic type arrays. The method uses the `Array.Copy` function to copy the elements of the original array into a new array of the specified generic type. This allows for more flexibility when working with arrays in the codebase.
Specifically Navisworks heavily uses 1* indexed arrays which are a pain to access generically.
* Delete Navisworks converters
This commit deletes two files: ModelItemToSpeckleConverter.cs and NavisworksRootToSpeckleConverter.cs. These files contained code related to converting Navisworks models to Speckle format. The deletion of these files indicates that the functionality provided by these converters is no longer needed or has been replaced by other methods.
* Add new classes for double-precision geometric primitives and transformation matrices
- Added `Primitives.cs` file containing definitions for `PointD`, `TriangleD`, and `LineD` classes with double-precision vertex storage
- Added `TransformMatrix.cs` file containing a class for 4x4 transformation matrices
- Updated project items to include the new files in the build process
* Add NavisworksObject and NavisworksGeometryObject classes
This commit adds the NavisworksObject and NavisworksGeometryObject classes to handle non-geometry and geometry-based Speckle objects converted from Navisworks. These classes implement the INavisworksObject interface, which provides methods for adding properties to objects and retrieving property values by key. The NavisworksObject class represents a non-geometry object with a name property and a dictionary of properties, while the NavisworksGeometryObject class represents a geometry-based object with a displayValue property, name property, and a dictionary of properties.
* Add ClassPropertiesExtractor, DisplayValueExtractor, and PropertySetsExtractor classes
- Added ClassPropertiesExtractor class to extract class properties from a NAV.ModelItem
- Added DisplayValueExtractor class to extract display values from a NAV.ModelItem
- Added PropertySetsExtractor class to extract property sets from a NAV.ModelItem
* feat: Add ExcludeProperties option to NavisworksConversionSettings
This commit adds a new boolean property, ExcludeProperties, to the NavisworksConversionSettings class. This property allows users to specify whether properties should be excluded from the output. The default value is set to false.
Changes:
- Added ExcludeProperties boolean property to NavisworksConversionSettings
- Updated NavisworksConversionSettingsFactory to include _excludeProperties field and pass it to the NavisworksConversionSettings constructor
* feat: Add ModelItemTopLevelConverterToSpeckle
This commit adds the `ModelItemTopLevelConverterToSpeckle` class, which converts Navisworks `ModelItem` objects to Speckle Base objects. The converter extracts display values, class properties, and property sets from the Navisworks object and creates a corresponding Speckle Base object.
* Add ModelPropertiesExtractor to NavisworksShared
This commit adds the ModelPropertiesExtractor class to the NavisworksShared project. The ModelPropertiesExtractor is responsible for extracting model properties from a NAV.Model and adding them to a dictionary. These properties include Creator, Filename, Source Filename, Units, Transform, Guid, and Source Guid. The extracted properties are then added to the navisworks object as key-value pairs.
* Refactor PropertyHelpers to handle property conversion and sanitization
- Refactored `PropertyHelpers` class to be static
- Added a dictionary of type handlers for converting property values
- Implemented `ConvertPropertyValue` method to convert property values based on their data type
- Added support for handling different data types, including boolean, string, integer, double, datetime, named constant, and 3D point
- Implemented `SanitizePropertyName` method to replace invalid characters in property names with underscores
- Added `IsCategoryToBeSkipped` method to determine if a property category should be skipped during processing
* feat: Add property set extraction logic
This commit adds logic to extract property sets from a NAV.ModelItem. It iterates through the property categories and properties, skipping certain categories as needed. Each property is added to a dictionary with its sanitized name as the key and its converted value based on Speckle units. The resulting property sets are stored in a dictionary with the sanitized category name as the key.
* Refactor ModelItemTopLevelConverterToSpeckle: Add IRootToSpeckleConverter interface
This commit adds the `IRootToSpeckleConverter` interface to the `ModelItemTopLevelConverterToSpeckle` class. It also modifies the `Convert` method to handle null target objects and updates the implementation of the `CreateNonGeometryObject` method.
* Add Navisworks 2020 - 2025
In addition to 2024
* Update DocumentModelStore.cs
- Made `HostAppSaveState` and `LoadState` methods public
- Updated method signatures to reflect changes
* Add BoundingBoxToSpeckleRawConverter
This commit adds the BoundingBoxToSpeckleRawConverter class, which is responsible for converting NAV.BoundingBox3D objects to Box objects. It includes methods for converting the target object and a nullable version of it. The converter uses settings from the IConverterSettingsStore interface to set up the base plane and create the bounding box with appropriate units and intervals.
* Fix null reference exception in NavisworksRootObjectBuilder.cs
The code change fixes a null reference exception that occurs when checking if `navisworksModelItems` is empty or null. If it is, a `SpeckleException` is thrown with the message "No objects to convert". Additionally, a check for `sendInfo` being null has been added before continuing with the conversion process. The progress of the conversion is reported using the `onOperationProgressed` callback.
* Refactor NavisworksBasicConnectorBinding and NavisworksSendBinding
- Simplify AddModel method in NavisworksBasicConnectorBinding
- Remove unused import statements in NavisworksSendBinding
- Update initialization of conversion settings in NavisworksSendBinding
* Update NavisworksServiceRegistration.cs
- Removed unused using statements
- Updated AddDUI method to use NavisworksDocumentModelStore
- Updated DocumentModelStore registration to use NavisworksDocumentModelStore
* Refactor NavisworksDocumentModelStore to updated API
- Clear the store and save when models are removed
- Load state from the database when models are added
- Rename methods for clarity: ReadFromFile() -> LoadState(), WriteToFile() -> HostAppSaveState()
- Improve exception handling and error messages
* Refactor data extractors in Navisworks converter
- Make `GetClassProperties`, `GetDisplayValue`, `GetModelProperties`, and `GetPropertySets` methods internal
- Remove unused using statements
* Update GlobalUsing.cs: Remove unnecessary global using statement
The commit removes an unnecessary global using statement in the GlobalUsing.cs file. This change helps to clean up the code and improve readability.
* Add NavisworksPrimitiveProcessor and PrimitiveProcessor classes
- Added NavisworksPrimitiveProcessor class with methods for processing Navisworks primitives
- Added PrimitiveProcessor class with methods for processing generic primitives
- Updated the constructor of PrimitiveProcessor to accept an additional parameter for local to world transformation
- Updated the Line, Point, and Triangle methods in both classes to use the new transformation logic
* feat: Add internal modifier to VectorMatch method
- Changed the access modifier of the VectorMatch method in GeometryHelpers class from public to internal.
feat: Add sealed modifier to NavisworksObject and NavisworksGeometryObject classes
- Added the sealed modifier to the NavisworksObject and NavisworksGeometryObject classes in NavisworksObjects.cs file.
refactor: Rename enum values in ConversionModes.cs
- Renamed the enum values MODEL_ORIGIN, PROJECT_BASE_ORIGIN, and BOUNDING_BOX_ORIGIN to MODELORIGIN, PROJECTBASEORIGIN, and BOUNDINGBOXORIGIN respectively in ConversionModes.cs file.
refactor: Update CreateGeometryObject method signature
- Updated the CreateGeometryObject method signature in ModelItemTopLevelConverterToSpeckle.cs file by making it static and using DisplayValueExtractor.GetDisplayValue instead of _displayValueExtractor.GetDisplayValue.
* Change origin mode constants to use camel case and update related calculations
- Update the origin mode constant from "MODEL_ORIGIN" to "MODELORIGIN"
- Update the origin mode constant from "PROJECT_BASE_ORIGIN" to "PROJECTBASEORIGIN"
- Update the origin mode constant from "BOUNDING_BOX_ORIGIN" to "BOUNDINGBOXORIGIN"
- Update the calculation of the transformation vector based on the new origin mode constants
* Add NavisworksPrimitiveProcessor and BoundingBoxToSpeckleRawConverter
The commit adds two new files: NavisworksPrimitiveProcessor.cs and BoundingBoxToSpeckleRawConverter.cs to the project. These files are included in the compilation process.
* Add support for Speckle connectors in Navisworks versions 2020 to 2025.
- Added runtime requirements and component entries for Navisworks versions 2020 to 2025.
- Each component entry includes the module name and app description.
* Add database transaction for table creation in NavisworksDocumentModelStore.cs
This commit adds a database transaction to ensure the existence of the required table before performing any operations in NavisworksDocumentModelStore.cs. This helps maintain data integrity and prevents errors related to missing tables.
* Update Navisworks connectors to include Speckle.Connectors.DUI dependency.
- Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2024 packages.
- Updated project references in the Navisworks2024 package to include the "Speckle.Connectors.DUI" project.
- Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2025 package.
- Renamed "NavisworksServiceRegistration.cs" to "NavisworksConnectorServiceRegistration.cs".
- Updated project references in the NavisworksConverters for 2020 and 2021 packages to include the "Speckle.Connectors.DUI" project.
* Refactor NavisworksSendBinding constructor parameters and dependencies
- Changed the type of `_conversionSettingsFactory` parameter in `NavisworksSendBinding` constructor from `INavisworksConversionSettingsFactory` to `NavisworksConversionSettingsFactory`.
- Removed duplicate initialization of `Parent` and `Commands` properties in the `NavisworksSendBinding` constructor.
- Moved the call to `SubscribeToNavisworksEvents()` after initializing `_conversionSettingsFactory`.
Register additional services for Navisworks connector
- Added registration for `ToSpeckleSettingsManager`.
- Added registration for `IOperationProgressManager`.
Refactor NavisworksRootObjectBuilder
- Updated access to `_converterSettings.Current.SpeckleUnits` to `_converterSettings.Current.Derived.SpeckleUnits`.
Update DockableConnectorPane.cs
- Updated the call to `services.AddNavisworksConverters()` to use the correct method name, which is now `services.AddNavisworksConverter()`.
Refactor ClassPropertiesExtractor, ModelPropertiesExtractor, and PropertySetsExtractor
- Updated access to `_settingsStore.Current.ExcludeProperties` to use `_settingsStore.Current.User.ExcludeProperties`.
Register additional services for Navisworks converter
- Added registration for `IToSpeckleSettingsManager`.
- Added registration for `INavisworksConversionSettingsFactory`.
* Bruh!!
- Update the type of _conversionSettingsFactory field from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory.
- Update the type of conversionSettingsFactory parameter in the constructor from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory.
* Add NavisworksRootObjectBuilder and related settings classes for sending operations
Add NavisworksRootObjectBuilder and related settings classes for sending operations
- Added NavisworksRootObjectBuilder class for sending operations
- Added ConvertHiddenElementsSetting class for sending operations
- Added IncludeInternalPropertiesSetting class for sending operations
- Added OriginModeSetting class for sending operations
- Added VisualRepresentationSetting class for sending operations
* Refactor conversion mode and origin mode enums
- Renamed "ACTIVE" to "Active"
- Renamed "ORIGINAL" to "Original"
- Renamed "PERMANENT" to "Permanent"
- Renamed "MODELORIGIN" to "ModelOrigin"
- Renamed "PROJECTBASEORIGIN" to "ProjectBasePoint"
- Renamed "BOUNDINGBOXORIGIN" to "BoundingBoxCenter"
Updated the NavisworksConversionSettingsFactory class:
- Updated references and imports
- Updated switch cases for originMode enum with new names
* feat: Add new settings to NavisworksSendBinding and remove unused import
- Added new settings to the `GetSendSettings()` method in `NavisworksSendBinding` class.
- Removed unused import of `Speckle.Connector.Navisworks.Settings` in `NavisworksConverterServiceRegistration.cs`.
* Update Navisworks connector service registration and settings manager
- Updated the service registration in `NavisworksConnectorServiceRegistration.cs` to use `ToSpeckleSettingsManagerNavisworks` instead of `ToSpeckleSettingsManager`.
- Renamed `ToSpeckleSettingsManager.cs` to `ToSpeckleSettingsManagerNavisworks.cs` in the send operations settings folder.
- Updated the project file `Speckle.Connectors.NavisworksShared.projitems` to include the renamed file.
- Added a new dependency on `speckle.connectors.dui.webview`, which includes dependencies on `Microsoft.Web.WebView2` and `Speckle.Connectors.DUI`.
- Updated the conversion settings factory in `NavisworksConversionSettingsFactory.cs` to use `IToSpeckleSettingsManagerNavisworks` instead of `IToSpeckleSettingsManager`.
* Add project references to DUI and Navisworks converters in Navisworks connectors
- Added a project reference to `Speckle.Connectors.DUI` in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects.
- Added project references to the respective Navisworks converter projects in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects.
- Removed a compile include for `NavisworksSelectionFilter.cs` from the shared Navisworks converter projitems file.
- Added a compile include for `NavisworksSelectionFilter.cs` in the send filters folder of the shared Navisworks converter projitems file.
* here we go again
This commit adds support for Navisworks conversion settings in the SendBinding class. It introduces a new interface, IToSpeckleSettingsManagerNavisworks, and implements it in the ToSpeckleSettingsManagerNavisworks class. The NavisworksSendBinding constructor now takes an additional parameter of type IToSpeckleSettingsManagerNavisworks.
In addition, some file and namespace renaming has been done to align with the changes made.
* FFS - Cyclical relationships or missing assemblies
* FFS
- Removed references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in packages.lock.json files
- Commented out project references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in csproj files
- Updated project reference for shared converter in shproj file
* Update NavisworksConnectorServiceRegistration.cs
- Update the registration of ToSpeckleSettingsManagerNavisworks to use the interface IToSpeckleSettingsManagerNavisworks instead of the concrete class ToSpeckleSettingsManagerNavisworks.
* Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval.
Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval.
This commit updates the NavisworksSendBinding code to replace the usage of IToSpeckleSettingsManagerNavisworks with ToSpeckleSettingsManagerNavisworks for retrieving conversion settings. This change ensures consistency and improves the overall functionality of the code.
* merge fixes
* Refactor NavisworksObjects.cs: Improve object representation and property handling
- Rename `NavisworksObject` to `NavisworksModelItem`
- Remove unused properties and suppress style warnings
- Add required parameters to constructors for `name` and `displayValue`
- Update property accessors for `elements`, `displayValue`, and `name`
- Improve implementation of `AddProperty` and `GetProperty` methods
* Refactor display value extraction and object creation in Navisworks converter
- Refactored the `GetDisplayValue` method in `DisplayValueExtractor.cs` to be an instance method instead of static.
- Updated the `CreateGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to use an instance of `DisplayValueExtractor`.
- Changed the return type of `CreateNonGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to match the updated class name.
These changes improve code organization and maintainability.
* Update Speckle SDK and Objects to version 3.1.0-dev.203 in Navisworks connectors for versions 2020, 2021, 2022, and 2023.
* remove more async
* clean up
* can build agian
* Use valuetask
* fmt
* fix up some bridge execution to be sync
* Refactor NavisworksRootObjectBuilder.cs: Improve initialization of root object collection
- Initialize root object collection with name and units in a more concise way
- Improve readability and maintainability of the code
* Fix logger import in NavisworksRootObjectBuilder.cs
The commit fixes an issue with the logger import in the NavisworksRootObjectBuilder.cs file. The incorrect namespace was causing a compilation error. This change ensures that the correct namespace is used for the logger, resolving the compilation error and allowing for proper logging functionality.
* Refactor ClassPropertiesExtractor to simplify GetClassProperties method
The GetClassProperties method in the ClassPropertiesExtractor class has been refactored to improve readability and reduce unnecessary code. The if statement that checks for exclusion of properties has been removed, as it is no longer needed. Instead, the ExtractClassProperties method is directly returned. This change simplifies the logic and improves code maintainability.
* Fix static method in DisplayValueExtractor
The commit fixes a bug in the DisplayValueExtractor class where the GetDisplayValue method was not declared as static. This caused a compilation error. The fix makes the method static, allowing it to be called without an instance of the class.
* Add BasePropertyHandler, HierarchicalPropertyHandler, IPropertyHandler, and StandardPropertyHandler classes for handling property assignment in Navisworks conversion.
- Added IPropertyHandler interface to define the contract for handling property assignment to Speckle objects.
- Added BasePropertyHandler class to provide common functionality for property assignment.
- Added StandardPropertyHandler class to handle standard property assignment without any merging or hierarchy processing.
- Added HierarchicalPropertyHandler class to handle property assignment with hierarchy merging for objects that require ancestor properties.
* Refactor class hierarchy and method signatures for Navisworks conversion
- Make `GetClassProperties` method in `ClassPropertiesExtractor` static
- Remove `classPropertiesExtractor` parameter from constructors in `BasePropertyHandler`, `HierarchicalPropertyHandler`, and `StandardPropertyHandler`
- Update references to `classPropertiesExtractor.GetClassProperties(modelItem)` to use the static method `ClassPropertiesExtractor.GetClassProperties(modelItem)`
- Rename private field `_properties` in classes implementing `INavisworksObject` to `Properties`
- Rename public property `elements` in class `NavisworksModelItem` to `Elements`
- Rename public property `displayValue` in class `NavisworksModelGeometry` to lowercase (`displayvalue`)
- Add missing using statements
* Add ElementSelectionHelper class for working with Navisworks ModelItem selections.
This commit adds a new file, ElementSelectionHelper.cs, which contains a static class called ElementSelectionHelper. This class provides extension methods for working with Navisworks ModelItem selections. The class includes the following significant changes:
- Added ResolveModelItemToIndexPath method: This method takes a Navisworks ModelItem and resolves it to its unique index path representation. The resulting string represents the model item's path, including the model index and a hierarchical path identifier separated by a specified separator.
- Added ResolveIndexPathToModelItem method: This method takes an index path string and resolves it to a Navisworks ModelItem. It splits the index path into parts, assigns the first part to the modelIndex variable as an integer, and joins the remaining parts as the pathId string.
- Added IsElementVisible method: This method determines whether a Navisworks ModelItem and all its ancestors are visible. It checks the visibility status for each item in the item's ancestorsAndSelf collection and returns true if none of them are hidden.
- Added ResolveGeometryLeafNodes method: This method takes a Navisworks ModelItem and returns a list of all its descendants (including itself) that have geometry.
These changes enhance functionality related to working with Navisworks ModelItems in Speckle.Converter.NavisworksShared.Helpers namespace.
* cleanup
* WIP on jsdb/navisworks
WIP on jsdb/navisworks
- Replaced `ModelItemTopLevelConverterToSpeckle` with `NavisworksRootToSpeckleConverter` in `NavisworksConverterServiceRegistration.cs`
- Added new files to the project: `BasePropertyHandler.cs`, `HieraerchicalPropertyHandler.cs`, `IPropertyHandler.cs`, and `StandardPrpertyHandler.cs`
- Updated the file path in the project items XML
- Modified `NavisworksRootToSpeckleConverter.cs` to use the updated method name
* Update Speckle.Objects to version 3.1.0-dev.205 in Navisworks connectors for versions 2020, 2021, and 2022.
- Update Speckle.Objects to version 3.1.0-dev.205
- Update Speckle.Sdk to version 3.1.0-dev.205
- Update Speckle.Sdk.Dependencies to version 3.1.0-dev.205
* Fix reserved term replacement in PropertyHelpers.cs
The commit fixes a bug in the PropertyHelpers.cs file where the reserved term "Item" was not being replaced correctly. The replacement has been changed from "Item_" to "Item".
* Refactor property handlers and model objects
- Remove unused code in ClassPropertiesExtractor.cs
- Refactor PropertySetsExtractor.cs to use dependency injection for settingsStore
- Refactor BasePropertyHandler.cs to include classPropertiesExtractor parameter
- Rename HieraerchicalPropertyHandler.cs to HierarchicalPropertyHandler.cs
- Rename StandardPrpertyHandler.cs to StandardPropertyHandler.cs
- Update NavisworksConverterServiceRegistration.cs to register the new property handlers
* Refactor model item name retrieval logic in ModelItemTopLevelConverterToSpeckle.cs
- Refactored the GetObjectName method to improve readability and maintainability.
- Updated the logic to retrieve the target object's display name, cycling through parent objects if necessary.
- Added a fallback case to return "Unnamed model item" if no valid display name is found.
* Whitespace in property name conversion to _ in PropertyHelpers.cs
The code change fixes a bug in the `PropertyHelpers.cs` file where property names were not being converted correctly. The regular expression used to replace characters now includes whitespace characters as well. This ensures that all invalid characters are replaced with underscores, allowing for proper conversion of property names.
* Add GeometryNodeMerger class to handle merging of sibling geometry nodes.
- Added `GeometryNodeMerger` class to handle grouping and merging of sibling geometry nodes.
- Updated `NavisworksRootObjectBuilderExtensions` to use `GeometryNodeMerger` for grouping and merging.
- Updated `NavisworksRootObjectBuilder` to use `ClassPropertiesExtractor` and `PropertySetsExtractor`.
- Refactored code in `NavisworksRootObjectBuilder.Build()` method to improve readability and maintainability.
* modify GeometryNodeMerger.cs and NavisworksRootObjectBuilder.cs
- Modified GeometryNodeMerger.cs to only group anonymous geometry nodes
- Modified NavisworksRootObjectBuilder.cs to refactor the Build method, handle grouped nodes first, and set the final elements list
* add some non async paths for progress
* format
* remove needless selection
* Initialize root collection, convert and store model items, process and merge grouped nodes, add remaining non-grouped nodes, finalize and return.
* Add NavisworksMaterialUnpacker class for unpacking render materials
This commit adds a new file, NavisworksMaterialUnpacker.cs, which contains the implementation of the NavisworksMaterialUnpacker class. This class is responsible for unpacking render materials from Navisworks objects.
The NavisworksMaterialUnpacker class includes methods such as UnpackRenderMaterial and ConvertRenderColorAndTransparencyToSpeckle, which handle the extraction and conversion of render material properties.
Additionally, the project file Speckle.Connectors.NavisworksShared.projitems has been updated to include the newly added NavisworksMaterialUnpacker.cs file.
* Add `NavisworksMaterialUnpacker` to `NavisworksRootObjectBuilder` constructor
- Add `NavisworksMaterialUnpacker` to the service collection in `NavisworksConnectorServiceRegistration.cs`.
- Update the constructor of `NavisworksRootObjectBuilder` to include dependencies for `IRootToSpeckleConverter`, `ISendConversionCache`, `IConverterSettingsStore<NavisworksConversionSettings>`, `ILogger<NavisworksRootObjectBuilder>`, `ISdkActivityFactory`, and `NavisworksMaterialUnpacker`.
This commit adds the registration of the `NavisworksMaterialUnpacker` class to the service collection in order to enable dependency injection. It also updates the constructor of the `NavisworksRootObjectBuilder` class to include all necessary dependencies for its functionality.
* Update Speckle.Objects to version 3.1.0-dev.212 in Navisworks connectors for versions 2020, 2021, and 2022.
The commit updates the packages.lock.json file for the Navisworks connectors for versions 2020, 2021, and 2022. It changes the requested and resolved version of Speckle.Objects from 3.1.0-dev.205 to 3.1.0-dev.212
* Add NavisworksObject to finalElements in NavisworksRootObjectBuilder
This commit adds the NavisworksObject class to the finalElements list in the NavisworksRootObjectBuilder. The NavisworksObject contains properties such as name, displayValue, properties, and units. This change improves the functionality of the code by including additional information for each element in the finalElements list.
* Add applicationId to NavisworksRootObjectBuilder
This commit adds the applicationId property to the NavisworksRootObjectBuilder class in order to include it in the finalElements list. This change ensures that the applicationId is properly assigned and included when building Navisworks objects for sending.
* RunOnMainThreadAsync implemented
- Refactored GetDocumentInfo method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync
- Refactored HighlightObjects method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync
- Refactored OnSelectionChange method in NavisworksSelectionBinding to use async/await and run UpdateSelectionAsync on the main thread using Parent.RunOnMainThreadAsync
- Added async/await to Send method in NavisworksSendBinding and refactored code inside it to use async/await for better readability
- Extracted common logic into separate methods in NavisworksSendBinding: GetModelCard, InitializeConverterSettings, GetNavisworksModelItems, ExecuteSendOperation
- Added cancellation support to CancelSend method in NavisworksSendBinding by calling _cancellationManager.CancelOperation with modelCardId as argument
- Refactored ProcessModelStateChange method in NavisworksDocumentEvents to use async/await and added check for _finalModelCount value
* Restore DocumentModelStore.cs accessibility - not sure when that changed
- Change access modifiers of HostAppSaveState and LoadState methods to protected
- Update method comments to reflect changes in access modifiers
* Refactor NavisworksConnectorServiceRegistration and NavisworksDocumentEvents
- Added NavisworksMaterialUnpacker to service collection
- Updated registration of DocumentModelStore in service collection
- Updated references to DocumentModelStore with NavisworksDocumentModelStore in NavisworksDocumentEvents
- Renamed HostAppSaveState method to protected override method in NavisworksDocumentModelStore
- Added public method ReloadState as a wrapper for LoadState in NavisworksDocumentModelStore
* Delete Navisworks solution file
The commit deletes the Navisworks solution file, which is no longer needed.
* Delete packages.lock.json
* Remove Navisworks 2025
* Reset Navisworks project references and project names
- Updated the project reference for "Navisworks" in Local.sln to use a new GUID
- Updated the project reference for "2024" in Local.sln to use a new GUID
- Updated the project reference for "Shared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID
- Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln
- Updated the project name and GUID for "Shared" in Speckle.Connectors.sln
* Update Microsoft.Web.WebView2 package to version 1.0.2088.41 in Autocad connectors for versions 2022, 2023, 2024, and 2025.
This commit updates the Microsoft.Web.WebView2 package in the Autocad connectors for versions 2022, 2023, 2024, and 2025 from version 1.0.1938.49 to version 1.0.2088.41. This change ensures compatibility with the latest version of the package and includes necessary bug fixes or improvements related to web view functionality in the connectors.
* Reset Navisworks project references and project names
- Updated the project reference for "Navisworks" in Local.sln to use a new GUID
- Updated the project reference for "2024" in Local.sln to use a new GUID
- Updated the project reference for "Shared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID
- Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln
- Updated the project name and GUID for "Shared" in Speckle.Connectors.sln
* Update Microsoft.Web.WebView2 version to [1.0.1938.49, ) in Autocad and Civil3d connectors
This commit updates the version of Microsoft.Web.WebView2 to [1.0.1938.49, ) in the Autocad and Civil3d connectors packages.lock.json files. The previous version was 1.0.2088.41, and the contentHash has also been updated accordingly.
Note: This commit message is exactly 50 characters long, as per the requirement for a short description less than 50 characters.
* Refactor to avoid the early disposal of COM objects
- Remove the `GeometryNodeMerger` class from service registration in `NavisworksConnectorServiceRegistration.cs`
- Change the access modifier of `UnpackRenderMaterial` method in `NavisworksMaterialUnpacker.cs` to internal
- Change the access modifier of `ConvertRenderColorAndTransparencyToSpeckle` method in `NavisworksMaterialUnpacker.cs` to private static
- Change the access modifier of `GroupSiblingGeometryNodes` method in `GeometryNodeMerger.cs` to public static
- Add null checks for parameters in methods:
- GetClassProperties in ClassPropertiesExtractor.cs
- GetPropertySets and AssignProperties in BasePropertyHandler.cs
- AssignClassProperties and ExtractClassProperties in ClassPropertiesExtractor.cs
- GetPropertySets in PropertySetsExtractor.cs
- AssignPropertySets, AssignModelProperties, and ExtractModelProperties in ModelPropertiesExtractor.cs
- NavisworksRootObjectBuilder constructor
* feat: Add geometry conversion functionality
- Added `DisplayValueExtractor` class for extracting display values from Navisworks model items
- Added `GeometryToSpeckleConverter` class for converting Navisworks geometry to Speckle SDK models
- Updated dependencies in `NavisworksConverterServiceRegistration.cs` to include the new classes
* Rename GeomtryNodeMerger.cs to GeometryNodeMerger.cs
This commit renames the file GeomtryNodeMerger.cs to GeometryNodeMerger.cs.
* Remove redundant code shared by both projects
- Updated NavisworksSelectionBinding to include IElementSelectionService as a dependency in the constructor.
- Updated NavisworksSendBinding to include IElementSelectionService as a dependency in the constructor.
- Removed ElementSelectionExtension.cs file.
- Added ElementSelectionService.cs file which includes methods for getting model item path, resolving model item from path, checking visibility of model items, and getting geometry nodes.
* fix lock files
* cannot make null valuetasks
* merge fixes
* update to latest SDK
* scope the classes correctly for the deserialization process
* Navisworks proj cleanup (#443)
* Clean up projects and locks for all Navisworks
* Fix nuget error
* Fixed Local SLN and removed some runtime IDs
* add back RuntimeIdentifier
* We shouldn't be using ConfigureAwait false
* Fix lock files for NW
* Rhino doesn't need explicit run on main threads?
* add back layers and materials on ui thread with comment
* Update to SDK 3.1.0-218
* update locks
* rationalize NW and usage of cancellation token
* format
* remove .ConfigureAwait(false)
* Remove ValueTask and fix ArcGIS doc saving
* run events on the correct thread
* format
* Remove usage of sync context
---------
Co-authored-by: Jonathon Broughton <jonathon@stardotbmp.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Jonathon Broughton <760691+jsdbroughton@users.noreply.github.com>
- Add a new property `App` that returns the host application based on the platform.
- Update the `Version` property to return the correct version for Navisworks 2020.
* Navisworks Connector Init
* Build crap
* Moar Init
* WIP - not yet working
* Minor fixes
* Fix missing constuctors
* unfix
* Test commit
* Test commit
* Handle Document Events
* Document Model Store
* Proper implementation
* package updates
* updated to dev
* Document Events binding ???
* registration order
* Minimised events subscribed and handle new document state to clear models
* Stub Send command
* Refactor Connector class to change access modifier of Container property
The commit modifies the access modifier of the Container property in the Connector class from public to private. This change improves encapsulation and ensures that the property can only be accessed within the class itself.
* Fix NavisworksDocumentStore model list initialization and document validation
The commit fixes the initialization of the Models list in the NavisworksDocumentStore class. Instead of assigning an empty array, it now uses the Clear() method to clear the existing models.
Additionally, the commit improves the document validation logic by checking if critical properties are accessible before considering the document valid. It also handles cases where the document is disposed.
These changes ensure proper initialization of model lists and accurate document validation in NavisworksDocumentStore.
* Effectively debouncing on the SDI changes events
* Get Selected Objects
* ElementSelectionExtension is a collection of helpers to aid the resolution of intent
* [Navisworks] Manage document and model state changes
- Refactor NavisworksDocumentEvents to manage both document and model state change notifications
- Update comments to reflect the new functionality
- Rename SubscribeToEvents method to SubscribeToDocumentModelEvents for clarity
- Add HandleDocumentModelCountChanging and HandleDocumentModelCountChanged methods to track model count changes
- Update OnDocumentModelCountChanged method name to NotifyValidModelStateChange for clarity
- Update UnsubscribeFromEvents method name to UnsubscribeFromDocumentModelEvents for clarity
- Remove unused constants from NavisworksDocumentStore class
* Update Navisworks API references and fix typos
- Update references to `Autodesk.Navisworks.Api` namespace to `NAV` namespace
- Fix typo in file name: `GlobalUsings.cs` renamed to `GlobalUsing.cs`
- Update references to `ModelItem` type from `Autodesk.Navisworks.Api` namespace to `NAV.ModelItem`
- Update references to `Document` type from `Autodesk.Navisworks.Api` namespace to `NAV.Document`
- Update references to database related types from `Autodesk.Navisworks.Api.Data` namespace to `NAV.Data`
- Add new file: NavisworksRootObjectBuilder.cs
- Remove unused using statements
* Add Navisworks2024 converter dependencies and update project references
- Added "Objects.Converter.Navisworks2024" to the packages.lock.json file with dependencies on "Speckle.Converters.Common" and "Speckle.Navisworks.API"
- Updated the Speckle.Connectors.Navisworks2024.csproj file to include a reference to "Speckle.Converters.Navisworks2024.csproj" and "Speckle.Converters.Common.csproj"
- Added "speckle.converters.common" to the packages.lock.json file with dependencies on "Microsoft.Extensions.Logging.Abstractions" and "Speckle.Objects"
- Renamed files:
- NavisworksConversionSettings.cs -> NavisworksConversionSettingsFactory.cs
- GlobalUsings.cs -> GlobalUsing.cs
- NavisworksConversionSettings.cs -> Settings/NavisworksConversionSettings.cs
- NavisworksConversionSettings.cs -> Services/NavisworksToSpeckleUnitConverter.cs
- NavisworksConversionSettings.cs -> ToSpeckle/NavisworksRootToSpeckleConverter.cs
* feat: Add NavisworksSendBinding changes
- Added Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging namespaces
- Added Speckle.Connectors.Common.Operations namespace
- Added Speckle.Connectors.DUI.Exceptions, Speckle.Connectors.DUI.Logging, and Speckle.Connectors.DUI.Models.Card namespaces
- Added Speckle.Sdk and Speckle.Sdk.Common namespaces
- Updated constructor of NavisworksSendBinding class to include additional parameters
- Updated Send method in NavisworksSendBinding class to include try-catch block for handling exceptions during send operation
- Updated CancelSend method in NavisworksSendBinding class to call the cancellation manager's CancelOperation method with the modelCardId parameter
- Added ResolveIndexPathToModelItem method in ElementSelectionExtension class to resolve the model item path from an index path string
- Added ResolveGeometryLeafNodes method in ElementSelectionExtension class to resolve geometry leaf nodes from a model item
- Updated Send method in NavisworksSendBinding class to use the resolved model items for sending data
* Update namespace in Navisworks plugin files
- Update namespace from "Speckle.Connector.Navisworks.NavisPlugin" to "Speckle.Connector.Navisworks.Plugin" in Commands.cs, DockableConnectorPane.cs, and NavisworksRibbon.xaml.cs files.
* Add Navisworks sending operations and converters
- Added sending operations for Navisworks models
- Registered the root object builder and send operation for Navisworks model items
- Added Navisworks converters to the service registration
- Updated the NavisworksRootToSpeckleConverter to handle null targets and validate target type before conversion
* Add folder to project items
- Added a new folder to the project items in the Navisworks converter.
- The folder includes the necessary files for extensions, global using, service registration, and conversion settings factory.
* Refactor NavisworksConversionSettings class to use properties instead of fields
- Convert fields to properties in NavisworksConversionSettings class
- Update constructor to initialize properties instead of fields
* Add Navisworks conversion settings factory and store initialization
- Add `INavisworksConversionSettingsFactory` to the constructor of `NavisworksSendBinding`
- Initialize `_conversionSettingsFactory` in the constructor of `NavisworksSendBinding`
- Initialize the conversion settings store with `_conversionSettingsFactory.Create(NavisworksApp.ActiveDocument)`
* Change element selection path separator from '.' to '/' in ElementSelectionExtension.cs
This commit updates the code in ElementSelectionExtension.cs to change the default separator used for resolving a Navisworks model item's unique index path representation. The previous separator was '.', and it has been changed to '/'. This change ensures consistency and compatibility with other parts of the codebase that rely on this representation.
* Add Navisworks model item to Speckle converter
- Add `ModelItemToSpeckleConverter.cs` file for converting Navisworks model items to Speckle objects.
- Update `GlobalUsing.cs` to include `SSM` namespace.
- Update project file `Speckle.Converters.NavisworksShared.projitems` to include the new converter file.
* Update Speckle.Objects and Speckle.Sdk versions to 3.1.0-dev.200
- Updated the requested and resolved versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in packages.lock.json files for Connectors/Navisworks/Speckle.Connectors.Navisworks2024 and Converters/Navisworks/Speckle.Converters.Navisworks2024 directories.
- Also updated the contentHash values for both packages.
Note: This commit updates the versions of Speckle.Objects and Speckle.Sdk to 3.1.0-dev.200 in the mentioned directories' packages.lock.json files, along with their respective contentHash values being updated as well.
* Add Navisworks and 2024 projects, along with their connectors and converters
This commit adds the Navisworks project, along with the 2024 project. It also includes the connectors and converters for both projects.
* Add Navisworks conversion settings and modes
This commit adds new files for Navisworks conversion settings and modes.
- The `ConversionModes.cs` file defines enums for representation mode and origin mode used during conversion.
- The `NavisworksConversionSettings.cs` file represents the settings used for Navisworks conversions, including properties such as document, units, origin mode, hidden elements, visual representation mode, and more.
- A new factory class `NavisworksConversionSettingsFactory.cs` is added to create instances of the conversion settings with calculated values based on the active document.
- A new file `GeometryHelpers.cs` which contains a static class `GeometryHelpers`. The class provides a method `VectorMatch` that compares two vectors to determine if they are approximately equal within a given tolerance. The method takes in two vectors and an optional tolerance value, and returns true if the vectors match within the tolerance, otherwise false.
* Add ArrayExtensions.cs for converting arrays to generic type arrays
This commit adds a new file, ArrayExtensions.cs, which contains an extension method for converting arrays to generic type arrays. The method uses the `Array.Copy` function to copy the elements of the original array into a new array of the specified generic type. This allows for more flexibility when working with arrays in the codebase.
Specifically Navisworks heavily uses 1* indexed arrays which are a pain to access generically.
* Delete Navisworks converters
This commit deletes two files: ModelItemToSpeckleConverter.cs and NavisworksRootToSpeckleConverter.cs. These files contained code related to converting Navisworks models to Speckle format. The deletion of these files indicates that the functionality provided by these converters is no longer needed or has been replaced by other methods.
* Add new classes for double-precision geometric primitives and transformation matrices
- Added `Primitives.cs` file containing definitions for `PointD`, `TriangleD`, and `LineD` classes with double-precision vertex storage
- Added `TransformMatrix.cs` file containing a class for 4x4 transformation matrices
- Updated project items to include the new files in the build process
* Add NavisworksObject and NavisworksGeometryObject classes
This commit adds the NavisworksObject and NavisworksGeometryObject classes to handle non-geometry and geometry-based Speckle objects converted from Navisworks. These classes implement the INavisworksObject interface, which provides methods for adding properties to objects and retrieving property values by key. The NavisworksObject class represents a non-geometry object with a name property and a dictionary of properties, while the NavisworksGeometryObject class represents a geometry-based object with a displayValue property, name property, and a dictionary of properties.
* Add ClassPropertiesExtractor, DisplayValueExtractor, and PropertySetsExtractor classes
- Added ClassPropertiesExtractor class to extract class properties from a NAV.ModelItem
- Added DisplayValueExtractor class to extract display values from a NAV.ModelItem
- Added PropertySetsExtractor class to extract property sets from a NAV.ModelItem
* feat: Add ExcludeProperties option to NavisworksConversionSettings
This commit adds a new boolean property, ExcludeProperties, to the NavisworksConversionSettings class. This property allows users to specify whether properties should be excluded from the output. The default value is set to false.
Changes:
- Added ExcludeProperties boolean property to NavisworksConversionSettings
- Updated NavisworksConversionSettingsFactory to include _excludeProperties field and pass it to the NavisworksConversionSettings constructor
* feat: Add ModelItemTopLevelConverterToSpeckle
This commit adds the `ModelItemTopLevelConverterToSpeckle` class, which converts Navisworks `ModelItem` objects to Speckle Base objects. The converter extracts display values, class properties, and property sets from the Navisworks object and creates a corresponding Speckle Base object.
* Add ModelPropertiesExtractor to NavisworksShared
This commit adds the ModelPropertiesExtractor class to the NavisworksShared project. The ModelPropertiesExtractor is responsible for extracting model properties from a NAV.Model and adding them to a dictionary. These properties include Creator, Filename, Source Filename, Units, Transform, Guid, and Source Guid. The extracted properties are then added to the navisworks object as key-value pairs.
* Refactor PropertyHelpers to handle property conversion and sanitization
- Refactored `PropertyHelpers` class to be static
- Added a dictionary of type handlers for converting property values
- Implemented `ConvertPropertyValue` method to convert property values based on their data type
- Added support for handling different data types, including boolean, string, integer, double, datetime, named constant, and 3D point
- Implemented `SanitizePropertyName` method to replace invalid characters in property names with underscores
- Added `IsCategoryToBeSkipped` method to determine if a property category should be skipped during processing
* feat: Add property set extraction logic
This commit adds logic to extract property sets from a NAV.ModelItem. It iterates through the property categories and properties, skipping certain categories as needed. Each property is added to a dictionary with its sanitized name as the key and its converted value based on Speckle units. The resulting property sets are stored in a dictionary with the sanitized category name as the key.
* Refactor ModelItemTopLevelConverterToSpeckle: Add IRootToSpeckleConverter interface
This commit adds the `IRootToSpeckleConverter` interface to the `ModelItemTopLevelConverterToSpeckle` class. It also modifies the `Convert` method to handle null target objects and updates the implementation of the `CreateNonGeometryObject` method.
* Add Navisworks 2020 - 2025
In addition to 2024
* Update DocumentModelStore.cs
- Made `HostAppSaveState` and `LoadState` methods public
- Updated method signatures to reflect changes
* Add BoundingBoxToSpeckleRawConverter
This commit adds the BoundingBoxToSpeckleRawConverter class, which is responsible for converting NAV.BoundingBox3D objects to Box objects. It includes methods for converting the target object and a nullable version of it. The converter uses settings from the IConverterSettingsStore interface to set up the base plane and create the bounding box with appropriate units and intervals.
* Fix null reference exception in NavisworksRootObjectBuilder.cs
The code change fixes a null reference exception that occurs when checking if `navisworksModelItems` is empty or null. If it is, a `SpeckleException` is thrown with the message "No objects to convert". Additionally, a check for `sendInfo` being null has been added before continuing with the conversion process. The progress of the conversion is reported using the `onOperationProgressed` callback.
* Refactor NavisworksBasicConnectorBinding and NavisworksSendBinding
- Simplify AddModel method in NavisworksBasicConnectorBinding
- Remove unused import statements in NavisworksSendBinding
- Update initialization of conversion settings in NavisworksSendBinding
* Update NavisworksServiceRegistration.cs
- Removed unused using statements
- Updated AddDUI method to use NavisworksDocumentModelStore
- Updated DocumentModelStore registration to use NavisworksDocumentModelStore
* Refactor NavisworksDocumentModelStore to updated API
- Clear the store and save when models are removed
- Load state from the database when models are added
- Rename methods for clarity: ReadFromFile() -> LoadState(), WriteToFile() -> HostAppSaveState()
- Improve exception handling and error messages
* Refactor data extractors in Navisworks converter
- Make `GetClassProperties`, `GetDisplayValue`, `GetModelProperties`, and `GetPropertySets` methods internal
- Remove unused using statements
* Update GlobalUsing.cs: Remove unnecessary global using statement
The commit removes an unnecessary global using statement in the GlobalUsing.cs file. This change helps to clean up the code and improve readability.
* Add NavisworksPrimitiveProcessor and PrimitiveProcessor classes
- Added NavisworksPrimitiveProcessor class with methods for processing Navisworks primitives
- Added PrimitiveProcessor class with methods for processing generic primitives
- Updated the constructor of PrimitiveProcessor to accept an additional parameter for local to world transformation
- Updated the Line, Point, and Triangle methods in both classes to use the new transformation logic
* feat: Add internal modifier to VectorMatch method
- Changed the access modifier of the VectorMatch method in GeometryHelpers class from public to internal.
feat: Add sealed modifier to NavisworksObject and NavisworksGeometryObject classes
- Added the sealed modifier to the NavisworksObject and NavisworksGeometryObject classes in NavisworksObjects.cs file.
refactor: Rename enum values in ConversionModes.cs
- Renamed the enum values MODEL_ORIGIN, PROJECT_BASE_ORIGIN, and BOUNDING_BOX_ORIGIN to MODELORIGIN, PROJECTBASEORIGIN, and BOUNDINGBOXORIGIN respectively in ConversionModes.cs file.
refactor: Update CreateGeometryObject method signature
- Updated the CreateGeometryObject method signature in ModelItemTopLevelConverterToSpeckle.cs file by making it static and using DisplayValueExtractor.GetDisplayValue instead of _displayValueExtractor.GetDisplayValue.
* Change origin mode constants to use camel case and update related calculations
- Update the origin mode constant from "MODEL_ORIGIN" to "MODELORIGIN"
- Update the origin mode constant from "PROJECT_BASE_ORIGIN" to "PROJECTBASEORIGIN"
- Update the origin mode constant from "BOUNDING_BOX_ORIGIN" to "BOUNDINGBOXORIGIN"
- Update the calculation of the transformation vector based on the new origin mode constants
* Add NavisworksPrimitiveProcessor and BoundingBoxToSpeckleRawConverter
The commit adds two new files: NavisworksPrimitiveProcessor.cs and BoundingBoxToSpeckleRawConverter.cs to the project. These files are included in the compilation process.
* Add support for Speckle connectors in Navisworks versions 2020 to 2025.
- Added runtime requirements and component entries for Navisworks versions 2020 to 2025.
- Each component entry includes the module name and app description.
* Add database transaction for table creation in NavisworksDocumentModelStore.cs
This commit adds a database transaction to ensure the existence of the required table before performing any operations in NavisworksDocumentModelStore.cs. This helps maintain data integrity and prevents errors related to missing tables.
* Update Navisworks connectors to include Speckle.Connectors.DUI dependency.
- Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2024 packages.
- Updated project references in the Navisworks2024 package to include the "Speckle.Connectors.DUI" project.
- Added "Speckle.Connectors.DUI" as a dependency in the Navisworks2025 package.
- Renamed "NavisworksServiceRegistration.cs" to "NavisworksConnectorServiceRegistration.cs".
- Updated project references in the NavisworksConverters for 2020 and 2021 packages to include the "Speckle.Connectors.DUI" project.
* Refactor NavisworksSendBinding constructor parameters and dependencies
- Changed the type of `_conversionSettingsFactory` parameter in `NavisworksSendBinding` constructor from `INavisworksConversionSettingsFactory` to `NavisworksConversionSettingsFactory`.
- Removed duplicate initialization of `Parent` and `Commands` properties in the `NavisworksSendBinding` constructor.
- Moved the call to `SubscribeToNavisworksEvents()` after initializing `_conversionSettingsFactory`.
Register additional services for Navisworks connector
- Added registration for `ToSpeckleSettingsManager`.
- Added registration for `IOperationProgressManager`.
Refactor NavisworksRootObjectBuilder
- Updated access to `_converterSettings.Current.SpeckleUnits` to `_converterSettings.Current.Derived.SpeckleUnits`.
Update DockableConnectorPane.cs
- Updated the call to `services.AddNavisworksConverters()` to use the correct method name, which is now `services.AddNavisworksConverter()`.
Refactor ClassPropertiesExtractor, ModelPropertiesExtractor, and PropertySetsExtractor
- Updated access to `_settingsStore.Current.ExcludeProperties` to use `_settingsStore.Current.User.ExcludeProperties`.
Register additional services for Navisworks converter
- Added registration for `IToSpeckleSettingsManager`.
- Added registration for `INavisworksConversionSettingsFactory`.
* Bruh!!
- Update the type of _conversionSettingsFactory field from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory.
- Update the type of conversionSettingsFactory parameter in the constructor from NavisworksConversionSettingsFactory to INavisworksConversionSettingsFactory.
* Add NavisworksRootObjectBuilder and related settings classes for sending operations
Add NavisworksRootObjectBuilder and related settings classes for sending operations
- Added NavisworksRootObjectBuilder class for sending operations
- Added ConvertHiddenElementsSetting class for sending operations
- Added IncludeInternalPropertiesSetting class for sending operations
- Added OriginModeSetting class for sending operations
- Added VisualRepresentationSetting class for sending operations
* Refactor conversion mode and origin mode enums
- Renamed "ACTIVE" to "Active"
- Renamed "ORIGINAL" to "Original"
- Renamed "PERMANENT" to "Permanent"
- Renamed "MODELORIGIN" to "ModelOrigin"
- Renamed "PROJECTBASEORIGIN" to "ProjectBasePoint"
- Renamed "BOUNDINGBOXORIGIN" to "BoundingBoxCenter"
Updated the NavisworksConversionSettingsFactory class:
- Updated references and imports
- Updated switch cases for originMode enum with new names
* feat: Add new settings to NavisworksSendBinding and remove unused import
- Added new settings to the `GetSendSettings()` method in `NavisworksSendBinding` class.
- Removed unused import of `Speckle.Connector.Navisworks.Settings` in `NavisworksConverterServiceRegistration.cs`.
* Update Navisworks connector service registration and settings manager
- Updated the service registration in `NavisworksConnectorServiceRegistration.cs` to use `ToSpeckleSettingsManagerNavisworks` instead of `ToSpeckleSettingsManager`.
- Renamed `ToSpeckleSettingsManager.cs` to `ToSpeckleSettingsManagerNavisworks.cs` in the send operations settings folder.
- Updated the project file `Speckle.Connectors.NavisworksShared.projitems` to include the renamed file.
- Added a new dependency on `speckle.connectors.dui.webview`, which includes dependencies on `Microsoft.Web.WebView2` and `Speckle.Connectors.DUI`.
- Updated the conversion settings factory in `NavisworksConversionSettingsFactory.cs` to use `IToSpeckleSettingsManagerNavisworks` instead of `IToSpeckleSettingsManager`.
* Add project references to DUI and Navisworks converters in Navisworks connectors
- Added a project reference to `Speckle.Connectors.DUI` in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects.
- Added project references to the respective Navisworks converter projects in the Navisworks 2020, 2021, 2022, 2023, and 2025 connector projects.
- Removed a compile include for `NavisworksSelectionFilter.cs` from the shared Navisworks converter projitems file.
- Added a compile include for `NavisworksSelectionFilter.cs` in the send filters folder of the shared Navisworks converter projitems file.
* here we go again
This commit adds support for Navisworks conversion settings in the SendBinding class. It introduces a new interface, IToSpeckleSettingsManagerNavisworks, and implements it in the ToSpeckleSettingsManagerNavisworks class. The NavisworksSendBinding constructor now takes an additional parameter of type IToSpeckleSettingsManagerNavisworks.
In addition, some file and namespace renaming has been done to align with the changes made.
* FFS - Cyclical relationships or missing assemblies
* FFS
- Removed references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in packages.lock.json files
- Commented out project references to Navisworks2020, Navisworks2021, Navisworks2022, Navisworks2023, and Navisworks2025 connectors in csproj files
- Updated project reference for shared converter in shproj file
* Update NavisworksConnectorServiceRegistration.cs
- Update the registration of ToSpeckleSettingsManagerNavisworks to use the interface IToSpeckleSettingsManagerNavisworks instead of the concrete class ToSpeckleSettingsManagerNavisworks.
* Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval.
Update NavisworksSendBinding to use ToSpeckleSettingsManagerNavisworks instead of IToSpeckleSettingsManagerNavisworks for conversion settings retrieval.
This commit updates the NavisworksSendBinding code to replace the usage of IToSpeckleSettingsManagerNavisworks with ToSpeckleSettingsManagerNavisworks for retrieving conversion settings. This change ensures consistency and improves the overall functionality of the code.
* Refactor NavisworksObjects.cs: Improve object representation and property handling
- Rename `NavisworksObject` to `NavisworksModelItem`
- Remove unused properties and suppress style warnings
- Add required parameters to constructors for `name` and `displayValue`
- Update property accessors for `elements`, `displayValue`, and `name`
- Improve implementation of `AddProperty` and `GetProperty` methods
* Refactor display value extraction and object creation in Navisworks converter
- Refactored the `GetDisplayValue` method in `DisplayValueExtractor.cs` to be an instance method instead of static.
- Updated the `CreateGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to use an instance of `DisplayValueExtractor`.
- Changed the return type of `CreateNonGeometryObject` method in `ModelItemTopLevelConverterToSpeckle.cs` to match the updated class name.
These changes improve code organization and maintainability.
* Update Speckle SDK and Objects to version 3.1.0-dev.203 in Navisworks connectors for versions 2020, 2021, 2022, and 2023.
* Refactor NavisworksRootObjectBuilder.cs: Improve initialization of root object collection
- Initialize root object collection with name and units in a more concise way
- Improve readability and maintainability of the code
* Fix logger import in NavisworksRootObjectBuilder.cs
The commit fixes an issue with the logger import in the NavisworksRootObjectBuilder.cs file. The incorrect namespace was causing a compilation error. This change ensures that the correct namespace is used for the logger, resolving the compilation error and allowing for proper logging functionality.
* Refactor ClassPropertiesExtractor to simplify GetClassProperties method
The GetClassProperties method in the ClassPropertiesExtractor class has been refactored to improve readability and reduce unnecessary code. The if statement that checks for exclusion of properties has been removed, as it is no longer needed. Instead, the ExtractClassProperties method is directly returned. This change simplifies the logic and improves code maintainability.
* Fix static method in DisplayValueExtractor
The commit fixes a bug in the DisplayValueExtractor class where the GetDisplayValue method was not declared as static. This caused a compilation error. The fix makes the method static, allowing it to be called without an instance of the class.
* Add BasePropertyHandler, HierarchicalPropertyHandler, IPropertyHandler, and StandardPropertyHandler classes for handling property assignment in Navisworks conversion.
- Added IPropertyHandler interface to define the contract for handling property assignment to Speckle objects.
- Added BasePropertyHandler class to provide common functionality for property assignment.
- Added StandardPropertyHandler class to handle standard property assignment without any merging or hierarchy processing.
- Added HierarchicalPropertyHandler class to handle property assignment with hierarchy merging for objects that require ancestor properties.
* Refactor class hierarchy and method signatures for Navisworks conversion
- Make `GetClassProperties` method in `ClassPropertiesExtractor` static
- Remove `classPropertiesExtractor` parameter from constructors in `BasePropertyHandler`, `HierarchicalPropertyHandler`, and `StandardPropertyHandler`
- Update references to `classPropertiesExtractor.GetClassProperties(modelItem)` to use the static method `ClassPropertiesExtractor.GetClassProperties(modelItem)`
- Rename private field `_properties` in classes implementing `INavisworksObject` to `Properties`
- Rename public property `elements` in class `NavisworksModelItem` to `Elements`
- Rename public property `displayValue` in class `NavisworksModelGeometry` to lowercase (`displayvalue`)
- Add missing using statements
* Add ElementSelectionHelper class for working with Navisworks ModelItem selections.
This commit adds a new file, ElementSelectionHelper.cs, which contains a static class called ElementSelectionHelper. This class provides extension methods for working with Navisworks ModelItem selections. The class includes the following significant changes:
- Added ResolveModelItemToIndexPath method: This method takes a Navisworks ModelItem and resolves it to its unique index path representation. The resulting string represents the model item's path, including the model index and a hierarchical path identifier separated by a specified separator.
- Added ResolveIndexPathToModelItem method: This method takes an index path string and resolves it to a Navisworks ModelItem. It splits the index path into parts, assigns the first part to the modelIndex variable as an integer, and joins the remaining parts as the pathId string.
- Added IsElementVisible method: This method determines whether a Navisworks ModelItem and all its ancestors are visible. It checks the visibility status for each item in the item's ancestorsAndSelf collection and returns true if none of them are hidden.
- Added ResolveGeometryLeafNodes method: This method takes a Navisworks ModelItem and returns a list of all its descendants (including itself) that have geometry.
These changes enhance functionality related to working with Navisworks ModelItems in Speckle.Converter.NavisworksShared.Helpers namespace.
* WIP on jsdb/navisworks
WIP on jsdb/navisworks
- Replaced `ModelItemTopLevelConverterToSpeckle` with `NavisworksRootToSpeckleConverter` in `NavisworksConverterServiceRegistration.cs`
- Added new files to the project: `BasePropertyHandler.cs`, `HieraerchicalPropertyHandler.cs`, `IPropertyHandler.cs`, and `StandardPrpertyHandler.cs`
- Updated the file path in the project items XML
- Modified `NavisworksRootToSpeckleConverter.cs` to use the updated method name
* Update Speckle.Objects to version 3.1.0-dev.205 in Navisworks connectors for versions 2020, 2021, and 2022.
- Update Speckle.Objects to version 3.1.0-dev.205
- Update Speckle.Sdk to version 3.1.0-dev.205
- Update Speckle.Sdk.Dependencies to version 3.1.0-dev.205
* Fix reserved term replacement in PropertyHelpers.cs
The commit fixes a bug in the PropertyHelpers.cs file where the reserved term "Item" was not being replaced correctly. The replacement has been changed from "Item_" to "Item".
* Refactor property handlers and model objects
- Remove unused code in ClassPropertiesExtractor.cs
- Refactor PropertySetsExtractor.cs to use dependency injection for settingsStore
- Refactor BasePropertyHandler.cs to include classPropertiesExtractor parameter
- Rename HieraerchicalPropertyHandler.cs to HierarchicalPropertyHandler.cs
- Rename StandardPrpertyHandler.cs to StandardPropertyHandler.cs
- Update NavisworksConverterServiceRegistration.cs to register the new property handlers
* Refactor model item name retrieval logic in ModelItemTopLevelConverterToSpeckle.cs
- Refactored the GetObjectName method to improve readability and maintainability.
- Updated the logic to retrieve the target object's display name, cycling through parent objects if necessary.
- Added a fallback case to return "Unnamed model item" if no valid display name is found.
* Whitespace in property name conversion to _ in PropertyHelpers.cs
The code change fixes a bug in the `PropertyHelpers.cs` file where property names were not being converted correctly. The regular expression used to replace characters now includes whitespace characters as well. This ensures that all invalid characters are replaced with underscores, allowing for proper conversion of property names.
* Add GeometryNodeMerger class to handle merging of sibling geometry nodes.
- Added `GeometryNodeMerger` class to handle grouping and merging of sibling geometry nodes.
- Updated `NavisworksRootObjectBuilderExtensions` to use `GeometryNodeMerger` for grouping and merging.
- Updated `NavisworksRootObjectBuilder` to use `ClassPropertiesExtractor` and `PropertySetsExtractor`.
- Refactored code in `NavisworksRootObjectBuilder.Build()` method to improve readability and maintainability.
* modify GeometryNodeMerger.cs and NavisworksRootObjectBuilder.cs
- Modified GeometryNodeMerger.cs to only group anonymous geometry nodes
- Modified NavisworksRootObjectBuilder.cs to refactor the Build method, handle grouped nodes first, and set the final elements list
* Initialize root collection, convert and store model items, process and merge grouped nodes, add remaining non-grouped nodes, finalize and return.
* Add NavisworksMaterialUnpacker class for unpacking render materials
This commit adds a new file, NavisworksMaterialUnpacker.cs, which contains the implementation of the NavisworksMaterialUnpacker class. This class is responsible for unpacking render materials from Navisworks objects.
The NavisworksMaterialUnpacker class includes methods such as UnpackRenderMaterial and ConvertRenderColorAndTransparencyToSpeckle, which handle the extraction and conversion of render material properties.
Additionally, the project file Speckle.Connectors.NavisworksShared.projitems has been updated to include the newly added NavisworksMaterialUnpacker.cs file.
* Add `NavisworksMaterialUnpacker` to `NavisworksRootObjectBuilder` constructor
- Add `NavisworksMaterialUnpacker` to the service collection in `NavisworksConnectorServiceRegistration.cs`.
- Update the constructor of `NavisworksRootObjectBuilder` to include dependencies for `IRootToSpeckleConverter`, `ISendConversionCache`, `IConverterSettingsStore<NavisworksConversionSettings>`, `ILogger<NavisworksRootObjectBuilder>`, `ISdkActivityFactory`, and `NavisworksMaterialUnpacker`.
This commit adds the registration of the `NavisworksMaterialUnpacker` class to the service collection in order to enable dependency injection. It also updates the constructor of the `NavisworksRootObjectBuilder` class to include all necessary dependencies for its functionality.
* Update Speckle.Objects to version 3.1.0-dev.212 in Navisworks connectors for versions 2020, 2021, and 2022.
The commit updates the packages.lock.json file for the Navisworks connectors for versions 2020, 2021, and 2022. It changes the requested and resolved version of Speckle.Objects from 3.1.0-dev.205 to 3.1.0-dev.212
* Add NavisworksObject to finalElements in NavisworksRootObjectBuilder
This commit adds the NavisworksObject class to the finalElements list in the NavisworksRootObjectBuilder. The NavisworksObject contains properties such as name, displayValue, properties, and units. This change improves the functionality of the code by including additional information for each element in the finalElements list.
* Add applicationId to NavisworksRootObjectBuilder
This commit adds the applicationId property to the NavisworksRootObjectBuilder class in order to include it in the finalElements list. This change ensures that the applicationId is properly assigned and included when building Navisworks objects for sending.
* RunOnMainThreadAsync implemented
- Refactored GetDocumentInfo method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync
- Refactored HighlightObjects method in NavisworksBasicConnectorBinding to run on the main thread using Parent.RunOnMainThreadAsync
- Refactored OnSelectionChange method in NavisworksSelectionBinding to use async/await and run UpdateSelectionAsync on the main thread using Parent.RunOnMainThreadAsync
- Added async/await to Send method in NavisworksSendBinding and refactored code inside it to use async/await for better readability
- Extracted common logic into separate methods in NavisworksSendBinding: GetModelCard, InitializeConverterSettings, GetNavisworksModelItems, ExecuteSendOperation
- Added cancellation support to CancelSend method in NavisworksSendBinding by calling _cancellationManager.CancelOperation with modelCardId as argument
- Refactored ProcessModelStateChange method in NavisworksDocumentEvents to use async/await and added check for _finalModelCount value
* Restore DocumentModelStore.cs accessibility - not sure when that changed
- Change access modifiers of HostAppSaveState and LoadState methods to protected
- Update method comments to reflect changes in access modifiers
* Refactor NavisworksConnectorServiceRegistration and NavisworksDocumentEvents
- Added NavisworksMaterialUnpacker to service collection
- Updated registration of DocumentModelStore in service collection
- Updated references to DocumentModelStore with NavisworksDocumentModelStore in NavisworksDocumentEvents
- Renamed HostAppSaveState method to protected override method in NavisworksDocumentModelStore
- Added public method ReloadState as a wrapper for LoadState in NavisworksDocumentModelStore
* Delete Navisworks solution file
The commit deletes the Navisworks solution file, which is no longer needed.
* Delete packages.lock.json
* Remove Navisworks 2025
* Reset Navisworks project references and project names
- Updated the project reference for "Navisworks" in Local.sln to use a new GUID
- Updated the project reference for "2024" in Local.sln to use a new GUID
- Updated the project reference for "Shared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID
- Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln
- Updated the project name and GUID for "Shared" in Speckle.Connectors.sln
* Update Microsoft.Web.WebView2 package to version 1.0.2088.41 in Autocad connectors for versions 2022, 2023, 2024, and 2025.
This commit updates the Microsoft.Web.WebView2 package in the Autocad connectors for versions 2022, 2023, 2024, and 2025 from version 1.0.1938.49 to version 1.0.2088.41. This change ensures compatibility with the latest version of the package and includes necessary bug fixes or improvements related to web view functionality in the connectors.
* Reset Navisworks project references and project names
- Updated the project reference for "Navisworks" in Local.sln to use a new GUID
- Updated the project reference for "2024" in Local.sln to use a new GUID
- Updated the project reference for "Shared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Connectors.NavisworksShared" in Local.sln to use a new GUID
- Updated the project reference for "Speckle.Converters.NavisworksShared" in Local.sln to use a new GUID
- Updated the project name and GUID for "Navisworks" in Speckle.Connectors.sln
- Updated the project name and GUID for "Shared" in Speckle.Connectors.sln
* Update Microsoft.Web.WebView2 version to [1.0.1938.49, ) in Autocad and Civil3d connectors
This commit updates the version of Microsoft.Web.WebView2 to [1.0.1938.49, ) in the Autocad and Civil3d connectors packages.lock.json files. The previous version was 1.0.2088.41, and the contentHash has also been updated accordingly.
Note: This commit message is exactly 50 characters long, as per the requirement for a short description less than 50 characters.
* Refactor to avoid the early disposal of COM objects
- Remove the `GeometryNodeMerger` class from service registration in `NavisworksConnectorServiceRegistration.cs`
- Change the access modifier of `UnpackRenderMaterial` method in `NavisworksMaterialUnpacker.cs` to internal
- Change the access modifier of `ConvertRenderColorAndTransparencyToSpeckle` method in `NavisworksMaterialUnpacker.cs` to private static
- Change the access modifier of `GroupSiblingGeometryNodes` method in `GeometryNodeMerger.cs` to public static
- Add null checks for parameters in methods:
- GetClassProperties in ClassPropertiesExtractor.cs
- GetPropertySets and AssignProperties in BasePropertyHandler.cs
- AssignClassProperties and ExtractClassProperties in ClassPropertiesExtractor.cs
- GetPropertySets in PropertySetsExtractor.cs
- AssignPropertySets, AssignModelProperties, and ExtractModelProperties in ModelPropertiesExtractor.cs
- NavisworksRootObjectBuilder constructor
* feat: Add geometry conversion functionality
- Added `DisplayValueExtractor` class for extracting display values from Navisworks model items
- Added `GeometryToSpeckleConverter` class for converting Navisworks geometry to Speckle SDK models
- Updated dependencies in `NavisworksConverterServiceRegistration.cs` to include the new classes
* Rename GeomtryNodeMerger.cs to GeometryNodeMerger.cs
This commit renames the file GeomtryNodeMerger.cs to GeometryNodeMerger.cs.
* Remove redundant code shared by both projects
- Updated NavisworksSelectionBinding to include IElementSelectionService as a dependency in the constructor.
- Updated NavisworksSendBinding to include IElementSelectionService as a dependency in the constructor.
- Removed ElementSelectionExtension.cs file.
- Added ElementSelectionService.cs file which includes methods for getting model item path, resolving model item from path, checking visibility of model items, and getting geometry nodes.
* Navisworks proj cleanup (#443)
* Clean up projects and locks for all Navisworks
* Fix nuget error
* Fixed Local SLN and removed some runtime IDs
* add back RuntimeIdentifier
* Fix lock files for NW
* Update to SDK 3.1.0-218
* update locks
---------
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* feat: fixes issue, WIP local dependencies
i will remove them
* feat: relies on built in categories rather than casting (possibly less reliable?)
and removes local dependency refs
* trying a bold refactoring
ETABSShared and CSiShared is strictly correct, but just looks horrible EtabsShared and CsiShared looks better
* refactor: improve
* property extraction foundation
- better architectural approach for property extraction depending on csi product and wrapper type
- correctly configures return type depending on the product (e.g. EtabsObject)
* refactor(props): streamline property extraction across CSi and ETABS
Reorganizes property extraction to better handle base and product-specific properties:
- Introduces PropertyExtractionResult for cleaner property management
- Separates shared CSi properties from product-specific ones
- Implements dedicated extractors for Frame, Joint, and Shell
- Standardizes property extraction patterns between CSi and ETABS
- Removes property redundancy and improves null safety
* frame data extraction 1/2
* remaining data extraction
- finished data extraction for frames
- added data extraction for joints and shells
- re-instated collections
* documentation
- added some updates to the documentation
* SpeckleApplicationIdExtensions
- Extension methods for speckle applicationIds
* IApplicationPropertiesExtractorConcretization
- Renamed GeneralPropertiesExtractor to SharedPropertiesExtractor
- Renamed EtabsClassPropertiesExtractor to ApplicationPropertiesExtractor
- Removed PropertiesExtractor file
- Enforced injection of shared properties extractor to application specific extractor
- Output of Extract() of type PropertyExtractorResult
- Application property extractor mutates dictionary
* applicationId simplification
* review comments
- directly assigning applicationId to base
- rename ApplicationPropertiesExtractor to EtabsPropertiesExtractor
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* ETABSShared
- Implemented ETABSShared projects for Connectors and Converters to account for ETABS specific things that SAP 2000 doesn't account for such as levels or frames being further classified as Column, Beam or Brace or shells as wall or floor
* collection poc
- POC for ETABS collection structure
- Logic for getting further classificiations of Frames as either Column, Beam or Brace
- Same for Shells: either Wall or Floor etc.
- Placeholders for object properties
* documentation
- Putting thoughts to "paper"
- A lot of the TODOs will be part of next milestone
* adding new projects to local.sln
* csharpier
got deactivated and wasn't formatting on save anymore :(
* unnecessary registration
* using directives
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* feat: handles changing an element type in revit via the edit type dialog
looks for any types in the modified object list and adds all objects that have that type as modified
* feat: minor cleanup
* feat: naming, comments
* fix: minor linq changes
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* adds surface and region converter
also adds brep raw converter and refactors existing converters to avoid duplicate logic
* Update Speckle.Connectors.sln
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* Initial commit
- Project setup and basic definitions
- Waiting for SDK update
* CSiObjectToSpeckleConverter
- Abstract TopLevel converter
- Requiring a lot of wrappers and addtional steps to get to converted CSiObject
* ICSiWrapper with factory
* raw conversion placeholders
* service registration
* root to speckle
* type registration and resolution
CSiWrapperBase instead of ICSiWrapper correctly resolves all types
* Setting up object level converters
* some basic conversions
* units framework
* raw conversion placeholders
these are gross (just a poc for first send)
* CollectionManager
Simple organization
* Comments
* back to BASE-ics
* local
* csharpier
Missing blank line
* newline
* AddObjectCollectionToRoot
PR comments:
- Updated GetAndCreateObjectHostCollection to more descriptive name of AddObjectCollectionToRoot
- Removing unnecessary rootObject = childCollection line
* cleaning locks
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
* ETABS21
- Shared project for converters
- ETABS21 support
* 21 and 22 Support
- cPlugin.cs and Form1.cs in Shared defined as interfaces. Version specific implementations (basically just the namespaces) created in proj specific files
- Plugins load and selection works in both ETABS versions
* Form1 -> SpeckleForm
* cPlugin base class
- Better to have a cPlugin base class which ETABS21 and 22 inherit. Reduced code duplication
- Better project namespace structure
* s_modality
* dui3 integration
* registers necessary classes
* adds solution to local
* updates packages.lock
* v3 Kick-Off
- Migrated the proof-of-concept to a Shared project
- Some renaming headache
- Use of Speckle.CSI.API NGet package (thanks Jedd)
- Basic selection info works
- Ready for CNX-828 and CNX-835
* Renaming
- Renaming of the solution structure(s) outdated in the Local.sln
* Local.sln Updates
* SDK 3.1.0-dev.200 changes
* s_modality
Code style error
* Remove launchSettings.json from shared
* Removing null supression
---------
Co-authored-by: Björn <steinhagen.bjoern@gmail.com>
* Use SuspendingObservableCollection
* updates
* Use thread-safe models
* handle loading
* fix up tekla
* remove option
* fix suspension
* Revit shouldn't register changed twice. top level goes to base class
* use suspension when loading
* forgot include
* lock saving like loading
* Remove public accessor
* Require a document store for each DUI usage
* simpify load and state saving since we don't need to observe the collection externally
* added back property for javascript UI
* fmt
* move progress handling to own classes
* fmt
* fmt
* fix up diff
* Fix merge
* adjust sending progress
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* moves all built elements conversions to top level element converter and class property extractor
* adds safeguards to properties, parameters, and display value extractors
* Update ParameterExtractor.cs
* fixes family prop
* adds type as prop to all elements
* WIP: Various level fixes (#402)
* feat: makes levels dicts and memoizes converter
* feat: makes top level props also not detached
* feat: unifies `level` extraction in top level
* fix: linting
* refactors local function in tekla model object to speckle converter
* update revit element converter to use revitobject
* adds grids to class properties extractor
* Update Speckle.Converters.RevitShared.projitems
* updates to nuget version dev.199
* moves category assignment to all top level converters
* reverts to send 2, removes profile props
---------
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* Use SuspendingObservableCollection
* updates
* Use thread-safe models
* handle loading
* fix up tekla
* remove option
* fix suspension
* Revit shouldn't register changed twice. top level goes to base class
* use suspension when loading
* forgot include
* lock saving like loading
* Remove public accessor
* Require a document store for each DUI usage
* simpify load and state saving since we don't need to observe the collection externally
* added back property for javascript UI
* fmt
* fmt
* fix up diff
* add clear for autocad loading
* always clear before adding all
* use list instead
* be more explicit with naming
* fmt
* Clear regardless, it was an issue on rhino
* Correct remove cards
* Rename tekla folder name for now
* Use first or default instead first
* Find model cards by FindIndex
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
* DiscriminatedObjectConverter needs DI
* settings shouldn't be injected...use injected serializer
* format
* make the factory a singleton
* fix build issue
* renderMaterial overwrites
Avoiding type booleanPart alleviates the problem of renderMaterial being overwritten
* logging
Adding a LogError should the problem be not just related to BooelanPart. This won't break the send though and user won't be prompted
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* Datatype
Main change is the switch from Tekla.Structures.Drawing to Tekla.Structures.Datatype for units. Problem is, that Settings > Options > Units and decimals don't seem to affect API returns. Will confirm with Tekla team. Rudimentary fix applied for now.
* Weight Unit
* Weight Unit
* Consisten representation of internal units
* Distance.CurrentUnitType
As discussed
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* build for 2023
* fix: Delete Assets/*.bmp from csproj as it is referenced in shproj now
* updates the icon
* fix: Revert changes to build.sh
* adds notes
---------
Co-authored-by: Alan Rynne <alan@speckle.systems>
* fix: (wip) ensures layer creation is happening where it should (InvokeAndWait)
* fix: ensures polylines with null domains still convert ok
* feat: comments and makes non-public function private
* feat: wraps up fixes
makes layer purging quiet, and removes stale comments
* POC categories filter
* Set context regardless
* WIP
* More WIP
* More more WIP
* Fix highlight
* Remove RevitSenderModelCard
* Make all working
* Rename SetObjectIds to RefreshObjectIds
* Rename the function for Tekla
* Remove ObjectIds from filters
* Fix RefreshObjectIds return
* follow pattern from receive for async
* category can be null
* optimization for try get
* fmt
* Optimised Revit Parameter extraction
* returned the basic solid invalid check
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* feat: Added tekla zip packaging
Plus tekla Icon and postbuild action refactor
* fix: teaks to post build event
* Make all tekla dependencies private
* fix: update logo
* handles plane origin out of bounds exception and does not create group when no objects have been successfully converted
also makes room display values transparent
* fixes transparent render material for rooms
* Update DisplayValueExtractor.cs
* updates constructors and deprecates any unused code & functionality
* updates arcs and polycurves
* removes set only circle props
* updates box conversions
* fixes model curves and transforms
* Update ModelCurveToSpeckleTopLevelConverter.cs
* bumps nugets
* fixes package locks and arc
* updates rhino arc test
* POC view filter
* Use only view dropdown
* Init selection filters as default
* 2nd option for views
* Do not use WhereElementIsNotElementType
* Refresh send filters if elements modified
* Remove experimental view selection send filter
* chore: fixes expiration changes for view filters
* Remove everything filter
* Drop note for not using DI on deserialization
* Note about CheckFilterExpiration
* Fix cathastrophic failure on debugger
* Idle subscriptions on another event to fix main thread problems
* Implement APIContext
* APIContext in revit views filter
* Call GetObjectIds as async
* Remove CheckExpiry from everywhere
* Format
* Add ids to IdMap for newly added elements
* Await Commands.RefreshSendFilters
---------
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
* processes basecurves to appropriate display values in autocad and adds arcs to supported fallback curves in rhino
* turns on recursive conversion resolution by default
* minor refactor
---------
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
* processes basecurves to appropriate display values in autocad and adds arcs to supported fallback curves in rhino
* turns on recursive conversion resolution by default
* adds names to all objects on bake
* Update RhinoHostObjectBuilder.cs
* refactors to pass in attributes for bake from parent
* adds name property to all rhino objects on send
* Fixes for new Deserialization usage
* Use new serialization from nuget
* format
* better progress when checking cache and downloading
* remove the speed as it's inaccurate
* update sdk dependencies
* refactors corridors to only use extracted solids once
changes applied assemblies and subassemblies to dicts
* Update CorridorHandler.cs
* refactors corridor display value extractor to its own class
* changes scope
* adds 2022,2023,and 2025 versions for civil3d
* removes unnecessary assembly info
* fixes version api issues
* fixes more version api issues
* Update CivilEntityToSpeckleTopLevelConverter.cs
* more fixes
* updates local
where there's two materials of the same type in the same type, they would override each other; nevertheless, having two plywood layers for one wall is totally acceptable.
* feat: Non-controversial rebased changes from alan/exception-handling
* fix: Fixed all other usages after rebase
* fix: Re-added exception throw on 0 objects converted
* fix: Missing using statement
* fix: Converter manager
* fix: Using statements
* fix: Exception usages coming in from merge
* add metrics to host apps
* merge fixes and compiles
* Use ME.Console and OTel for logging to correlate
* clean up
* clean up for metrics
* fix self-review comments
* fix seq initialization
* clean up for http traces and rhino 8
* use latest SDK
* formatting
* adds parts data and better display mesh and base curve conversions
* fixes di issues
* removes arc pipes for now
* Update BaseCurveExtractor.cs
* Update PartDataExtractor.cs
* adds property sets and defs
* additional bug fixes
* renames parameters folder to properties
* Update Speckle.Converters.Civil3dShared.projitems
---------
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
* Clean up attributes for logs/traces
* fmt
* add tags for factory
* builds
* Move sending activity to get account info centralized
* formatting
* remove global user id
* use AsyncLocal and scope to scope userId
* remove user id as we don't know at initialization time
* splits autocad and civil registration for root object builder
* Update Speckle.Connectors.AutocadShared.projitems
* adds civil top level converter
* add civil3d connector
* fixes as was on wrong branch
* fixed solution for new shared project
* default registration for autocad/civil
* some fixes
* moved classes around
* adds basic civil element converter
* csharpier reformat
* removes units from root collection, restructures civil shared project
* Update AutocadConnectorModule.cs
* refactors root object builder to be abstract
* removes unnecessary usings
---------
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
dotnet_diagnostic.ca1509.severity=warning # Invalid entry in code metrics configuration file
dotnet_diagnostic.ca1861.severity=none # Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1861)
# CA2007: Consider calling ConfigureAwait on the awaited task (this is not needed for application code, in fact we don't want to call anything but ConfigureAwait(true) which is the default)
dotnet_diagnostic.CA2007.severity=none
dotnet_diagnostic.cs8618.severity=suggestion # nullable problem
dotnet_diagnostic.NUnit2038.severity=warning # Consider using Assert.That(actual, Is.InstanceOf(expected)) instead of Assert.IsInstanceOf(expected, actual)
dotnet_diagnostic.NUnit2039.severity=warning # Consider using Assert.That(actual, Is.Not.InstanceOf(expected)) instead of Assert.IsNotInstanceOf(expected, actual)
# note: added to allow the copy paste from rhino inside of the ValueSet component
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch(Exceptionex)when(!ex.IsFatal())// UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
/// Used internally to aggregate the changed objects' id. Note we're using a concurrent dictionary here as the expiry check method is not thread safe, and this was causing problems. See:
/// [CNX-202: Unhandled Exception Occurred when receiving in Rhino](https://linear.app/speckle/issue/CNX-202/unhandled-exception-occurred-when-receiving-in-rhino)
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch(Exceptionex)when(!ex.IsFatal())// UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
/// Checks if any sender model cards contain any of the changed objects. If so, also updates the changed objects hashset for each model card - this last part is important for on send change detection.
string ConfigNotFound = "{0} was not found. File must be present in the root of the project and its build action set to AddInContent.";
string ZipIntermediatePathNotFound = "{0} was not found.";
string DefaultAssemblyDoesNotMatch = "Your value of '{0}' for the '{1}' attribute in the {2} does not match the assembly name '{3}' set for your project.";
string DefaultNSDoesNotMatch = "Your value of '{0}' for the '{1}' attribute in the {2} does not match the default namespace '{3}' set for your project.";
//Create the name of the Config File and extension
string extension = "";
string config = "";
string attrib_asm = "";
string attrib_ns = "";
var assemblyValMissing = "";
var nsValMissing = "";
if (PackageType.ToLower() == "plugin")
{
Log.LogMessage(MessageImportance.Low, "This is an plugin");
config = "Config.xml";
extension = ".esriPlugin";
attrib_asm = "library";
attrib_ns = "namespace";
assemblyValMissing = "AddIn element 'library' attribute not found";
nsValMissing = "AddIn element 'namespace' attribute not found";
}
else if (PackageType.ToLower() == "configuration")
{
Log.LogMessage(MessageImportance.Low, "This is an configuration");
config = "Config.daml";
extension = ".proConfigX";
attrib_asm = "defaultAssembly";
attrib_ns = "defaultNamespace";
assemblyValMissing = "ArcGIS element 'defaultAssembly' attribute not found";
nsValMissing = "ArcGIS element 'defaultNamespace' attribute not found";
}
else
{
Log.LogMessage(MessageImportance.Low, "This is an addin");
/// <returns>A list of color proxies, where the application Id is argb value + display priority</returns>
/// <remarks>
/// In ArcGIS, map members contain a formula, which individual features contained in map members will use to calculate their color.
/// Since display priority is important for ArcGIS layers, we are creating different Color Proxies for eg the same argb color value but different display priority.
// FeatureLayer colors will be processed per feature object
caseFeatureLayerfeatureLayer:
ProcessFeatureLayerColors(featureLayer,priority);
break;
// RasterLayer object colors are converted as mesh vertex colors, but we need to store displayPriority on the raster layer. Default color is used for all rasters.
caseRasterLayerrasterLayer:
ProcessRasterLayerColors(rasterLayer,priority);
break;
}
}
returnColorProxies.Values.ToList();
}
/// <summary>
/// Parse Color Proxies and stores in ObjectColorsIdMap the relationship between object ids and colors
// "Data has been sent in the units 'degrees'. It is advisable to set the project CRS to Projected type (e.g. EPSG:32631) to be able to receive geometry correctly in CAD/BIM software"
thrownewSpeckleConversionException("Failed to convert all objects.");// fail fast instead creating empty commit! It will appear as model card error with red color.
/// This sample shows how to implement pane that contains an Edge WebView2 control using the built-in ArcGIS Pro SDK's WebBrowser control. For details on how to utilize the WebBrowser control in an add-in see here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#webbrowser For details on how to utilize the Microsoft Edge web browser control in an add-in see here: https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Framework#webbrowser-control
/// </summary>
internalsealedclassSpeckleModule:Module
{
privatestaticSpeckleModule?s_this;
privatereadonlyIDisposable?_disposableLogger;
/// <summary>
/// Retrieve the singleton instance to this module here
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!--This is needed for managed dependencies-->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies><!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath><!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!--This is needed for managed dependencies-->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies><!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath><!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
// regenerate doc to flush graphics, sometimes some objects (ellipses, nurbs curves) do not appear fully visible after receive.
// Adding a regen (must be run on main thread) here, but it doesn't seem to work:
// it's run on main thread, tried sending the "regen" string to execute, also tried regen after every object bake, but still can't fix.
// the objects should appear visible if you manually call the "regen" command after the operation finishes, or click on a view on the view cube which also calls regen.
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch(Exceptionex)when(!ex.IsFatal())// UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
/// Used internally to aggregate the changed objects' id. Note we're using a concurrent dictionary here as the expiry check method is not thread safe, and this was causing problems. See:
/// [CNX-202: Unhandled Exception Occurred when receiving in Rhino](https://linear.app/speckle/issue/CNX-202/unhandled-exception-occurred-when-receiving-in-rhino)
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
/// Used internally to aggregate the changed objects' id. Note we're using a concurrent dictionary here as the expiry check method is not thread safe, and this was causing problems. See:
/// [CNX-202: Unhandled Exception Occurred when receiving in Rhino](https://linear.app/speckle/issue/CNX-202/unhandled-exception-occurred-when-receiving-in-rhino)
/// As to why a concurrent dictionary, it's because it's the cheapest/easiest way to do so.
// SWALLOW -> UI handles it immediately, so we do not need to handle anything for now!
// Idea for later -> when cancel called, create promise from UI to solve it later with this catch block.
// So have 3 state on UI -> Cancellation clicked -> Cancelling -> Cancelled
return;
}
catch(Exceptionex)when(!ex.IsFatal())// UX reasons - we will report operation exceptions as model card error. We may change this later when we have more exception documentation
// Add text attributes from Instances as separate atomic objects:
// AttributeReferences found on Instances are just a text, not a part of the Instance
// They are not actually references and are not linked to AttributeDefinition (as one would expect),
// and already have the correct position (no need for transforms).
// We don't want to create a new BlockDefinition for every changed text for now, because AutoCAD API doesn't provide one,
// e.g. AnonymousBlockTableRecord is provided for each dynamic blocks with geometry changes, but not for Attribute changes.
// Docs on AttributeReference usage (used totally independent of AttributeDefinition): https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-BA69D85A-2AED-43C2-B5B7-73022B5F28F8
// Case of trying to match AttributeDefinition with AttributeReference via Tag value (which is not unique): https://forums.autodesk.com/t5/net-forum/get-the-value-of-an-attribute-in-c/td-p/9060940
// Layers and geometries can have same application ids.....
// We should prevent it for sketchup converter. Because when it happens "objects_to_bake" definition
// is changing on the way if it happens.
speckleLayer=newLayer(layerName){applicationId=autocadLayer.GetSpeckleApplicationId()};// Do not use handle directly, see note in the 'GetSpeckleApplicationId' method
_layerCollectionCache[layerName]=speckleLayer;
layer=autocadLayer;
returnspeckleLayer;
}
thrownewSpeckleConversionException("Unexpected condition in GetOrCreateSpeckleLayer");
thrownewSpeckleException("Unexpected condition in GetOrCreateSpeckleLayer");
@@ -154,7 +158,7 @@ public class AutocadMaterialBaker
{
// POC: Currently we're relying on the render material name for identification if it's coming from speckle and from which model; could we do something else?
// POC: we should assume render materials all have application ids?
thrownewSpeckleException("Failed to convert all objects.");// fail fast instead creating empty commit! It will appear as model card error with red color.
thrownewSpeckleConversionException("Failed to convert all objects.");// fail fast instead creating empty commit! It will appear as model card error with red color.
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!--This is needed for managed dependencies-->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies><!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath><!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
<!-- .NET Core uses this to move native dependencies into a root for runtime selection and usage for non-windows development https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#enablewindowstargeting -->
<RuntimeIdentifier>win-x64</RuntimeIdentifier><!--This is needed for managed dependencies-->
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies><!--This is needed for the rest-->
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath><!--This is needed just to keep folder paths the same as the netframework versions of autocad/civil-->
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.