Compare commits

...

522 Commits

Author SHA1 Message Date
Jonathon Broughton abc2d9b517 Merge pull request #459 from specklesystems/jonathon/cnx-971-update-apputilscs-to-include-support-for-additional-versions
CNX-971 - Update AppUtils.cs to include support for additional versions of Navisworks.
2024-12-20 11:58:08 +00:00
Jonathon Broughton dc93a688f5 Merge branch 'dev' into jonathon/cnx-971-update-apputilscs-to-include-support-for-additional-versions 2024-12-20 11:54:28 +00:00
Oğuzhan Koral 737195e2b1 Add 2025 (#460) 2024-12-20 11:51:15 +00:00
Jonathon Broughton 9964ec9ff5 Update AppUtils.cs to include support for Navisworks as the host application.
- 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.
2024-12-20 11:50:52 +00:00
Jonathon Broughton 08d1cc1881 Merge branch 'dev' into jonathon/cnx-971-update-apputilscs-to-include-support-for-additional-versions 2024-12-20 11:47:15 +00:00
Jonathon Broughton 960044556d Update AppUtils.cs to include support for additional versions of Navisworks.
- Add support for Navisworks 2020, 2021, 2022, 2023, 2025, and 2026.
- Throw a NotSupportedException for unsupported versions.
2024-12-20 11:43:47 +00:00
Adam Hathcock 629378e5a9 Fix pathing for Navisworks (#458) 2024-12-20 11:32:51 +00:00
Oğuzhan Koral 33a4e0b910 Add navisworks installer assests (#457) 2024-12-20 10:34:24 +00:00
Jonathon Broughton f674024673 Removed shortcut from plugin registration (#453) 2024-12-20 08:59:32 +00:00
Dimitrie Stefanescu f10a5475c3 Merge pull request #455 from specklesystems/update-sdk
Update SDK to 219
2024-12-19 18:47:49 +00:00
Dimitrie Stefanescu 6c8fc5bd88 fix: rider borked this one up 2024-12-19 18:20:23 +00:00
Dimitrie Stefanescu 5a9846600c Merge pull request #456 from specklesystems/dim/dataobject-conversions
Fallback conversions based on the sdk changes
2024-12-19 18:12:05 +00:00
Dimitrie Stefanescu e855f92c35 chore: cleanup 2024-12-19 18:06:15 +00:00
Dimitrie Stefanescu 0a7d8474b1 feat(autocad): adds direct converter by repupurposing the old fallback converter 2024-12-19 18:04:02 +00:00
Dimitrie Stefanescu 7f6d23f006 feat(rhino): shapes the data object converter from the ashes of the fallback converter 2024-12-19 17:12:34 +00:00
Adam Hathcock ee71915590 Need explicit conversion 2024-12-19 16:12:55 +00:00
Adam Hathcock 68b8848d4a somehow forgot this too 2024-12-19 15:12:41 +00:00
Adam Hathcock d6d16e5967 correct updates 2024-12-19 15:09:36 +00:00
Adam Hathcock ee0724aedd Update SDK to 219 2024-12-19 15:02:18 +00:00
Jonathon Broughton f924a5903a Navisworks! (#438)
* 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>
2024-12-17 14:40:56 +00:00
Adam Hathcock 1171638f2a Update to SDK 3.1.0-218 (#451) 2024-12-17 17:27:48 +03:00
KatKatKateryna bc4757bfc5 Arcgis refactor (#416)
* registed layer unpacker

* nested layers logic moved to layerUnpacker

* killed VectorLayerConverter

* exposed Feature converter and Attributes in RootObjBuilder

* send clean GisObject

* refactor Rasters and PointClouds

* send everything through 1 converter

* proper object type

* clean GIS objects and conversions

* better layer names on Receive

* fix raster position on send

* switching to GIS layer, removing native geometry type checks (but keeping field check)

* fix revit materials on child objects

* remove IGisFeature interface

* typo

* remove empty converter

* switch from attributes to properties

* add required keyword

* required attribute fix

* attach dynamic "geometry" field to converted Polygons

* refactor(arcgis): overhaul of arcgis connector and converter patterns to enable data extraction (#439)

* rework 1

* additional restructuring of root object builder and converters

* finalizes classes and patterns for converter and connector

* fixes build errors

* Update ArcGISHostObjectBuilder.cs

* fixes some polygon conversions

* refactor color manager to separate color unpacker

* Delete GISLayerGeometryType.cs

* disables receive

* pr review issues

* Update ArcGISRootObjectBuilder.cs

* Update ArcGISRootObjectBuilder.cs

* Update ArcGISRootObjectBuilder.cs

* Update ArcGISRootObjectBuilder.cs

* fixed color bugs

* Update ArcGISLayerUnpacker.cs

* don't cache repeated layers

* Revert "don't cache repeated layers"

This reverts commit 48af025829.

* remove flattened layers from root commit builder

* Revert "remove flattened layers from root commit builder"

This reverts commit e0e7b1fb42.

* layer order and duplication fixed

* fix applicationIds

* fix raster appId

* yield; add comment

* move appId to extensions

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-12-17 11:47:33 +00:00
Adam Hathcock 744ba6163c Update SDK to use replacement function for sqlite and settings (#450)
* Use new method to store settings

* update SDK
2024-12-16 13:37:42 +00:00
Dimitrie Stefanescu 2c7e8796b6 Merge pull request #447 from specklesystems/dimitrie/cnx-917-steel-proxy-elements-do-not-get-converted-out
Dimitrie/cnx 917 steel proxy elements do not get converted out
2024-12-13 14:35:38 +00:00
Dimitrie Stefanescu 647ebdcc9c Merge branch 'dev' into dimitrie/cnx-917-steel-proxy-elements-do-not-get-converted-out 2024-12-13 14:26:17 +00:00
Adam Hathcock 34a5acdc41 update to latest SDK (#449) 2024-12-13 14:23:59 +00:00
Dimitrie Stefanescu 8276cf6d60 chore: comment 2024-12-12 19:49:10 +00:00
Dimitrie Stefanescu 0d0331ca2f cleanup: extracts view options override logic into one place 2024-12-12 19:48:00 +00:00
Dimitrie Stefanescu e2423700ea formatting 2024-12-12 19:23:33 +00:00
Dimitrie Stefanescu 9b7f11d6dd Merge branch 'dev' into dimitrie/cnx-917-steel-proxy-elements-do-not-get-converted-out 2024-12-12 19:21:54 +00:00
Dimitrie Stefanescu 7f179fc2af feat: adds columns and framing to escaped elements
reason: joined up beams would export wrong geometry
2024-12-12 19:08:49 +00:00
Dimitrie Stefanescu 3e91040017 Dimitrie/cnx 917 steel proxy elements do not get converted out (#445)
* 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
2024-12-12 02:52:50 +03:00
Dimitrie Stefanescu b47dea38e5 feat: relies on built in categories rather than casting (possibly less reliable?)
and removes local dependency refs
2024-12-11 22:27:08 +00:00
Dimitrie Stefanescu 3defd285e9 feat: fixes issue, WIP local dependencies
i will remove them
2024-12-11 22:12:09 +00:00
Adam Hathcock 90a09fad44 Add Net8 targets for common and fix revit 2025 (#444)
* Dual target for net8.0 projects (Revit2025)

* Revit25 doesn't depend on webview anymore

* formatting
2024-12-11 12:42:37 +00:00
Björn Steinhagen 196c503789 bjorn/cnx 882 send etabsobjects with their properties (#442)
* 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>
2024-12-11 10:08:15 +00:00
Adam Hathcock 0e0dd81b56 Fix sending caching (#441)
* Fix upload speed calculation

* Better progress for humans?

* format

* add percentage to caching

* Update SDK
2024-12-10 11:49:53 +00:00
Björn Steinhagen 0341ebc953 bjorn/cnx 829 add root object builder and create collection structure (#435)
* 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>
2024-12-05 23:21:09 +03:00
Oğuzhan Koral f0e54ca883 Merge pull request #427 from specklesystems/claire/cnx-849-change-civil3d-and-tekla-to-align-with-idataobject
refactor(civil3d/tekla/revit): aligns send with new DataObjects
2024-12-05 20:20:18 +03:00
Claire Kuang 6bfd6749e1 Merge branch 'dev' into claire/cnx-849-change-civil3d-and-tekla-to-align-with-idataobject 2024-12-05 15:32:05 +00:00
Adam Hathcock 7c28a9f9d2 Add Comments about TransformTo (#436) 2024-12-05 11:18:17 +00:00
Claire Kuang 040d8c1feb Delete Speckle.Converters.TeklaShared.projitems.Backup.tmp 2024-12-05 10:24:42 +00:00
Claire Kuang f1f5403132 bumps sdk version 2024-12-04 16:30:21 +00:00
Claire Kuang d63ebf9268 Merge branch 'dev' into claire/cnx-849-change-civil3d-and-tekla-to-align-with-idataobject 2024-12-03 22:21:24 +00:00
Claire Kuang 9a148b96c0 removes categories classes 2024-12-03 22:09:45 +00:00
Claire Kuang 15579fa702 updates civil3d, revit, and tekla to use their data object classes
also refactors properties as a separate class
2024-12-03 19:53:23 +00:00
Dimitrie Stefanescu c2bafc6613 Dim/type change cach invalidation (#391)
* 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>
2024-12-03 20:02:10 +03:00
Adam Hathcock 1ba3f890e7 Fix transform temp (#434)
* Update SDK to 205

* Use NotNull

* fmt

* Temporary ITransformable fix for Revit
2024-12-03 15:12:12 +00:00
Adam Hathcock 48096fbbe1 Update sdks to 205 (HashCode fix and nullability) (#433)
* Update SDK to 205

* Use NotNull

* fmt
2024-12-03 15:04:17 +00:00
Claire Kuang f53e52bbfe feat(autocad): adds surface and region converters (#428)
* 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>
2024-12-03 13:39:41 +00:00
Adam Hathcock 332ab25e64 Use Sets and Freezing to make conversions faster (#430)
* Use Sets and Freezing to make conversions faster

* fmt

* move class to own file
2024-12-03 13:32:27 +00:00
Dimitrie Stefanescu 792bd9305c Merge pull request #425 from specklesystems/dimitrie/cnx-850-pipe-fittings-not-exported
fix: forces detail level to fine for specific elements
2024-12-03 11:25:08 +00:00
Oğuzhan Koral c3f2115fb2 Merge branch 'dev' into dimitrie/cnx-850-pipe-fittings-not-exported 2024-12-03 14:19:51 +03:00
Björn Steinhagen 2cc09d43ac bjorn/cnx-835-add-converter-projects-and-top-level-converter (#429)
* 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>
2024-12-03 12:18:51 +01:00
Claire Kuang 18140fe4af Merge branch 'dev' into claire/cnx-849-change-civil3d-and-tekla-to-align-with-idataobject 2024-12-03 10:18:18 +00:00
Dimitrie Stefanescu 437e948052 Merge branch 'dev' into dimitrie/cnx-850-pipe-fittings-not-exported 2024-12-02 20:19:24 +00:00
Dimitrie Stefanescu e777a2572d fix(rhino): more lenient creation for failed/partial instances (#431) 2024-12-02 17:01:43 +00:00
Adam Hathcock 6dd9b31108 Use ISqLiteJsonCacheManagerFactory (#411)
* Use ISqLiteJsonCacheManagerFactory

* update SDK

* 201 to 203 SDK

* made db centralized

* fix model key generation
2024-12-02 16:15:47 +00:00
Adam Hathcock 10055aa06e Fix for Autocad receive speed (#424)
* update UI only every 50 times

* Fix up browser to fire and forget

* Autocad doesn't need to be async.  Fixed up Rhino

* Always invoke
2024-12-02 18:52:33 +03:00
Claire Kuang 481f81fe6e changes civil and tekla to send dataobjects 2024-11-30 21:33:37 +00:00
Dimitrie Stefanescu 0100c67a33 Merge branch 'dev' into dimitrie/cnx-850-pipe-fittings-not-exported 2024-11-29 17:39:31 +00:00
Dimitrie Stefanescu 0a0a1358cb fix: forces detail level to fine for specific elements 2024-11-29 17:38:03 +00:00
Jedd Morgan 2e41d15f0d top level exception handler give a better exception when toasts fail (#423) 2024-11-29 13:57:39 +00:00
Dimitrie Stefanescu d0e77d29ec Merge pull request #421 from specklesystems/dimitrie/cnx-855-rhino-changing-a-material-does-not-invalidate-the-objects
Dimitrie/cnx 855 rhino changing a material does not invalidate the objects
2024-11-29 09:02:30 +00:00
Dimitrie Stefanescu 4880d41e5a Merge branch 'dev' into dimitrie/cnx-855-rhino-changing-a-material-does-not-invalidate-the-objects 2024-11-29 08:57:54 +00:00
Dimitrie Stefanescu 92a8cf1510 fix: performs expiration checks if actually any materials/objects have changed 2024-11-29 08:56:40 +00:00
Oğuzhan Koral 7639259c43 Clear token after every operation to prevent annoying message (#422) 2024-11-29 11:49:49 +03:00
Dimitrie Stefanescu 262062464e chore: comments 2024-11-28 20:11:47 +00:00
Dimitrie Stefanescu 474b9eb364 feat: closes off cnx-855
wraps event in topLevelExceptionHandler and reinits changed material ids
2024-11-28 20:10:22 +00:00
Dimitrie Stefanescu e5a1f62ccf feat: wip invalidates objects whose materials have changed 2024-11-28 19:39:36 +00:00
Dimitrie Stefanescu eea6924e17 Merge pull request #420 from specklesystems/dimitrie/cnx-391-assigning-material-doesnt-trigger-object-tracking-in-rhino
Dimitrie/cnx 391 assigning material doesnt trigger object tracking in rhino
2024-11-28 19:15:58 +00:00
Oğuzhan Koral 0ae1ec0236 Merge branch 'dev' into dimitrie/cnx-391-assigning-material-doesnt-trigger-object-tracking-in-rhino 2024-11-28 22:11:05 +03:00
Dimitrie Stefanescu ace52876ac feat: wraps up fix 2024-11-28 19:07:14 +00:00
Dimitrie Stefanescu 467db204a8 wip: adds event handlers for material changes 2024-11-28 18:57:39 +00:00
Björn Steinhagen 0be8897dd6 bjorn/cnx-828-shared-projects-for-connector (#419)
* 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
2024-11-28 19:34:01 +01:00
Dimitrie Stefanescu 13f48d95e1 Merge pull request #418 from specklesystems/dimitrie/cnx-795-did-not-find-layer-in-the-cache
Fixes instance receiving in some edge cases
2024-11-28 17:43:16 +00:00
Dimitrie Stefanescu f194448d94 fix: rhino is now ok 2024-11-28 17:06:31 +00:00
Dogukan Karatas a99083f03f Dogukan/etabs connector poc (#406)
* 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>
2024-11-28 13:40:40 +01:00
Dogukan Karatas 85bd01790e corrected namespaces (#415) 2024-11-27 16:43:38 +00:00
KatKatKateryna 0ccefeaa99 receive colors with fallback conversions (#408)
* receive colors with fallback conversions

* don't pass Base unnecessarily

* material fix

* only pass applicationId

* note for the new variable

* typo

* typo2

* typo3

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-27 14:58:05 +00:00
Dogukan Karatas 3ad4d46993 fix (tekla): greyscaled objects in the viewer (#412)
* adds teklamaterialcahce

* Revert "adds teklamaterialcahce"

This reverts commit 3fbba01bb0.

* detach applicationids from displayvalue

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-27 14:50:20 +00:00
Adam Hathcock 9d6c7decbc Rework progress to try to be better 😬 (#405)
* 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>
2024-11-27 17:44:48 +03:00
KatKatKateryna 329315f461 removing redundant loop (#413) 2024-11-27 20:00:56 +08:00
Claire Kuang c5e14e78f0 refactor(revit): aligns revit send for data extraction workflow (#399)
* 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>
2024-11-26 13:53:15 +00:00
Adam Hathcock 92acb31ece Fix(store): lock list modifications on DocumentModelStore (#388)
* 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>
2024-11-26 13:37:42 +00:00
Adam Hathcock 2688546c7a Revert to Send1 (#409) 2024-11-26 10:18:11 +00:00
Adam Hathcock 7c346a3ac5 update SDK to fix local sln (#404)
* update SDK to fix local

* fix using new types from sdk
2024-11-22 12:43:37 +00:00
Adam Hathcock abcf58d369 DiscriminatedObjectConverter needs DI (#363)
* DiscriminatedObjectConverter needs DI

* settings shouldn't be injected...use injected serializer

* format

* make the factory a singleton

* fix build issue
2024-11-22 15:16:19 +03:00
Dimitrie Stefanescu 2211428614 Merge pull request #401 from specklesystems/oguzhan/fix-unnecessary-expiration-triggers
Fix(revit): escape fast from doc change event handler after WriteToFile
2024-11-21 12:12:24 +00:00
oguzhankoral 08d31ff0d6 Adjust if check more specific 2024-11-21 14:58:37 +03:00
oguzhankoral e055030291 We escape fast from doc change event handler 2024-11-21 14:47:16 +03:00
Dogukan Karatas 1e5cca5ffb adds object tracking (#398)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-21 11:12:03 +03:00
Björn Steinhagen 85abeaf7f0 Bjorn/cnx 798 rendermaterialproxy owerritten (#397)
* 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>
2024-11-21 11:01:13 +03:00
Adam Hathcock 47480809d0 Avoiding some reference null exceptions (#394) 2024-11-20 16:09:04 +00:00
Adam Hathcock 885bb41f27 Update SDK reference to fix external references (#396) 2024-11-20 13:06:17 +03:00
Oğuzhan Koral c74e92fb2e Fix(tekla): Read write model cards to/from appdata + fixes double UI (#395)
* Fix multiple problems

* Connect windows each other

* Add note
2024-11-20 12:14:10 +03:00
Dogukan Karatas a4f27b5c1d dogukan/cnx-744-model-card-highlight-in-tekla (#392)
* adds highlighting methods

* clears selection before highlighting

* adds a functionality to zoom selected

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-19 23:15:49 +03:00
Adam Hathcock a7941bb4c8 update SDK (#393) 2024-11-19 19:42:14 +03:00
Jedd Morgan 13c29412eb Use of obsolete members now generates warning (#378)
* Use of obsolete members now generates warning

* format

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-11-19 13:18:47 +00:00
dependabot[bot] 774e24d441 chore(deps): bump codecov/codecov-action from 4 to 5 (#390)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-11-19 09:51:22 +00:00
Björn Steinhagen 8822761c48 CNX-751: Add Units to reportProperties (#389)
* 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>
2024-11-19 09:38:39 +00:00
Björn Steinhagen 4215f90456 CNX-755: Create Collections by Category (#387)
* sendCollectionManager

* path Builder

Removing iteration where path (currently) only contains 1 item

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-18 17:06:13 +01:00
Adam Hathcock c8ac385b88 Use Send2 again! (#372)
* Use Send2 again!

* tweaking progress

* Update SDK

* format
2024-11-18 12:29:56 +00:00
Dogukan Karatas b1ef5c74c8 Dogukan/cnx 790 version independent plugin icon (#386)
* adds decimal agnostic grid conversion

* fixes versioning in icon

* formatting

* adds notes

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-17 21:39:43 +00:00
Oğuzhan Koral a5ff2ca780 Attach parent applicationId to meshes (#385)
- seems like TSM.Solid object doesn't have any Identifier
2024-11-15 15:07:35 +00:00
Jedd Morgan f84c4b2d31 Bump SDK and enforce msbuild warnings (#379)
* Bump SDK

* Updated Tekla structures nugets

* Tekla architecture targeting

* Fixed remaining warnings
2024-11-14 21:16:46 +00:00
Oğuzhan Koral b03e848669 Handle unit changes (#384) 2024-11-13 18:59:10 +00:00
Dogukan Karatas 76ea67af54 dogukan/tekla2023 installer (#382)
* 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>
2024-11-12 15:47:06 +01:00
Oğuzhan Koral 12c80e2d40 Fix(dui3): do not pass selectedobjectids from idmap (#380)
* Do not reset selectedObjectIds from IdMap

* Format
2024-11-11 15:19:17 +00:00
Dogukan Karatas c013953368 Dogukan/cnx 679 double UI at the first plugin button click (#381)
* tracks ui instances

* adds icon to the plugin form
2024-11-11 13:59:22 +00:00
Oğuzhan Koral 34457ead0a remove useless code (#377) 2024-11-08 18:06:07 +00:00
Dimitrie Stefanescu 5e92889825 Rhino stability fixes (#375)
* 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
2024-11-08 17:54:41 +00:00
Oğuzhan Koral b2606d209d Feat(revit): CNX-543 category filter (#373)
* 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
2024-11-08 13:34:16 +00:00
Dogukan Karatas a18beeca1b Oguzhan/cnx 747 add support for tekla 2023 (#371)
* Create shared project for Tekla connector

* adds shared project

* sync w/ local

* update csproj

* update csproj

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-08 12:22:16 +00:00
Jedd Morgan c1293ff395 Fixed autocad async (#370)
Co-authored-by: Alan Rynne <alan@speckle.systems>
2024-11-07 18:49:47 +00:00
Dimitrie Stefanescu bc6f6c4c39 Merge pull request #369 from specklesystems/dimitrie/cnx-643-arcs-in-blocks-are-not-received
Dimitrie/cnx 643 arcs in blocks are not received
2024-11-07 18:43:25 +00:00
Dimitrie Stefanescu befb84db5f chore: comments 2024-11-07 17:46:53 +00:00
Dimitrie Stefanescu 2403288678 fix: allows pre-transformation of all ITransformable objects 2024-11-07 17:46:37 +00:00
Dogukan Karatas cac8e1ba18 adds a setting to send rebars as line or solid (#367)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-07 16:54:23 +00:00
Adam Hathcock 06255370f7 Update SDK and dependencies (#366)
* Use new send to have new sqlite paths

* update SDK and dependencies

* fix microsoft.build
2024-11-07 16:04:38 +00:00
Jedd Morgan 6ba70a76c2 Jrm/parameter extraction (#365)
* 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>
2024-11-07 12:03:50 +00:00
Dogukan Karatas dd53b70b36 dogukan/cnx-753-normals-are-flipped (#364)
* flips the normals

* adds note
2024-11-07 11:17:49 +00:00
Dogukan Karatas 6873af5ac3 Dogukan/cnx 691 extract appropriate class properties by type (#352)
* adds new properties

* displayValue updated

* adds report properties

* updates report properties

* removes the null parameters

* resolves a conflict

* renames the report property extractor

* updates csproj

* Revert "updates csproj"

This reverts commit b42a21f151.

* updates csproj

* updates rebar displayValue
2024-11-07 10:12:24 +00:00
Adam Hathcock 35d8c41a2b Revit async fix for sending (#362)
* follow pattern from receive for async

* category can be null

* optimization for try get

* fmt
2024-11-07 09:37:21 +00:00
Dimitrie Stefanescu 5f4eebe536 Merge pull request #361 from specklesystems/dimitrie/cnx-634-some-elements-are-received-as-generic-models-ignoring
Dimitrie/cnx 634 some elements are received as generic models ignoring
2024-11-06 19:51:48 +00:00
Dimitrie Stefanescu ba4cfca45b Merge branch 'dev' into dimitrie/cnx-634-some-elements-are-received-as-generic-models-ignoring 2024-11-06 19:27:26 +00:00
Dimitrie Stefanescu f6e4fcd2d0 feat: adds top level converter for railings
and fixes a different bug
2024-11-06 19:26:14 +00:00
Dogukan Karatas d5f1f76e24 dogukan/cnx-748-send-grids-from-tekla (#353)
* create displayValue for grids

* injects gridToSpeckleConverter

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-06 19:15:37 +00:00
Dimitrie Stefanescu 8a0c9d0128 fix: adds built in category for setting ds cat on receive reliably
note: this is not backwards compatible
2024-11-06 18:33:11 +00:00
Alan Rynne a1ff69502a feat: CXPLA-120 Added tekla zip packaging prior to installers (#357)
* 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
2024-11-06 18:38:18 +01:00
KatKatKateryna b06cf0a06b add appId (#358) 2024-11-07 01:14:06 +08:00
Dogukan Karatas 5d976141fc adds logic for rendering rebars as lines and arcs (#356)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-11-06 16:26:33 +00:00
Jedd Morgan be8f9e2b5a Fixed test failing on german culture (#355) 2024-11-06 13:25:22 +00:00
KatKatKateryna 6bf18096e7 CNX-501 Temp folder arcgis (#351)
* fixed path

* fixes
2024-11-05 18:15:17 +00:00
KatKatKateryna b7f0f5df90 receive operation fix (#350) 2024-11-06 01:45:13 +08:00
KatKatKateryna c4c06f0dc4 supporting ICurves as fallback (#339)
Co-authored-by: Alan Rynne <alan@speckle.systems>
2024-11-05 16:31:20 +00:00
Claire Kuang ed569cde55 fix(revit): handles plane origin out of bounds and creating group with no elements exceptions (#346)
* 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
2024-11-05 16:22:11 +00:00
Claire Kuang 558a16d273 moves pointcloud converter to top level (#349) 2024-11-05 16:54:48 +01:00
Dimitrie Stefanescu 9290261fef Merge pull request #348 from specklesystems/oguzhan/cnx-680-warn-users-on-receiving-v2-commits-in-v3
Chore: Add version info to root object
2024-11-05 13:07:53 +00:00
Dimitrie Stefanescu e2251c111c Merge branch 'dev' into oguzhan/cnx-680-warn-users-on-receiving-v2-commits-in-v3 2024-11-05 13:02:09 +00:00
Claire Kuang 21ed17bb2c refactor(objects): cnx 687 purge unused classes from objects (#333)
* 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
2024-11-05 19:59:29 +08:00
Claire Kuang 8cfe0bfe11 removes start angle and end angle reliance in revit arc converter (#345) 2024-11-04 12:01:24 +00:00
Claire Kuang 54ce865e45 Updates README.md to align with github repo (#343)
https://linear.app/speckle/issue/CNX-699/update-github-links-to-point-to-v3
2024-11-01 16:50:15 +00:00
Dogukan Karatas ae6d788aff adds vertices every edge of a face (#342) 2024-11-01 15:20:05 +00:00
Dogukan Karatas f0cfc860a1 Feat(tekla): cnx 703 add color proxies (#341)
* adds geometry conversions and colors

* build fix

* Update ModelObjectToSpeckleConverter.cs

* fixes app id bug in connector

* Update ModelObjectToSpeckleConverter.cs

* excludes unnecessary object types

* adds rendermaterialproxy

* TeklaMaterialUnpacker

* updates argb values

* adds extensions and removes colorhandler

* adds excluded types as a list

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2024-11-01 16:02:48 +01:00
Adam Hathcock becdc060e9 Update SDK (#336)
* Update SDK

* update sqlite to match v2
2024-10-31 15:41:34 +00:00
Oğuzhan Koral 9d25e61043 Feat(revit): view filter (#322)
* 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>
2024-10-30 21:04:08 +03:00
Claire Kuang 0debe8f7f9 feat(tekla): adds component unpacker to tekla connector (#335)
* adds component unpacker to tekla connector

* removes model object converter

* Update ComponentUnpacker.cs

* Update ComponentUnpacker.cs
2024-10-30 17:47:38 +00:00
Dogukan Karatas 9e68b55018 Dogukan/cnx 690 create top level converters for all tekla objects (#334)
* adds top level modelobject converter

* adds contour plate converter

* simpler approach for mesh extractor

* adds exception for unsupported types

* add default properties to root

* adds property extractor

* formats files

* adds lineToSpeckleConverter
2024-10-30 16:15:41 +00:00
Dogukan Karatas 5783b83168 Dogukan/cnx 646 - Tekla Converter Project (#328)
* creates tekla converter

* adds send operation

* services registrated

* updates the panel host

* adds beam converter

* updates beam converter

* basic info attached

* creates the mesh from solid

* updates the mesh converter

* attachs colors to mesh

* updates formatting

* updates formatting again

* updates assemblyinfo

* clean locks

* Merge branch 'dogukan/cnx-646-set-up-tekla-converter-project' of https://github.com/specklesystems/speckle-sharp-connectors into dogukan/cnx-646-set-up-tekla-converter-project

* updates package.lock

* adds global using

* formats and cleans latest dev

* updates teklasendbinding

* update csproj

* adds converter project to Local.sln

* update packages

* updates csproj

* objects package removed

* Revert "adds converter project to Local.sln"

This reverts commit 94fa0a2d7a.

* updates local.sln

* removed unnecessary container initialization

* deactivated the argb attach to mesh

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-10-28 19:58:56 +00:00
Alan Rynne f7060c7287 Merge pull request #330 from specklesystems/release/3.0.0
Update dev with changes from release branch
2024-10-28 12:30:52 +01:00
Claire Kuang e2866d2595 chore(civil3d): refactor to yield return (#329)
* 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>
2024-10-28 09:55:29 +00:00
Claire Kuang 76701627b6 adds missing surface properties and extension dictionaries (#324) 2024-10-28 10:48:41 +01:00
oguzhankoral 7f91ac734a Add version info to root object 2024-10-26 22:26:58 +03:00
Claire Kuang af7bc47cbf fix(civil3d/rhino): adds correct curves to displayvalue and receiving arcs as fallback in rhino (#326)
* processes basecurves to appropriate display values in autocad and adds arcs to supported fallback curves in rhino

* turns on recursive conversion resolution by default
2024-10-25 15:07:45 +01:00
Claire Kuang a14b0a6fd0 feat(rhino): adds names to all objects on bake (#327)
* 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
2024-10-25 14:43:37 +03:00
Alan Rynne 855fedf3aa feat: CXPLA-119 Adds civil3d to CI build job (#323) 2024-10-25 09:32:14 +01:00
Claire Kuang 900427ad30 fix(autocad): arc to host conversions fixed to remove dependency on incoming arc plane and angle props (#325)
* removes dependencies on incoming arc plane and angle props

* fixes incorrect root to speckle naming

* Update Speckle.Converters.AutocadShared.projitems
2024-10-24 17:22:54 +01:00
Adam Hathcock 08bf19f74f Use new Deserialization with Tasks (#308)
* 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
2024-10-24 14:14:18 +00:00
Claire Kuang 68f7cb8f41 fix(civil3d): refactors corridors to only use extracted solids once (#318)
* 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
2024-10-24 14:04:20 +01:00
Claire Kuang 3088fae8a2 adds basecurves as display value when no display value exists (#321) 2024-10-24 10:38:52 +00:00
Claire Kuang 6d375312ae fix(civil3d): alignment arc logic fixed (#320)
* fixing alignment arc calculations

* fixes alignment arc conversions

* adds units
2024-10-24 11:33:31 +01:00
Claire Kuang 797a2b70f3 adds basecurves for parcel segments (#319) 2024-10-23 12:25:16 +01:00
Oğuzhan Koral 29cf1327ff Fix(revit): CNX-657 revit expiration checks seem to be not fully working for (#316)
* Map element id to unique id

* Evict sub elements too

* Document IdMap

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-10-22 16:58:31 +03:00
Claire Kuang 613d45da37 chore(civil3d): constants fixes and additional conversion polishing (#317)
* adds featurelines and additional subassembly info

* some constants fixes
2024-10-22 09:35:12 +01:00
Dogukan Karatas f29926748c Dogukan/cnx 642 detect selections in Tekla (#312)
* added tekla send binding and necessary updates about selection

* TeklaSelectionFilter registered

* resolved injections

* build props added

* formatted

* deep clean

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-10-21 16:21:19 +02:00
Alan Rynne 9855ca8c15 Merge pull request #315 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update `release/3.0.0` with changes from `dev`
2024-10-21 14:07:09 +02:00
Adam Hathcock 7644decc64 Update SDK to get tracing to backend (#313)
* Update SDK to get tracing to backend

* Update Civil versions
2024-10-21 13:18:46 +02:00
Claire Kuang 81bf501c85 feat(civil3d): adds 2022, 2023, and 2025 versions (#306)
* 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
2024-10-21 10:14:47 +01:00
Dimitrie Stefanescu ecf508ca93 Merge pull request #311 from specklesystems/dimitrie/cnx-659-rhino-expiration-checks-might-not-run-given-inconsistent-doc
chore(rhino): ensure more robust expiration checks in rhino
2024-10-18 16:56:57 +01:00
Dimitrie Stefanescu 2724b03301 Merge branch 'dev' into dimitrie/cnx-659-rhino-expiration-checks-might-not-run-given-inconsistent-doc 2024-10-18 16:52:49 +01:00
Dimitrie Stefanescu b2eb5efa12 Merge pull request #310 from specklesystems/dimitrie/cnx-653-rhino-incorrect-transformation-applied-rename-ticket-as-you
fix(rh): scaling incorrectly when copy pasting from one doc to another
2024-10-18 16:52:34 +01:00
Dimitrie Stefanescu 661273f7bd chore(rhino): ensure more robust expiration checks in rhino 2024-10-18 16:48:53 +01:00
Dimitrie Stefanescu 5e37195591 fix(rh): scaling incorrectly when copy pasting from one doc to another 2024-10-18 16:41:03 +01:00
Dimitrie Stefanescu 0d85ad48de Merge pull request #309 from specklesystems/dimitrie/cnx-635-curtain-wall-doors-duplicated-geometry
Dimitrie/cnx 635 curtain wall doors duplicated geometry
2024-10-18 14:50:03 +01:00
Dimitrie Stefanescu 02ad0445b9 Merge branch 'dev' into dimitrie/cnx-635-curtain-wall-doors-duplicated-geometry 2024-10-18 14:36:28 +01:00
Dimitrie Stefanescu 2bfe780faf chore: removes using statement 2024-10-18 14:29:22 +01:00
Dimitrie Stefanescu 284c1cfaf6 chore: comment 2024-10-18 14:14:05 +01:00
Dimitrie Stefanescu a37d1c5f85 fix: card preview not working on deleted element ids 2024-10-18 12:22:27 +01:00
Dimitrie Stefanescu 639e2c05bf fix(revit): send fail on deleted elements CNX-656
cc @bimgeek -> we should probably catch this in tests
2024-10-18 12:09:11 +01:00
Dimitrie Stefanescu 7e5fb055c8 fix: handles families hosted on curtain wall elements
weirdness of revit api continues to impress
2024-10-18 11:53:39 +01:00
Dimitrie Stefanescu 528c692f13 Merge pull request #307 from specklesystems/dimitrie/cnx-649-assembly-structure-two-layers-with-the-same-material-name
fix(dui3): ensures we don't override structure layers
2024-10-18 11:39:41 +01:00
Dimitrie Stefanescu dd17d364c7 fix(dui3): ensures we don't override structure layers
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.
2024-10-17 16:53:45 +01:00
Claire Kuang 6e56c3c190 feat(civil3d): adds subassembly and parcel props (#305)
* adds general and class properties extractors

* Update Speckle.Converters.Civil3dShared.projitems

* adds class properties for catchments

* adds catchment group proxies

* catchment proxy bug fix

* adds site props

* Update ClassPropertiesExtractor.cs

* Update ClassPropertiesExtractor.cs

* adds network, structure, and pipes

* registers pipe network

* adds alignment basecurves and properties

* adds profiles to alignments

* adds corridors

* fixes di and other corridor bugs

* parses corridor solid property sets

* Update CorridorHandler.cs

* Update CorridorHandler.cs

* adds body raw converter to autocad

* adds calculated info

* adds subassembly props

* adds subassemblies, and parcels

* adds volume surface stats

* removes unnecessary

* resolve merge conflict

* handles name exception from some entity types

* Update DBBodyToSpeckleRawConverter.cs
2024-10-16 17:57:49 +02:00
Claire Kuang 617bb5f12d feat(civil3d): adds corridors (#302)
* adds general and class properties extractors

* Update Speckle.Converters.Civil3dShared.projitems

* adds class properties for catchments

* adds catchment group proxies

* catchment proxy bug fix

* adds site props

* Update ClassPropertiesExtractor.cs

* Update ClassPropertiesExtractor.cs

* adds network, structure, and pipes

* registers pipe network

* adds alignment basecurves and properties

* adds profiles to alignments

* adds corridors

* fixes di and other corridor bugs

* parses corridor solid property sets

* Update CorridorHandler.cs

* Update CorridorHandler.cs

* adds body raw converter to autocad

* adds calculated info

* Update PropertySetDefinitionHandler.cs

* Update DBBodyToSpeckleRawConverter.cs
2024-10-16 14:31:17 +00:00
Alan Rynne fa1fa359fc Refactor usage of exceptions in converters/connectors (#286)
* 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
2024-10-16 12:01:21 +02:00
Alan Rynne e9084847cf Merge pull request #304 from specklesystems/dev
Update release/3.0.0 branch with changes from dev
2024-10-15 10:57:41 +02:00
Alan Rynne da0a35a5d1 added store_artifacts input to build installers trigger (#303) 2024-10-15 10:49:13 +02:00
Claire Kuang 5fb3616c1a feat(civil3d): adds all properties for sites, catchments, surfaces, and network parts (#301)
* adds general and class properties extractors

* Update Speckle.Converters.Civil3dShared.projitems

* adds class properties for catchments

* adds catchment group proxies

* catchment proxy bug fix

* adds site props

* Update ClassPropertiesExtractor.cs

* Update ClassPropertiesExtractor.cs

* adds network, structure, and pipes

* registers pipe network

* renamed proxy handlers with cache property

* updates part dictionary props
2024-10-14 18:19:01 +01:00
Adam Hathcock 4f04e9e1b5 Use Metrics in Connectors (#296)
* 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
2024-10-14 13:36:07 +00:00
Dimitrie Stefanescu 0c5b5ed59c Merge pull request #278 from specklesystems/dim/brep-exp
wip: better rhino > revit brep support
2024-10-14 09:44:08 +01:00
Dimitrie Stefanescu de167cdfb6 Merge branch 'dev' into dim/brep-exp 2024-10-14 09:39:16 +01:00
Dimitrie Stefanescu 0a27fc1c2b Merge pull request #300 from specklesystems/dimitrie/cnx-510-revit-parameter-exports-perfection
Dimitrie/cnx 510 revit parameter exports perfection
2024-10-12 11:27:39 +01:00
Claire Kuang 1e537009e0 Merge branch 'dev' into dimitrie/cnx-510-revit-parameter-exports-perfection 2024-10-12 11:23:03 +01:00
Dimitrie Stefanescu 188f23faf4 Merge pull request #290 from specklesystems/bilal/cnx-569-element-id-not-set
added elementId
2024-10-11 14:32:47 +01:00
Dimitrie Stefanescu dca243825a chore: fmt 2024-10-11 14:27:34 +01:00
Dimitrie Stefanescu 650022ee10 chore: adds comment 2024-10-11 14:27:00 +01:00
Dimitrie Stefanescu 98a7064f43 Merge branch 'dev' into bilal/cnx-569-element-id-not-set 2024-10-11 14:26:28 +01:00
Dimitrie Stefanescu 9804acd10c feat: makes material quantities a map (used to a be a list)
tbh, this just makes it easier to show in the frontend - but worthwhile for now
2024-10-11 14:14:23 +01:00
Dimitrie Stefanescu 51550c96a6 feat: adds support for assembly structure (CNX-570)
(extracting material thickness and composition)
2024-10-11 13:59:44 +01:00
Dimitrie Stefanescu 491490c559 fix: CNX-565 and CNX-564 2024-10-11 13:14:21 +01:00
Dimitrie Stefanescu ec1f13754d Merge branch 'dev' into dimitrie/cnx-510-revit-parameter-exports-perfection 2024-10-11 11:54:36 +01:00
Dimitrie Stefanescu b840988bbe Merge branch 'dev' into dim/brep-exp 2024-10-11 11:53:36 +01:00
Adam Hathcock bd4b565799 Fix activity scope (#299)
* AsyncLocal in activity scope needs proper initialization

* add tests

* Fix Scope for real
2024-10-11 10:53:28 +00:00
Dimitrie Stefanescu 102a7cbd9e fix: fmt 2024-10-11 11:53:02 +01:00
Claire Kuang 8c34416b1a feat(civil3d): adds property sets and parts data to all civil objects (#297)
* 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>
2024-10-11 11:10:52 +01:00
Dimitrie Stefanescu 77af0b4ae4 Merge branch 'dev' into dimitrie/cnx-510-revit-parameter-exports-perfection 2024-10-11 11:07:23 +01:00
Adam Hathcock ed2d3ed931 AsyncLocal in activity scope needs proper initialization (#298) 2024-10-11 09:28:59 +01:00
Dimitrie Stefanescu 0d584bb0ac fix: CNX-559 2024-10-10 18:12:06 +01:00
Dimitrie Stefanescu a95e7cc225 fix: CNX-556 2024-10-10 17:41:37 +01:00
Dimitrie Stefanescu c2caeb5900 fix: CNX-567 2024-10-10 16:56:50 +01:00
Dimitrie Stefanescu fe6e195c0a Merge branch 'dev' into dim/brep-exp 2024-10-10 16:54:25 +01:00
Dimitrie Stefanescu 027a550c97 Merge branch 'dev' into bilal/cnx-569-element-id-not-set 2024-10-10 14:45:02 +01:00
Dimitrie Stefanescu 1074932eb5 fix: review comments
- split classes into separate files
- fixed namespacing in revit
- adds note on brep converter's repair call
2024-10-10 12:34:50 +01:00
Dimitrie Stefanescu 9f0b0837d8 Merge pull request #295 from specklesystems/fix-brep-revamp
Fix brep revamp
2024-10-10 11:50:30 +01:00
Adam Hathcock d3f32288bf fix test references 2024-10-10 10:41:08 +01:00
Adam Hathcock c251db709e update sdk reference 2024-10-10 10:38:32 +01:00
KatKatKateryna 56d0eb0d0b ArcGIS GroupLayers (#293)
* treat all LayerContainers as Collections

* account for all Symbols null exceptions

* documenting the change
2024-10-10 16:41:35 +08:00
Dimitrie Stefanescu bbd4beeafe fix: adds using statements to correctly dispose at end of the scope 2024-10-10 09:34:42 +01:00
Adam Hathcock 460719e0f0 Clean up attributes for logs/traces and user id correlation (#285)
* 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
2024-10-10 08:21:05 +00:00
Dimitrie Stefanescu eed7f913e5 chore: more formatting 2024-10-09 18:37:42 +01:00
Dimitrie Stefanescu e153eebe87 chore: formatting 2024-10-09 18:34:50 +01:00
Dimitrie Stefanescu c7eee14f7c Merge branch 'dev' into dim/brep-exp 2024-10-09 18:12:22 +01:00
KatKatKateryna 48b4be68bd add await (#294) 2024-10-09 17:09:15 +00:00
Dimitrie Stefanescu 685da9af3e chore: package locks push 2024-10-09 18:08:18 +01:00
Dimitrie Stefanescu ddaf329167 Merge branch 'dev' into dim/brep-exp 2024-10-09 17:14:00 +01:00
Dimitrie Stefanescu 794af5e501 fix: adds whatever support we can for curves inside blocks
by pre transforming the raw elements
2024-10-09 16:59:30 +01:00
Jedd Morgan 3028e9e29d Asyicify ExecuteScriptAsync calls (#240)
* First pass adding async

* Updated Idle manager to work with async Tasks

* CA1506

* missing async

* Fixed tests

* Really fixed tests

* CA2201

* Really fixed the tests

* remaining awaits

* Async everywhere!

* Fixed merge errors

* fix: Missing imports

* IProgress sync used

* rename progress

* format

* Remove empty files

* update sdk

* convert progress

* use FireAndForget and readonly struct

* revert revit to use RevitTask

* don't use sync to UI thread for progress

* Fixes autocad loop to update UI with Task.Delay instead of Task.Yield

* format

* merge fixes

* update nugets

* fix imports for exceptions

* fix import

---------

Co-authored-by: Alan Rynne <alan@speckle.systems>
Co-authored-by: Adam Hathcock <adam@hathcock.uk>
2024-10-09 16:10:13 +01:00
Claire Kuang 704a75a2b4 feat(civil): adds basic element converter and fixes DI (#292)
* 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>
2024-10-09 14:19:01 +02:00
Dimitrie Stefanescu 63ae8e3ca5 fix: adds back support for non-instanced curves 2024-10-08 20:15:16 +01:00
Dimitrie Stefanescu 0f09a15f20 fix: improves performance for fallback scenarios 2024-10-08 16:26:40 +01:00
Dimitrie Stefanescu 23fbe106a7 fix: removes fallback for meshes due to performance reasons 2024-10-08 15:52:58 +01:00
Dimitrie Stefanescu c7665a7845 feat: adds fallback checking in importer and assign materials
f
2024-10-08 11:01:14 +01:00
Dimitrie Stefanescu 41da92e43a feat: faster mesh scaling 2024-10-08 11:00:45 +01:00
Dimitrie Stefanescu 9780cb6e35 feat: minor cleanup 2024-10-08 11:00:26 +01:00
Dimitrie Stefanescu 7d2f5a4385 feat: adds userland controllable transaction names 2024-10-08 11:00:02 +01:00
Dimitrie Stefanescu 7144d81059 feat(dui3): pinns created groups 2024-10-08 10:59:32 +01:00
Dimitrie Stefanescu ae162e3a46 fix: clears direct shape lib to fix second receive and catches objs with no material 2024-10-07 18:08:19 +01:00
Mucahit Bilal GOKER 311963f8ea added elementId 2024-10-07 17:49:11 +03:00
Dimitrie Stefanescu 2e70c24f29 Merge pull request #289 from specklesystems/oguzhan/brep-exp
Oguzhan/brep exp
2024-10-07 11:20:06 +01:00
Dimitrie Stefanescu 7300d53a50 Merge pull request #288 from specklesystems/oguzhan/cnx-549-set-selected-account-to-be-the-default-account
Feat(Config): Accounts config to keep latest user selected account persistent on UI
2024-10-07 11:18:15 +01:00
oguzhankoral b338f7750d Format 2024-10-03 11:49:27 +03:00
oguzhankoral b9bb8d52f4 Remove unused file 2024-10-02 20:59:17 +03:00
oguzhankoral 48396e7eaa Fix pre-existing parent group id in the list of ids to delete 2024-10-02 14:52:14 +03:00
oguzhankoral 27f959990f Remove invalid chars from group name 2024-10-02 14:45:35 +03:00
oguzhankoral e7d165d99b Bake single group for received version 2024-10-02 14:43:06 +03:00
oguzhankoral 7df01df8fc More cleanup 2024-10-02 14:23:01 +03:00
oguzhankoral 896de431be Clean up 2024-10-02 14:01:34 +03:00
oguzhankoral e0e6f416c0 Format 2024-10-01 18:41:55 +03:00
oguzhankoral 07ded4986d Fix the transform object 2024-10-01 18:39:26 +03:00
oguzhankoral 0eb2b867c8 Clean up on host object builder 2024-10-01 12:18:03 +03:00
oguzhankoral aaf6759075 Accounts config to keep latest user selected account persistent on UI 2024-10-01 00:01:36 +03:00
oguzhankoral bce9ed7a6f Create direct shape definitions 2024-09-30 16:53:23 +03:00
oguzhankoral 9edba5d992 Dev mode active in Local env 2024-09-30 12:37:18 +03:00
Oğuzhan Koral f9bcb47903 Merge branch 'dev' into dim/brep-exp 2024-09-30 11:58:07 +03:00
Dimitrie Stefanescu 4333bfbeb3 wip: revit materials hack for painting post conversion 2024-09-27 17:01:51 +01:00
Dimitrie Stefanescu b821a15701 Merge pull request #280 from specklesystems/claire/cnx-540-store-units-next-to-values
chore(revit): adds units to object params
2024-09-27 15:58:53 +01:00
Dimitrie Stefanescu 5b2ab8b401 Merge branch 'dev' into dim/brep-exp 2024-09-27 15:57:16 +01:00
Dimitrie Stefanescu 7bf287f706 wip 2024-09-27 15:32:09 +01:00
Oğuzhan Koral 79b907f014 Merge branch 'dev' into claire/cnx-540-store-units-next-to-values 2024-09-27 13:06:57 +03:00
Adam Hathcock 6115620d7d Try to pass log info to serilog without rendering the log statement (#266)
* Try to pass log info to serilog without rendering the log statement

* formatting

* remove redundant from new
2024-09-26 10:37:22 +00:00
Oğuzhan Koral b086d16faf Feat(tekla): plugin structure and bind UI (#282)
* Fun 101

* Update package.lock for tekla project

* Align tekla with new DI

* More alignment

* Add launch setting

* Message for init

* Move project to connectors folder

* Show, activate, focus

* Post build action

* NOT_DEPENDENT for inputs

on slides said that it useful on imports and exports and faster around 20x

* Add doc for InputObjectDependency.NOT_DEPENDENT

* Disable conditions on post build action

* Make it work!

* Move packages to Directory.Packages.props

* Bump tekla package.json to sdk 3.1.0-dev.146

* Add tekla project to Local.sln too

* Update packages.lock
2024-09-26 10:10:06 +00:00
Alan Rynne 9f402e852e CXPLA-89: Replace AutomaticallyUseReferenceAssemblyPackages with nuget (#284)
* feat: replace AutomaticallyUseReferenceAssemblyPackages with package instead

* chore: Update package lock files

* No privateAssets needed in global package ref
2024-09-26 09:52:22 +00:00
Jedd Morgan 2bb558548b Jedd/cxpla 84 add commit context to receive trace (#248)
* context

* rename activity

* Fixed build

* remove crap

* Fixed issue with CallerMemberName
2024-09-26 09:36:07 +00:00
Alan Rynne 7f6029d757 fix: Removes some properties from the .targets file and puts them into each csproj (#283)
* fix: Removes some properties from the .targets file and puts them into each csproj

> repetition but also much > clarity on what's going on.

* fix: Undo props changes
2024-09-26 08:07:23 +00:00
Claire Kuang df1b972d72 sends integer values as string when non-integer (#281) 2024-09-25 16:26:48 +00:00
Claire Kuang 7a3013dcaf Merge branch 'dev' into claire/cnx-540-store-units-next-to-values 2024-09-25 17:23:54 +01:00
Oğuzhan Koral fa31283d94 Chore(revit): Refactor material cache to ToHost ToSpeckle singletons (#262)
* A bit better

* Post conflict errors

* Remove old notes
2024-09-25 17:27:15 +03:00
Claire Kuang 2bf6c834c1 adds units to object params 2024-09-25 11:46:24 +01:00
Alan Rynne 94117e0345 Merge pull request #247 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update release branch with latest dev changes
2024-09-25 11:49:43 +02:00
Alan Rynne d8f3fa73ee fix: Use ConversionNotSupportedException instead of system one (#279)
* fix: Use ConversionNotSupportedException instead of system one

* fix: Equivalent fix for civil
2024-09-25 09:23:10 +00:00
Dimitrie Stefanescu 6defdbe353 wip: better rhino > revit brep support 2024-09-24 22:38:34 +01:00
Dimitrie Stefanescu f59a3744b0 Merge pull request #276 from specklesystems/claire/cnx-550-fix-closed-curve-to-direct-shape-conversion
fix(revit): receives circles
2024-09-24 18:19:29 +01:00
Dimitrie Stefanescu 51a0d62723 Merge branch 'dev' into claire/cnx-550-fix-closed-curve-to-direct-shape-conversion 2024-09-24 18:14:29 +01:00
Dimitrie Stefanescu c802e77acb Merge pull request #277 from specklesystems/dimitrie/cnx-572-revit-sloped-glazing-missing
fix(revit): handles curtain grids hosted on roof elements
2024-09-24 17:58:35 +01:00
Dimitrie Stefanescu db9637bd4d Merge branch 'dev' into dimitrie/cnx-572-revit-sloped-glazing-missing 2024-09-24 17:52:15 +01:00
Dimitrie Stefanescu 304ce7e703 fix(revit): handles curtain grids hosted on roof elements 2024-09-24 17:50:04 +01:00
Claire Kuang 9ff60f3108 Update Speckle.Converters.RevitShared.projitems 2024-09-24 17:17:56 +01:00
Claire Kuang 41c8e4e4bd Merge branch 'claire/cnx-550-fix-closed-curve-to-direct-shape-conversion' of https://github.com/specklesystems/speckle-sharp-connectors into claire/cnx-550-fix-closed-curve-to-direct-shape-conversion 2024-09-24 17:13:27 +01:00
Claire Kuang 02a1e3fe06 Update Speckle.Connectors.sln 2024-09-24 17:13:16 +01:00
Claire Kuang f5f8e46f6e Merge branch 'dev' into claire/cnx-550-fix-closed-curve-to-direct-shape-conversion 2024-09-24 17:06:17 +01:00
kekesidavid 09502028ee sending worksetId and workset name + groups named after full path (#275) 2024-09-24 18:03:11 +02:00
Claire Kuang 49e918ff93 Merge branch 'dev' into claire/cnx-550-fix-closed-curve-to-direct-shape-conversion 2024-09-24 17:01:27 +01:00
Claire Kuang 1c90a8aa12 removes splitting logic and just bounds created arcs 2024-09-24 16:47:42 +01:00
Claire Kuang 6eba1939ef fixes closed curve in ds bug and refactors root converter 2024-09-24 15:52:06 +01:00
Adam Hathcock 3227d09958 Simplify DI/assembly structure part deux (#270)
* Rename utils to common

* fix namespaces

* Rhino kind of works

* Fix converter registration

* Fixed circular referece with lazy resolving

* Fixed Rhino8

* Revit 2022 builds

* revit 2023 compiles

* working on revit

* use speckle app for info instead of statics

* lazy init bindings

* Rhino compiles

* Revit compiles

* Autocad 2022 builds

* Autocad/Civil builds

* ArcGIS compiles

* Remove Autofac completely

* format

* React to SDK renames

* fixes for merge

* Update nuget and official sln

* Remove extra projects

* AutoActivate IBrowserBridge and rename it

* add extra null check

* Merge fixes

* Fix convertermanager problem and add tests

* Add new test project to local sln

* Use recursion

* formatting

* resolve circular dep with lazy get
2024-09-24 16:15:01 +03:00
Adam Hathcock c805ff0650 add deep clean doc (#273)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-09-24 11:57:36 +00:00
Adam Hathcock 7ee5d9ec0e Use AutomaticallyUseReferenceAssemblyPackages (#271) 2024-09-24 11:01:28 +00:00
Adam Hathcock b98e564cd1 Add null check for revit API (#272) 2024-09-24 13:57:14 +03:00
Oğuzhan Koral fd992d6471 Fix(autocad): TryGetMaterialId for both cases (#259)
* Covers both cases on render materials

* Remove unneccessary return result list

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-09-23 16:58:06 +00:00
Oğuzhan Koral 50414e95ad Add units info to root object on send (#260)
Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-09-23 16:52:23 +00:00
Dimitrie Stefanescu 6d3eb88b20 Dimitrie/cnx 430 re evaluate parameters (#255)
* wip

* feat(dui3): simpler parameter extraction logic + parameter definitions

* chore: refactoring

* wip

* feat(revit): removes parameter definition handler from context stack and relies on DI

cc oguzhan, we'll need to refactor a few things with this in mind

* chore: adds comments

* feat: comments and logging

* feat(revit): WIP adds setting for null/empty param sending, and other refactors

* feat: respects setting in extraction logic

* chore(dui3): adds extra comments

* Fix build errors

* feat: removes dead code

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2024-09-23 16:45:49 +00:00
Adam Hathcock 33bf13602a Revert new DI simplification (#269) 2024-09-23 17:08:00 +01:00
Dimitrie Stefanescu 0c007d33ae Merge pull request #268 from specklesystems/add-deep-clean
add deep clean
2024-09-23 16:33:34 +01:00
Dimitrie Stefanescu 61ea029d76 Merge branch 'dev' into add-deep-clean 2024-09-23 16:28:34 +01:00
Dimitrie Stefanescu ef7ff4b42a Merge pull request #267 from specklesystems/fix-DI-internal
DI classes should be public
2024-09-23 16:23:36 +01:00
Adam Hathcock f99eca8537 add deep clean 2024-09-23 16:20:43 +01:00
Adam Hathcock c8c50fa4be DI classes should be public 2024-09-23 16:18:08 +01:00
Adam Hathcock 7307e83860 Simplify DI assembly structure (#256)
* Rename utils to common

* fix namespaces

* Rhino kind of works

* Fix converter registration

* Fixed circular referece with lazy resolving

* Fixed Rhino8

* Revit 2022 builds

* revit 2023 compiles

* working on revit

* use speckle app for info instead of statics

* lazy init bindings

* Rhino compiles

* Revit compiles

* Autocad 2022 builds

* Autocad/Civil builds

* ArcGIS compiles

* Remove Autofac completely

* format

* React to SDK renames

* fixes for merge

* Update nuget and official sln

* Remove extra projects

* AutoActivate IBrowserBridge and rename it

* add extra null check
2024-09-23 15:27:46 +01:00
kekesidavid e1e762642a Fix(Revit): Delete Previous Model Groups on Multiple Receive (#263)
* fix: Delete Previous Model Groups on Multiple Receive

* made GetGroupsByName private
2024-09-20 13:24:44 +02:00
Jedd Morgan 6deb59e7f0 WIP on jedd/cnx-462-async-ify-executescriptasync-calls-to-ensure-solid-threading (#261) 2024-09-19 15:50:56 +02:00
Alan Rynne cb78f42c41 fix: Tweak logging to console on debug and seq on release (#258) 2024-09-19 12:58:03 +00:00
Dimitrie Stefanescu 4e48427bee Revit receive first pass: reference geometry workflow (CNX-403) (#254)
* feat(dui3): re-enables receive binding

probably the fourth time

* chore(revit): drastic cleanup

maybe too drastic, we will see soon

* feat(revit): starts scaffolding revit root to host converter

* RenderMaterialToHostConverter added back

* casting to GeometryObject instead of GeometryElement

* feat(dui3): fallback display values and refactors out material converter

* feat(dui3): creates DS and adds point support

* feat(dui3): closed nurbs fallback to display values

* David/cnx 443 selection (#231)

* highlight works

* use status.success on receive success

* question comment

* wip

* feat(revit): wraps receive in correct context

* wip

* feat(dui3): adds prototype grouping by collection

and adds todos

* remove invalid characters from group name

* hide warnings preprocessor

* exception handling and error log

* added cancellation and progress reporting

* chore: comments and minor cleanup

* David/cnx 409 2 add rendermaterial and color manager to connector (#242)

* materials wip

* Make it work receiving render materials

* MaterialBaker mods, cleanup

* Address the PR comments

* Remove invalid chars from structured material names

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>

* Minor cleanup

* Add object application id into objects of its layer render material proxy

* feat(dui3): adds compatibility for objects with display values

* Use LocalToGlobal logic for revit receive

* Use common local to global util for arcgis too

* Remove unnecessary registration

* Remove using

* Remove unnecessart ToList

* Register LocalToGlobalConverterUtils for connectors not as common

* purge materials and groups in Revit before update (#245)

* purge materials and groups in Revit before update

* cleaner linq

* renamed _groupManager to _groupBaker

* assign categories to DirectShapes after receive, updated revit invalid chars (#253)

* Post conflict resolving problems

* minor changes, logging, comments (#257)

* minor changes, logging, comments

* typo

---------

Co-authored-by: David Kekesi <david@speckle.systems>
Co-authored-by: kekesidavid <david.kekesi@gmail.com>
Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2024-09-19 14:09:17 +03:00
Oğuzhan Koral 2418b3e564 Fix(rhino): missing render material of layers on second send (#252)
* Fix the missing RenderMaterial prop of Layer

* Continue if RenderMaterial is set
2024-09-18 18:47:54 +03:00
Adam Hathcock 4a2233e167 SDK is non static and logging/tracing controls are moved to the connectors (#239)
* use new containerized SDK

* Use containered Tracing and Logging

* Autocad loads

* logging builds

* fmt

* Remove console logger and hook up merged logging

* cleanup

* Clean up logging

* use nuget

* Add Logging project to solution then consolidate getting assembly version

* don't need this project anymore

* merge fixes

* add new seq config

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-09-18 14:13:18 +00:00
Adam Hathcock 1dbb2b6abe Dispose Containers (except for Autocad) (#250) 2024-09-18 16:03:56 +02:00
Oğuzhan Koral b52d66c522 Pass base object not mesh under displayValues (#249) 2024-09-18 14:57:52 +03:00
Adam Hathcock 3454587330 Add tracing around conversions and success/failure exceptions (#241)
* Add tracing around conversions and success/failure exceptions

* merge fixes
2024-09-18 10:03:09 +00:00
Alan Rynne ac1e402d1d fix: Prevent increment when release commit is tagged (#246) 2024-09-18 10:35:22 +02:00
Adam Hathcock 8d0d7a89f7 Change conversion stack to better usage for products. (#215)
* fix: Push to sync with Jedd

* Jedd's record suggestions

* cleanup stack

* Revit settings converted

* more settings changes

* fix unit of work and scope registration

* rename

* fix more settings

* Use a generic factory to create settings contexts

* fix ArcGIS

* generic sending

* fix ArcGIS

* remove extras

* fix crs scoping

* fix autocad

* fix units for arcgis

* civil3d conversions

* rhino mostly works

* Rhino and recieve changed

* fix revit tests

* fix rhino tests

* fix merge

* make settings a record again

* fixes from reversion

* merge fixes

* ArcGIS reverts

* more senders reverted

* remove added reference

* clean up locks and files

* update nunit

* make things proper records

* fix test

* Merge fixes

* merge fixes

* Initialize the settings instead of push empty

* scan things consistently

---------

Co-authored-by: Alan Rynne <alan@speckle.systems>
Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-09-17 14:42:00 +02:00
Oğuzhan Koral cc285e99ee Add WorkspaceId to model card (#236)
it is needed to store information between sessions
2024-09-16 16:49:11 +03:00
Jedd Morgan eb8f8defc0 Jedd/cxpla 55 add required keyword for more geometry types (#220)
* Nullability of TryGet function

* blip

* Connector side changes

* Fixes

* Fixed other SDK changes

* Fixed Meters defaulting in Revit

* Agis fix required units (#224)

* fix arcgis units

* usings

* correct units

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>

* Fixed compiler errors

* Resolved PR Comments

* Fixed last revit units issue

* extras

* Bumped sdk deps

---------

Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
2024-09-16 11:09:49 +02:00
KatKatKateryna 466ac5e49d AGIS mesh boundaries (#222) 2024-09-16 16:47:06 +08:00
Dimitrie Stefanescu 359954cd11 Merge pull request #238 from specklesystems/oguzhan/cnx-436-autocad-wrong-arc-conversions-again
Fix(autocad): Evaluate mid point with angle
2024-09-13 12:24:58 +01:00
oguzhankoral 55e8ad8493 Evaluate mid point with angle 2024-09-12 19:22:56 +03:00
Oğuzhan Koral 3d64a3c4b7 Feat(dui3): improve root and host builders (#226)
* Remove SyncToThread from connectors

* Run only conversion under RevitTask.RunAsync

* Remove SyncToThread from RhinoHostObjectBuilder

* Introduce RootObjectUnpacker

* Split bakers and unpackers for Rhino

* Remove unnecessary out

* Use RootObjectUnpacker for proxies

* Extract proxy keys to outside

* Remove redundant comment

* Add logger for unpackers and bakers

* Add steps to RhinoRootObjectBuilder

* Pass only projectId instead of all SendInfo to ConvertRhinoObject function

* Align AutocadRootObjectBuilder with RhinoRootObjectBuilder

* Align AutocadHostObjectBuilder with RhinoHostObjectBuilder

* Use ProxyKeys on arcgis and revit

* Split unpackers and bakers for autocad

* Note to Autocad SyncToThread

* Add logger to autocad unpackers and bakers

* Notes

* Reimplemented Async builder (#229)

* Split layer manager into bakers and unpackers

Also introduces LayerPathUnpacker as abstract class to handle GetLayerPath

* Remove redundant notes

* Make GetLayerPath logic same for autocad and rhino

* Use ex instead e for exception

* chore: fixes PR comments

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-09-11 20:26:21 +03:00
Alan Rynne d358a75769 Merge pull request #235 from specklesystems/dev
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
Update release/3.0.0 with changes from dev.
2024-09-11 14:26:50 +02:00
Oğuzhan Koral 75ebf8f549 Add new properties to ReceiverModelCard for mixpanel tracking (#234) 2024-09-11 12:53:10 +01:00
Oğuzhan Koral 4c462923f2 Use default CancellationTokenSource.None (#233) 2024-09-11 11:16:35 +01:00
Oğuzhan Koral 53522a8307 Increase time span for ActionBlock (#232) 2024-09-11 08:48:59 +00:00
Alan Rynne c42ad3f042 chore(ci): Add release branches to CI trigger
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
2024-09-10 18:19:16 +02:00
Alan Rynne e75ca72abd Merge branch 'dev' into release/3.0.0 2024-09-10 17:21:59 +02:00
Adam Hathcock 7e4125cb93 Switch tracing to seq dev. Turn off tracing to console when debugging (#228) 2024-09-10 14:03:21 +00:00
Alan Rynne 0a568ac9fd fix(gitversion): Use GitFlow defaults (#230) 2024-09-10 13:50:26 +00:00
Alan Rynne 859193be37 fix: Delete build artifacts after build-installers job is done (#225)
Do so regardless of fail/success of the deployment
2024-09-10 14:52:48 +02:00
Adam Hathcock 49c2494d3c Build Revit 2022 on Local (#227) 2024-09-09 14:24:22 +02:00
Jedd Morgan cfe1980e7a bump sdks
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
2024-09-06 14:22:23 +01:00
Oğuzhan Koral f1a5a4cbfe Use Invoke function instead InvokeAsync (#223) 2024-09-06 13:34:22 +03:00
KatKatKateryna ddccb44341 remove unused function (#221)
* remove unused

* usings

* shuffle
2024-09-05 21:31:43 +01:00
kekesidavid 98f43032a0 fix(Revit):CNX-414 fixes DirectShape category bug (#219)
* direct shape not sending fix

* extended POC comment
2024-09-05 11:44:28 +02:00
KatKatKateryna 7bbc3a0121 Agis fix geometry deviations (#211)
* pass down the same SpatialReference

* fixes

* Revert "fixes"

This reverts commit e443f293b4.

* Revert "pass down the same SpatialReference"

This reverts commit 7cc8d5f4df.

* only pass CRS after densification

* comment
2024-09-03 13:32:01 +00:00
KatKatKateryna 02e7ed95b4 AGIS more specific document naming (#218)
* more specific document naming

* clear cache
2024-09-03 13:20:47 +00:00
KatKatKateryna ff540caad7 fix update changed IDs (#209)
* fix update changed IDs

* better naming

* remove initial count

* move layer order method also to mapMemberUtils

* loop

* better names

* comment

* fix

* split layers and tables

* refactor layer loop
2024-09-03 13:15:22 +00:00
Jedd Morgan d78345367b Nullability of TryGet function (#217)
.NET Build and Publish / build (push) Has been cancelled
.NET Build and Publish / test (push) Has been cancelled
.NET Build and Publish / deploy-installers (push) Has been cancelled
2024-09-03 08:49:32 +01:00
Alan Rynne 236cdb4a23 chore: Use rc version of SDK and Objects (#216)
* chore: Use 3.0.1-rc in all connectors

* fix: Remove USFeet from unit support in Civil and ArcGIS
2024-09-02 13:51:48 +01:00
Jedd Morgan 9d6c91485e Add logging of send conversions (#214)
* Added logging to IRootToHostConverter

* Log send conversion errors

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-09-02 13:41:37 +01:00
Jedd Morgan 077ac246a8 Added logging to IRootToHostConverter (#212)
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-30 19:34:33 +01:00
Claire Kuang 7852b1d2ff fix(revit): CNX-394 better reference point cache invalidation (#213)
* adds reference point transform to xyz, and refactors

* spelling fixes

* adds reference point caclulation to connector instead of converter

* disables xyz test for now due to complications mocking the reference point converter

* moves reference point transform method to separate class

* extracts to speckle settings into manager singleton

* removes  unecessary usings

* Pragma the send function sorry to not sorry

* optimizes mesh conversions

* removes unnessary meshconversion method and adds reference point transform to meshlist conversion

* better reference point invalidation logic

* Update MeshByMaterialDictionaryToSpeckle.cs

* fixes id evictions for objects that need to be unpacked

* removes circular dependency

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-30 20:44:51 +03:00
Claire Kuang 6b7574e5fb feat(revit): CNX-340 add reference point setting to revit send (#203)
* adds reference point transform to xyz, and refactors

* spelling fixes

* adds reference point caclulation to connector instead of converter

* disables xyz test for now due to complications mocking the reference point converter

* moves reference point transform method to separate class

* extracts to speckle settings into manager singleton

* removes  unecessary usings

* Pragma the send function sorry to not sorry

* optimizes mesh conversions

* removes unnessary meshconversion method and adds reference point transform to meshlist conversion

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-30 15:33:42 +01:00
Oğuzhan Koral e821e93ba5 Get dev mode info from config binding (#210) 2024-08-29 19:18:11 +03:00
KatKatKateryna 8744331ebb receive materials (#208)
* receive materials

* typos
2024-08-29 22:13:41 +08:00
Alan Rynne a5012eda02 chore: Silence SDK1206 warnings for now (#207)
* chore: Silence SDK1206 warnings for now

* fix: Do not include sha in product info version
2024-08-29 13:24:00 +01:00
Alan Rynne f9a8831fec CNX-369 Rename all UI elements and commands in v3 connectors (#206)
* feat: Renamed to v3

* feat: Use Speckle (Beta) and Speckle for XXX (Beta)

* feat: Change to `Speckle (Beta) for XXX`

* fix: Revert unintentional change

* fix: IDE0100 unnecessary equality check
2024-08-28 19:09:04 +03:00
KatKatKateryna 39ff7c9bba receive points as fallback displayValue (#205)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-28 13:23:36 +00:00
Oğuzhan Koral 2d345e606b Fix(revit): Reference to CefSharp.Wpf.NETCore for Revit 2025 (#204)
* Reference to CefSharp.Wpf.NETCore for revit 2025

* Remove commented out code
2024-08-28 15:00:11 +03:00
Oğuzhan Koral 93f2df0c9e Fix(revit): regression on switching ElementId to UniqueId (#202)
* Fix regression on switching ElementId to UniqueId

* Do not treat object ids in send filter as unique ids

* Use unique ids everywhere

* Get element ids from unique id also for highlight model

* Remove unnecessary using

* Remove unused Parse function

* Rename function

* Find intersection of invalidated objects with UniqueIds
2024-08-27 11:50:45 +03:00
Claire Kuang 2916af03e6 feat(revit): CNX-344 parameter elementid values sent as elements names when available (#201)
* uses element name instead of elementid as param value

* Update ParameterValueExtractor.cs
2024-08-27 09:24:14 +01:00
Claire Kuang 14a429f4de feat(revit): CNX-188 extract material quantities out for all objects (#184)
* adds material quantity conversions

* adds material quantities to top level converter

* fixed bugs

* Update MaterialQuantitiesToSpeckle.cs

* refactor material quantities (#196)

* combines material and render material conversion and removes bad logic

* simplifies caching logic

* minor notes

* fix(dui3): corrects merge, resolves some DI confusion around the typed converter & fixes a copy paste error

* fix(dui3): removes params from materials.

we can bring 'em back if we validate the need for them.

* feat(dui3): radical simplification of material quantity extraction

* chore: adds comments and flags things as obsolete

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-26 19:37:25 +03:00
Oğuzhan Koral ace7bdf3b4 Fail fast if all conversion status is ERROR (#200) 2024-08-26 16:31:17 +01:00
Oğuzhan Koral 41c96a032c Fix(rhino): Remove square brackets from material name (#198) 2024-08-26 09:32:58 +00:00
KatKatKateryna e369292979 Agis separate dataset creation (#170)
* arcgis debugging profiles

* refactor write to database

* support tables

* optimize renderers

* visible progress for grouping

* Revert "arcgis debugging profiles"

This reverts commit d5753cac9b.

* receiving gisFeatures separately

* more refactor, broken colors

* remove unused stuff

* avoid multiple loops

* keep the first assigned Speckle_ID, don't change on every receive

* color categories fixed

* closed polyline geometry fixed on send

* fix color categories

* fold layers

* delete reference to deleted converter

* invoke Converting msg earlier on receive

* comment
2024-08-26 09:55:54 +02:00
Oğuzhan Koral eab6770695 Do not skip first item if it is one-to-one conversion (#199) 2024-08-25 10:57:53 +01:00
Dimitrie Stefanescu 5cbb59db0a Dimitrie/cnx 358 caching element from another model sent (#197)
* fix(dui3): correctly invalidates cache and syncs id behaviour in revit

* fix: filters for nulls
2024-08-24 22:25:51 +03:00
Jedd Morgan a18c1b5ecf Bumped sdk to 115 (#192)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-24 00:33:54 +03:00
Claire Kuang 2c46b1d0b8 chore(autocad/rhino): CNX-357 removes unnecessary definition color logic (#194)
* removes definition color hack for autocad

* removes color hack from rhino

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-24 00:27:18 +03:00
Oğuzhan Koral 953ffcc293 Feat(Settings): revit settings passes to converter (#195)
* Map and pass setting to converter

* Change return type to ICardSettings

* Invalidate cache if the setting of model card has changed

* Default to medium for geometry fidelity

* Rename GeometryFidelity to DetailLevel

* Default to medium

* Pass detail level to options in DB.Options
2024-08-23 17:56:59 +01:00
KatKatKateryna dc23b80352 Supports points as fallback in Rhino (#193) 2024-08-23 13:55:55 +03:00
Dimitrie Stefanescu 944e7c4326 Dim/light geo fix 2 (#191)
* fix: corrects if check post refactor

* chore: do not ask

* wraps up fix
2024-08-22 19:00:00 +03:00
Dimitrie Stefanescu a89de6bcc4 fix: corrects if check post refactor (#190) 2024-08-22 15:35:41 +00:00
Dimitrie Stefanescu bc3d7da65a fix(revit): invalidates send cache on doc unit change (#189) 2024-08-22 16:57:12 +03:00
Dimitrie Stefanescu f2a6619013 fix(revit): fixes display value extraction problems (#188) 2024-08-22 13:58:39 +03:00
Alan Rynne 1415f89a8c feat: Includes autocad 2022-2025 in stored artifact for deployment (#183)
Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-22 11:57:36 +02:00
KatKatKateryna cc2c847fd3 better exception message (#186) 2024-08-22 09:16:04 +00:00
KatKatKateryna 8b17f6f5f7 add exception msg to stackTrace (#187) 2024-08-22 10:51:14 +03:00
Oğuzhan Koral d0d1f681ca Do not store group id in baked object ids (#185) 2024-08-21 18:53:52 +01:00
Oğuzhan Koral e37009095e Feat(revit): CNX-220 Grid to speckle conversion (#182)
* Grid to speckle conversion

* Fix the namespace

---------

Co-authored-by: Alan Rynne <alan@rynne.es>
2024-08-21 17:50:47 +03:00
Alan Rynne c75961cd19 CNX-311 Sign releases with Digicert on tag push (#168)
* feat: First attempt at signed releases with Digicert on tag push

* fix: Delete gitversion config

* test: add gitversion manual mode

* tool manifest update

* fix: Only build on `v3.x` tags for now

* fix: Minor gitconfig tweaks

* fix: Revert to deploy from `main` branch
2024-08-21 14:53:57 +02:00
Claire Kuang a30b2cad90 fix(revit): CNX-329 adds units to all relevant conversions (#181)
* adds units to all relevant conversions

* Update LevelTopLevelConverterToSpeckle.cs

* adds units to revit elements

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-21 08:15:34 +00:00
KatKatKateryna 18ea2fea54 arcgis debugging profiles (#169) 2024-08-21 08:07:36 +00:00
Claire Kuang 53cd73c806 fix(revit): CNX-187 adds missing parameters to levels and revitelements (#179)
* adds missing parameters to levels and revitelements

* Update LevelTopLevelConverterToSpeckle.cs
2024-08-21 08:25:22 +01:00
Alan Rynne 0c03d664b0 feat: Include Rhino8 files in zip operation (#177)
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-08-20 17:02:28 +02:00
Dimitrie Stefanescu efaf8e3d0f Dimitrie/cnx 221 light as in lamps geometry is sent (#178)
* feat(revit): correctly unpacks multistory stairs

of course there was another one. here's to more :)

* fix: no longer sends lamp source geometry

* fix: nullability?

i think this is fake news, but...

* fix: nullability part 3

* fix: revit 2025 should be happy now 🤞
2024-08-20 14:55:57 +00:00
KatKatKateryna 802a109abd AGIS receive obj without appId (#172)
* receive obj without appId

* style: better if conditions? (#175)

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-20 14:51:50 +00:00
Dimitrie Stefanescu 13490d9862 feat(revit): correctly unpacks multistory stairs (#176)
of course there was another one. here's to more :)
2024-08-20 14:37:48 +00:00
Claire Kuang c42441dc76 fix(rhino): CNX-319 rhino block colors (#171)
* adds color source to color proxies and sends definition object layer colors

* adds missing materials and colors to instances on bake

* Update RhinoColorManager.cs
2024-08-20 15:14:22 +01:00
Dimitrie Stefanescu 81cd2fc7d9 feat(rhino): pre bakes layers on receive for speed and profit (#173) 2024-08-20 11:49:11 +00:00
Alan Rynne e7c3d2054c fix: Move *.addin files to their respective projects. (#174)
* fix: Move `*.addin` files to their respective projects.

These files should not live in `shared` projects as they are not shareable.

* fix: Revit2022 Release configuration + Add all versions to zip file
2024-08-20 11:42:46 +00:00
Claire Kuang 8a0dfca204 fix(autocad): CNX-318 better color inheritance for blocks (#167)
* updates definition object colors and refactors speckle application id retrieval

* adds definition object color inehritance and speckle app id extensions

* minor build fixes

* adds source to color proxy and color proxy id

* Update AutocadColorManager.cs

* Update AutocadColorManager.cs
2024-08-20 12:39:21 +01:00
Dimitrie Stefanescu dbc359f0e4 Dim/revit materials (#149)
* chore: cleans up display value extractor

removes transform references and checks for groups, as objects are ungrouped by that point

* feat: generates render material proxy maps in revit send

* chore: removes unused code

* feat(revit): material proxies wip

* wip

* removes unused converted cache

* wip

* chore: cleanup part 1

* chore: finished cleanup (moved revit render material proxy cache out)

* fix(revit): invalid progress reporting on send

* feat(rhino): adds rhino support for revit proxy materials

* fix(acad): checks group names for invalid chars

* fix(acad): checks material name for invalid chars

* feat(acad): adds support for baking fallback objects properly

including materials!

* wip: arcgis support for multiple fallback values

* Fix build errors (#166)

* fix: arcgis

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-19 16:14:09 +01:00
Jedd Morgan 5c3249ca0b Required keyword on various object models (#159)
* Polyline & curve required

* More objects

* default domain

* bumped deps

* revit units stack for boundry seg

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-16 14:32:05 +00:00
Claire Kuang 3301ebae27 adds unit conversions to blocks in connector (#165) 2024-08-16 15:05:53 +01:00
Dimitrie Stefanescu fa48f5db1d fix(rhino): group selection on highlight + get send settings (#158)
* fix(rhino): group selection on highlight + get send settings

* fix: pr comments

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-16 12:10:47 +00:00
Claire Kuang db375abfc7 fix(arcgis): CNX-307 correct hsv color conversions to rgb (#164)
* fixes hsv color conversions to rgb

* removes unused method
2024-08-16 12:07:57 +01:00
Jedd Morgan 7044014a73 Cleaned up cancellation token source usages (#156) 2024-08-16 07:44:17 +00:00
Claire Kuang fa9cd87013 feat(arcgis): refactors converters to use new IGisFeature classes (#150)
* refactors converters to use new IGisFeature classes

* Update GisFeatureToSpeckleConverter.cs

* removes unused converter

* fixes vector layer row conversion logic

* refactored visible fields lookup

* fixes display value bug

* Update GisFeatureToSpeckleConverter.cs

* adds old gisfeature converter

* Update FeatureClassToHostConverter.cs

* removes unecessary usings

* Fix for tables (#157)

* add tables fix

* usings

* feature count

* fixes table to host conversion to handle both new and old gisfeature classes

* refactors more to remove nullability on feature converters

* adds converter notes

* send multipatch layers + geometry fix on send (#162)

* account for more layer types

* namespaces

* fixed PolygonMeshes on send

* refactors layer unpacking logic

---------

Co-authored-by: KatKatKateryna <89912278+KatKatKateryna@users.noreply.github.com>
Co-authored-by: KatKatKateryna <kateryna@speckle.systems>
2024-08-16 05:06:24 +08:00
Claire Kuang 4a7474053a feat(autocad): CNX-281 adds speckle ribbon and button (#160)
* adds ribbon and button

* Update AutocadCommand.cs

* makes icon larger

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-15 18:33:58 +03:00
Oğuzhan Koral 00d62c56b0 Fix(autocad): Add "layer_" prefix for layer application ids (#161)
* Add "layer_" prefix for layer application ids

* Have an extension method for layer table record to get speckle application id
2024-08-15 15:21:57 +00:00
KatKatKateryna 58e7c1a449 Agis colors receive (#147)
* receive colorProxies

* documentation

* color manager to Scoped

* remove poc comment

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-15 15:15:07 +00:00
Adam Hathcock cd3944cbb8 Adam/cxpla 16 dry alignment of connector settings for hostapp slugs (#144)
* Revit redone

* ArcGIS and Rhino

* Remove settings

* Fixed warnings
2024-08-15 14:07:30 +02:00
Adam Hathcock be572a20af Add Progress for download and deserialization (#151)
* First pass using ProgressDisplayManager

* update for local

* Change root reporting

* fmt

* add upload reporting and remove unknown progress

* fix locks

* add tests

* FIx local sln
2024-08-15 10:45:45 +00:00
Jedd Morgan b9411f4609 Rhino send binding fixes (#155)
* Rhino send binding fixes

* Added Send settings to ISendBinding
2024-08-15 10:38:52 +00:00
Adam Hathcock 4adbe2a775 Add local and connector sln check (#154)
* Add local and connector sln check

* add props change

* fmt
2024-08-15 10:55:18 +02:00
Alan Rynne fcc22076a7 CNX-299: Adds support for sending SubD elements as BREPs (#153)
* feat: Adds support for sending SubD elements as BREPs

* fix: Format file
2024-08-14 16:40:16 +00:00
Adam Hathcock 42b6f297f5 Update SDK to 103 (#152) 2024-08-14 16:20:09 +00:00
Claire Kuang 22f62b34a3 fixes autocad circulararc conversions to handle edge cases (#146)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-14 11:23:21 +03:00
Oğuzhan Koral df13216cf4 Bump objects and sdk version to 3.1.0-dev.102 (#148) 2024-08-14 07:25:49 +00:00
Oğuzhan Koral af97f2cd7a Adjust send card settings with UI (#143) 2024-08-13 16:25:55 +00:00
Claire Kuang 145afc049e Update Speckle.Connectors.Autocad2024.csproj (#145) 2024-08-13 15:46:05 +00:00
Adam Hathcock 20e7ebe476 Adam/cnx 249 add autocad 2025 connector and converter (#132)
* add projects that build

* adjustments for .net 8

* version 2025

* add 2025 options needed
2024-08-13 13:59:46 +00:00
Dimitrie Stefanescu 4e220db35d feat(revit): extracts collection creation logic out into SendCollectionManager (#142)
* feat(revit): extracts collection creation logic out into SendCollectionManager

to cleanup the root object builder

* fix: null check for category in revit top level converter

* chore: removes stale code referencing hosted object collector

* chore: makes HostedElementConversionToSpeckle fully obsolete

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-13 11:33:51 +00:00
Jedd Morgan d25272f5af Use Operations.Send over SendHelper (#140) 2024-08-13 11:07:47 +00:00
Claire Kuang f87b2b7206 feat(arcgis) : CNX-257 send color proxies (#135)
* adds color proxies on send

* minor color manager refactor

* Update ArcGISColorManager.cs

* add values to colorProxies

* add root collection name

* solve precision for comparing unique values

* specify color space for rgb color conversions

* priorityValue matching the number of selected layers

* move comparison logic out

* Update ArcGISColorManager.cs

---------

Co-authored-by: KatKatKateryna <kateryna@speckle.systems>
2024-08-13 09:27:01 +00:00
Adam Hathcock 7ecd862879 Add Apache 2.0 license (#141) 2024-08-13 08:03:18 +00:00
Alan Rynne 647cbb5e55 CXPLA-17 Add XX_OR_GREATER flags to converter/connector projects (#136)
* feat: Add REVITXXXX_OR_GREATER flags to all revit projects

* feat: Add RHINOX_OR_GREATER flags to Rhino projects

* feat: Add XX_OR_GREATER flags to AutoCAD and Civil3d projects
2024-08-13 09:12:15 +02:00
Oğuzhan Koral db60e3e725 Clear the cache on doc swap (#139) 2024-08-12 19:18:51 +00:00
Oğuzhan Koral 56fd9289c2 Do not select if object to highlight is in Block (#138) 2024-08-12 21:32:30 +03:00
Jedd Morgan 7f717585c9 bump deps (#134) 2024-08-12 16:52:10 +00:00
Oğuzhan Koral df158832ee Change active layer to 0 if active layer name and will be erased matches (#133) 2024-08-12 17:01:52 +01:00
Dimitrie Stefanescu 98e2b47496 fixes cnx-217: nested families not sent unless they are in a group (#128)
* fix: now sends nested families (wip)

* fix: explodes nested families into subcomponents correctly

* fix: removed unecessary using

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-09 20:19:47 +03:00
Claire Kuang e85c568228 feat(autocad): CNX-250 Adds 2022 connector and converter (#131)
* adds autocad 2022 connector and converter

also changes dependencyinjection to be a shared project

* fix: selection events no longer crash 2022

co-authored with ogu and claire

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-09 17:15:03 +00:00
Claire Kuang a1e95ee7de adds 2024 connector (#129) 2024-08-09 18:42:48 +03:00
Dimitrie Stefanescu acb8a8b6c4 fix(acad): fatal crash on highlight (#130)
cause: we were creating definition instances with no objects inside of them, and this was causing acad to throw later down the line on highlighting
2024-08-09 15:21:22 +00:00
Claire Kuang 6fb4081efd fix(rhino): CNX-245 render materials inherited from layer bug (#127) 2024-08-09 14:50:40 +03:00
Jedd Morgan 46bb442f02 CNXPLA-19: Add logging for model card handled exceptions (#118)
* Add logging for model card handled exceptions

* Arcgis logger

* Polish
2024-08-09 10:42:38 +00:00
Dimitrie Stefanescu 65a8106a52 Dimitrie/cnx 201 group names from autocad to rhino are not supported (#126)
* fix(dui3): correctly creates groups with their appropriate name in rhino

* fix(dui3): purges groups on second receive to ensure correct name is set always

note, this means we're using our naming hack again

* fix: moves group logic to group manager :/

* chore: adds comment
2024-08-09 00:27:20 +03:00
Dimitrie Stefanescu b8d4b03be0 fix: handles correctly nested dynamic instances (inside other instances) (#125)
this check can now be safely removed, as we're handling 'em correctly
2024-08-08 19:06:39 +00:00
Adam Hathcock d4c47a050f Add more Rhino activities and update SDK (#124)
* Add more Rhino activities and update SDK

* update lock files

* fmt

---------

Co-authored-by: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com>
2024-08-08 18:58:52 +01:00
Claire Kuang 158027eb72 feat(autocad): CNX-23 render materials on send and receive (#117)
* adds color manager to autocad

* injects color manager

* adds colors to objects on receive

* Fixes setting layer colors on receive

* fixes layer colors and adds color to objects

* autocad color bugs

* merge errors

* object ids fix

* adds application id to autocad layers

* object ids bug

* reduces type complexity on send

* initializes collection cache to empty

* Update RhinoColorManager.cs

* layer bug

* adds materials to autocad on send

* skips inherited materials on send

* adds render materials as (color, transparency) on receive, and refactors groups to reduce complexity

* adds render material conversion to material

* fixes material bugs on receive

* fixes rhino render material receive default bug

* adds missing colors and materials to instances

* minor suggestions + semantics (#120)

* namespace changes

* Update AutocadInstanceObjectManager.cs

* fix: blocks

* Dim/cnx 23 fixes (#123)

* feat: simplification on the rhino side

* chore: removes stale code

* chore: moves colors next to materials

* chore: removes unused file

* chore: actually just stylistic changes

* feat: passes in material and color manager to layer manager by DI

* fix: forgot to stage this last change

* fix: typos, renaming + deleting stale code

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-08 16:56:11 +00:00
Adam Hathcock 92af8677e9 Update to Sdk 3.1.0-dev.95 (#122) 2024-08-08 13:59:21 +01:00
Adam Hathcock 891a18819b React to sdk renaming (#113)
* react to renamespacing

* merge dev

* fmt

* initialize things with typeloader

* autocad initialization

* add arcgis

* add more projects to local

* instrument rhino more

* update nugets

* fmt
2024-08-08 10:32:01 +00:00
Oğuzhan Koral 6615badfe5 Track layer changes by ModifyObjectAttributes of RhinoObject (#119) 2024-08-08 09:23:48 +01:00
Oğuzhan Koral a0d44150e9 Remove DisableRedrawScope on send (#116) 2024-08-07 18:04:16 +00:00
Dimitrie Stefanescu f0745cae97 Fixes Rhino unhandled exception 'destination array is not long enough...' etc. (#115)
* fix(dui3): wip fix for cnx-202

* fix(dui3): propagates change from rhino to other host apps

* fix(dui3/revit): cnx-225; revit was reporting cancellation as errors

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-07 17:32:04 +00:00
Adam Hathcock 3cb527667c Rhino otel (#112)
* add autocad beginnings

* WIP on DUI3-316-AutoCAD-Civil3d-SideBySide-Run-DUI3-and-DUI2-together

* Rhino 7 basics

* fix targets

* launch rhp

* intermediate commit

* intermediate commit

* Logger for Speckle.Logging

* Use nugets

* adjust dependencies

* Build fix

* merge fixes

* oops, two classes

* more receive instrumentation

* instrument to otel but not seq

* adds color manager to autocad

* injects color manager

* adds colors to objects on receive

* merge fixes

* add config for otel

* fmt

* Fixes setting layer colors on receive

* fixes layer colors and adds color to objects

* autocad color bugs

* merge errors

* object ids fix

* adds application id to autocad layers

* object ids bug

* reduces type complexity on send

* initializes collection cache to empty

* Update RhinoColorManager.cs

* react to sdk changes

* Update nugets

* remove serilog again

* fmt

* Rhino 7/8 now initializes logs same as Revit

* more instrumenting

* remove post-bulid copy step

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-07 13:37:33 +01:00
Adam Hathcock 5f9c718056 Logging using ILRepack and start of Open Telemetry usage (#89)
* add autocad beginnings

* WIP on DUI3-316-AutoCAD-Civil3d-SideBySide-Run-DUI3-and-DUI2-together

* Rhino 7 basics

* fix targets

* launch rhp

* intermediate commit

* intermediate commit

* Logger for Speckle.Logging

* Use nugets

* adjust dependencies

* Build fix

* merge fixes

* oops, two classes

* more receive instrumentation

* instrument to otel but not seq

* adds color manager to autocad

* injects color manager

* adds colors to objects on receive

* merge fixes

* add config for otel

* fmt

* Fixes setting layer colors on receive

* fixes layer colors and adds color to objects

* autocad color bugs

* merge errors

* object ids fix

* adds application id to autocad layers

* object ids bug

* reduces type complexity on send

* initializes collection cache to empty

* Update RhinoColorManager.cs

* react to sdk changes

* Update nugets

* remove serilog again

* fmt

---------

Co-authored-by: Claire Kuang <kuang.claire@gmail.com>
2024-08-07 11:56:55 +00:00
Oğuzhan Koral dfe2f71b67 Feat(dui3): CNX-182 upload download progress updates (#111)
* Downloading progress

* chore(dui3): comprise solution

* note re cnx-202

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-07 11:10:28 +00:00
Oğuzhan Koral 1d8e585500 Disable receive binding for now (#109) 2024-08-06 16:06:55 +00:00
Claire Kuang cea5750cae feat(autocad/rhino): CNX-162 CNX-163 adds color proxies on send and receive (#104)
* adds color manager to autocad

* injects color manager

* adds colors to objects on receive

* Fixes setting layer colors on receive

* fixes layer colors and adds color to objects

* autocad color bugs

* merge errors

* object ids fix

* adds application id to autocad layers

* object ids bug

* reduces type complexity on send

* initializes collection cache to empty

* Update RhinoColorManager.cs

* layer bug

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-06 16:46:55 +01:00
Oğuzhan Koral 82e95f9c00 Feat(dui3) Debouncing progress updates (#106)
* WIP

* Update progress by %1 interval

* Dim/millisecond based debounce (#107)

* uses time instead of progress values

* adds status as a change detector

* Extract to THROTTLE_INTERVAL_MS

* Inject OperationProgressManager as singleton

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-08-06 18:03:21 +03:00
Jedd Morgan 3074855cde quick optimised rhino send (#105) 2024-08-06 10:31:09 +01:00
Adam Hathcock 764c804461 Fixes for Rhino installers with Rhino8 intro (#103) 2024-08-05 12:37:24 +03:00
Dimitrie Stefanescu 6366f03d07 fix(dui3): cleans up base layer prefix from invalid chars - fixes second receive cleanup issues (#101)
* fix(dui3): cleans up base layer prefix from invalid chars - fixes second receive cleanup issues

and adds extra defensibility around layer naming in acad.

* fix(dui3): corrects by layer purge in acad

i have no idea how i even wrote this code in the first place
2024-08-04 19:48:30 +03:00
KatKatKateryna bf0f2b3884 All operations: split main tread operations (ArcGIS, Rhino, Revit, Aacad) (#94)
* remove sync to main thread on Receive Operation

* non-gis datasets writing - to main thread

* map layers - on main thread

* gis & non-gis converters - to main thread

* Revert "non-gis datasets writing - to main thread"

This reverts commit 9b10a9ec99.

* all to main thread

* async host installer

* RootObjectBuilder uses Task now for sending

* move subscriptions to new layers to Send event

* Send to async

* spaces on conflict merge

* format

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-03 13:09:22 +03:00
Adam Hathcock c23bd8ee70 Add Logging to Local.sln (#99)
* Add Logging to Local.sln

* VS fixes
2024-08-02 21:08:20 +00:00
Dimitrie Stefanescu ad9fb2d4be Dimitrie/cnx 34 implement in revit send (#86)
* feat(dui3): selection unpacker + removes wall hosted elems

* feat(dui3): removes hosted elems converter usage from all elements

* chore(dui3): refactors out hosted element converter

* fix(dui3): correctly unpacks and packs groups and curtain walls

+ comments

* feat(dui3): adds type sub-path to sent elements

* fix(dui3): fixes rhino layer creation

* feat(dui3): removes traverse with progress from hopefully everywhere
2024-08-02 17:42:36 +00:00
Jedd Morgan 9e6d07b6fa suppressed parentheses preferences (#100) 2024-08-02 17:33:59 +00:00
Adam Hathcock 3601bdc438 Use RunAsync for Revits and UI for 2025 (#98) 2024-08-02 15:04:58 +00:00
Claire Kuang e432183df3 fix(rhino) : CNX-136 fixes gem, glass, and emission materials to acceptable degree in rhino<>rhino (#95)
* makes rhino nurbs curve converter safer

* bug fixes for gem, glass, and emissive materials

* Update NurbsCurveConverter.cs
2024-08-02 14:47:59 +00:00
KatKatKateryna b11cb91a4d AGIS: expand groupLayers on Highlight (#97)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-02 16:46:06 +03:00
KatKatKateryna 08d1e4578d AGIS: Blocks ToTransform for ITransformable (#93)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-02 16:13:05 +03:00
Adam Hathcock 12094d1dbe Fix layer traversals (#96)
* Fix up transactions

* Fix for creating empty collection when asking for Rhino Layer Paths
2024-08-02 13:04:35 +00:00
Adam Hathcock 5361af8c76 Lock fix for Rhino 8 (#91)
* Lock fix for Rhino 8

* change CI build to do everything

* Remove Rhino8 multitargetting

* fix windows

* upgrade webview2 for Rhino8

* only test

* codecov requires ubuntu

* Remove platform target x64 and other net7 related ones

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2024-08-02 09:56:55 +01:00
Adam Hathcock 7d42d52efd D ui3 316 auto cad civil3d side by side run d ui3 and d ui2 together (#73)
* add autocad beginnings

* WIP on DUI3-316-AutoCAD-Civil3d-SideBySide-Run-DUI3-and-DUI2-together

* Rhino 7 basics

* fix targets

* launch rhp
2024-08-01 13:13:27 +01:00
Jedd Morgan 77e6f74fd3 Update Directory.Build.props (#90) 2024-08-01 11:58:20 +00:00
Adam Hathcock 36cfa1d6fd Ilrepack update with logging only (#92)
* Update dependencies for SDK to latest

* Adjust code to build

* rework logger

* mark as sealed to drop warning suppressions
2024-08-01 11:53:45 +00:00
KatKatKateryna 05aa73dad1 AGIS: update progress bar on WriteToDataset step (#87)
Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-08-01 11:08:44 +00:00
Oğuzhan Koral 8a9ada020b Rhino 8 support (#84)
* Split Rhino and Shared for 8 version

* Make plugin and command version agnostic

* Make it partially work

* Successful send from Rhino 8

* Fix rhino8 (#85)

* Regen lock files

* use BoxFactory again with generated types

* fmt

* Project settings for targets for x64 and copy

---------

Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-07-31 18:05:00 +03:00
Oğuzhan Koral a5d0b861c2 Feat(arcgis): Receive new blocks (#79)
* Local to global proxy

* Fix on having only non-instanceProxy maps

* transforms

* fixed matrix

* text

* wip

* Fix styling

* More styling

* Lock files

* Fix atomic object unpacking

* Receive new blocks in arcgis

* Check matrix count before adding conversionTracker

* update TC in Unpacker

* Add note on serialization hack

* transforms for displayValues

---------

Co-authored-by: KatKatKateryna <kateryna@speckle.systems>
2024-07-29 16:14:58 +03:00
Dimitrie Stefanescu 96671f713d Dimitrie/cnx 14 send dynamic blocks from acad as exploded groupsstatic (#81)
* feat(dui3): CNX-116 and CNX-14

* fix(dui3): prevents acad object highlighting fatal crash

by using the new top level exception handler available on the parent

* fix(dui3): purges failed conversions from instance def proxies

* fix(acad): removes unnecessary wrapper

* chore(dui3): adds comments

---------

Co-authored-by: Oğuzhan Koral <45078678+oguzhankoral@users.noreply.github.com>
2024-07-29 10:20:52 +01:00
Dimitrie Stefanescu bba22eef77 fix(rhino): checks for null edge trims (#82) 2024-07-27 20:31:10 +00:00
Jedd Morgan f4d77bf8ce Top Level Exception Handler and Bindings fix (#76)
* TopLeveExceptionHandlerBindings

* Fixed idle manager on exceptional path

* null bindings check

* Made TopLevelExceptionHandler injectable

* Revit now works

* Fixed Tests

* returned unintentional change
2024-07-27 12:40:21 +01:00
KatKatKateryna 0806284288 group with Catalog DockPane (#78) 2024-07-26 13:04:09 +00:00
Claire Kuang dc57a34990 CNX-103 Autocad: fixes polyline arc segment bug (#77)
* found the arc bug

* Update CircularArc3dToSpeckleRawConverter.cs
2024-07-26 12:42:25 +00:00
Claire Kuang 4ed8175bdc refactor(rhino): CNX-19 adds render materials to objects and layers (#74)
* handles layer render materials and refactors material manager

* updates to new render material proxy class

* fixes duplicate layer processing logic

* refactors receive, fixes bug on send

* Revert dependency changes

* feat(dui3): pushes complexity to material manager, and cleans up root object builder

* feat(dui3): pushes complexity to material manager, and cleans up root object builder 

co-authored with @oguzhankoral

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-07-25 16:14:46 +00:00
Oğuzhan Koral c2a53f6f1e Fix on arcgis targets (#75) 2024-07-25 15:25:29 +03:00
Adam Hathcock a1c0fbec3e Cleanup notnull (#72)
* alphabetize deps

* rerun locks

* use new nuget

* dump usage of one not null

* dump another usage of not null
2024-07-25 08:35:11 +01:00
Adam Hathcock 78fc084c15 Update Core for new stuff (#70)
* Update Core for new stuff

* package locks correct
2024-07-24 15:18:27 +01:00
Adam Hathcock 0c8a3b0c06 Autocad cleanup (#66)
* Clean up Autocad Plugin (not needed) and id for revit

* add folders for autocad

* add back initialization

---------

Co-authored-by: oguzhankoral <oguzhankoral@gmail.com>
2024-07-24 14:11:11 +01:00
KatKatKateryna ea5910b102 catch invalid projection (#56)
Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-24 09:54:55 +00:00
KatKatKateryna f1febb5e37 set Relative to the ground Elevation prop (#57)
Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-24 09:54:28 +00:00
KatKatKateryna ca25470ba0 AGIS: send group layers (#59)
* send nested layers

* don't use cache for sending group layers

* propagate changedLayerId to all sub-layers on the Map

* new syntax

* count groups outside the loop

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-24 10:53:51 +01:00
Adam Hathcock ffc84bac10 don't ignore dev PRs (#69)
* don't ignore dev PRs

* rework actions

* minimize test output
2024-07-24 09:36:36 +01:00
Adam Hathcock 3a94a63c1d don't do releases for PRs (#67) 2024-07-24 08:33:55 +01:00
Dimitrie Stefanescu ba26ee0910 Dim/acad groups (#61)
* wip group creation in acad

* in progress changes from fieldtrip

* feat(dui3): extracts group from acad

* fix(dui3): post dev merge edits
2024-07-23 16:41:59 +00:00
connorivy 722d091bcd initialize revit async (#68)
Co-authored-by: Connor Ivy <connor@speckle.systems>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-07-23 15:09:18 +00:00
Adam Hathcock 4237d8ac22 Use ServerTransportFactory on receive (#64) 2024-07-23 15:59:32 +01:00
Claire Kuang b07a61aaef feat(rhino): DUI3-142 adds render materials to objects on send and receive (#63)
* adds rhino material table to send commit

* adds render materials on send

* adds render materials on receive

* Update RhinoHostObjectBuilder.cs

* fixes dictionary trygetvalue errors

* Update RhinoMaterialManager.cs
2024-07-23 15:31:53 +01:00
KatKatKateryna f4e7214130 Syntax error (#58)
* don't reassign values; division in brackets

* new syntax
2024-07-23 21:53:56 +08:00
Oğuzhan Koral c639fcb64e UX: Handle non-fatal exceptions for send and receive to show it on model card level (#65) 2024-07-23 14:18:11 +01:00
Adam Hathcock a554a2ab9d Create connector tests (#52)
* Use shared IdleManager

* Fix usage of _hasSubscribed by using Try methods on concurrent dictionaries

* use top exception handler in idle manager subscription

* Connectors with TopLevel handler tests

* fix handler

* start idle call manager tests

* add remove tests

* merge fixes

* add a bit more coverage

* Fix tests
2024-07-23 13:13:28 +01:00
Adam Hathcock 27fde075b8 Fix clean locks by restoring main solution (#60) 2024-07-23 11:40:49 +01:00
Jedd Morgan e0f26d2816 More warnings (#41)
* More warnings

* Code warnings fixes and setup

* more warning fixes

* Fixed all warnings

* format

* Fixed new warnings

* registration

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-22 17:15:04 +01:00
Adam Hathcock 088a46b8ff Register Core with connectors (#55) 2024-07-22 12:54:22 +01:00
Adam Hathcock 6437cdcd5c D ui3 42 private bool has subscribed at the least volatile should be added but the pattern is not air tight is this is a problem (#48)
* Use shared IdleManager

* Fix usage of _hasSubscribed by using Try methods on concurrent dictionaries

* use top exception handler in idle manager subscription
2024-07-22 10:10:37 +00:00
Adam Hathcock 8d20c7a6c4 update locks for new project revit 2022 (#54) 2024-07-22 10:00:24 +00:00
Adam Hathcock ea8b8dddce D ui3 100 ensure proper disposal of transports from di factory (#49)
* changes to use new factory

* Update nuggets

* update params
2024-07-22 10:38:10 +01:00
Adam Hathcock 369eb05737 update tests and add Revit 2022 project (#50)
* update tests and add Revit 2022 project

* VS fixes
2024-07-22 09:55:58 +01:00
connorivy f6ae5ea1fc add curve to direct shape conversions (#37)
* add curve to direct shape conversions

* rename base converter

* update projitems

* Fix XML comments

---------

Co-authored-by: Connor Ivy <connor@speckle.systems>
Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-19 07:06:58 -05:00
Adam Hathcock ef2bb15b30 XML docs params names where wrong (#51) 2024-07-19 08:21:19 +01:00
connorivy f4a542b913 add point conversion (#28)
* add point conversion

* fix scaling issue

* remove useless comments

---------

Co-authored-by: Connor Ivy <connor@speckle.systems>
2024-07-18 16:40:22 -05:00
Adam Hathcock 6f74f768af connectors also need docs (#45) 2024-07-18 13:30:36 +01:00
Claire Kuang 3a322ee1e4 feat(rhino/autocad): cnx-18 add layer colors to send and receive in autocad and rhino (#47)
* adds layer colors on send

* adds collection color on receive

* adds layer colors on receive

* fixes null transaction

* adds layer colors to rhino send and receive
2024-07-18 11:43:24 +01:00
Adam Hathcock 132aaf6340 readd clean-locks img (#46) 2024-07-18 10:33:46 +01:00
Oğuzhan Koral 59fc2a47d1 Sort group proxies by object count (#43)
* Sort group proxies by object count

* fix name
2024-07-18 09:05:03 +00:00
Adam Hathcock 7fad22b72c Update README.md (#44) 2024-07-18 10:00:00 +01:00
Adam Hathcock 22757465eb Add local solution for across core repo (#42)
* add Local.sln and targets to connectors projects

* redo locks

* do Objects as well

* update readme and remove old things
2024-07-18 09:32:19 +01:00
Adam Hathcock 9a26ce9f81 run restore at the same time as running cleaning locks (#40) 2024-07-18 08:07:12 +01:00
Claire Kuang 7bad788e54 updates collections namespaces (#39) 2024-07-17 16:29:28 +01:00
Oğuzhan Koral 6fba41d80d Support groups for Rhino (#38)
* Support groups

* Doc

* POC comment
2024-07-17 15:40:34 +01:00
Adam Hathcock 841054d6a4 Update readme and sln (#36) 2024-07-16 17:33:27 +00:00
Adam Hathcock 438df1240f Update SDK and add Clean Locks (#35)
* Update SDK dlls

* add clean locks file

* fix build

* Fix clean
2024-07-16 17:12:52 +00:00
Adam Hathcock 3498e5854e Rework logging to be more MS logger (#33)
* Rework logging to be more MS logger

* Add compile references

* Add scanning for send helper
2024-07-16 18:56:17 +02:00
Adam Hathcock ecf8884136 Add compile references (#34) 2024-07-16 18:42:25 +02:00
Adam Hathcock 46c125cbf3 download and create local nuget from SDK repo (#31) 2024-07-16 17:39:18 +02:00
Oğuzhan Koral 1123054216 Better naming for definitions (#30) 2024-07-16 17:06:36 +02:00
Adam Hathcock 22497c8db9 Didn't do a proper restore last time (#32) 2024-07-16 14:43:59 +00:00
Adam Hathcock 3ea6841e53 Update SDK with newer tagging (#29) 2024-07-16 12:43:27 +02:00
Adam Hathcock a2761a4584 Revit 2022 for DUI3 (#13)
* add Revit 2021 and Revit 2022 with some 22 testing

* load DI dll

* format

* more Revit 21 work but it doesn't build, 22 works

* Remove Revit 2021

* sln fixes

* add shared DI project for Revit

* post-merge fixes

* redo some ifdefs

* share conversions better

* Remove class that was added

* fix(dui3): fixes the black rectangle of doom

basically cef65 versions need the removal of camelcasing convention to happen differently

* Carry over what Dim found for 2022

* Fix Revit 2022 issues

* fmt

* Clean up for 2022

* More cleanup

* Remove some ifdefs

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-07-16 10:23:50 +00:00
connorivy 40795997dc D ui3 291 add revit 2025 (#26)
* plugin finally loading

* simplify / clean up

* Revit 2025 merges (#27)

* fix DI project

* get rid of warnings

* never reverting this

* VS2022 fixes

---------

Co-authored-by: Connor Ivy <connor@speckle.systems>
Co-authored-by: Adam Hathcock <adam@speckle.systems>
Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-07-15 16:08:48 +01:00
Adam Hathcock 09172a171c Rhino publishing had inaccurate counting (#24)
* Clean up to have progress accurate

* Fix signature
2024-07-15 15:18:18 +01:00
KatKatKateryna abe5a07e6a DUI3-426 PR moved from https://github.com/specklesystems/speckle-sharp/pull/3545 (#7)
* PR moved from https://github.com/specklesystems/speckle-sharp/pull/3545

* ArcGISDocument to Singleton

* read offsets from metadata

* move crs assignment on send to RootObjBuilder

* move all conversions to activeCRS

* safer read from metadata

* default degrees to meters (like QGIS)

* csharpier

* scoped

* remove UoW from root builders as send/recieve bindings already use it (#21)

* remove POC comment

* remove unnecessary assignments; add offsets to incoming dataset name

* limit dataset name length

* tilt ellipse on receive

* fix substrings

* remove Rhino uow comment

* add SR to the received dataset name

* format

---------

Co-authored-by: Adam Hathcock <adamhathcock@users.noreply.github.com>
2024-07-15 07:55:12 +01:00
Adam Hathcock 99caeb28dc Update locks for revit (#25) 2024-07-12 15:07:50 +01:00
Adam Hathcock faa5208bc4 Revit more shared projects (#22)
* add shared DI

* made revit 2024 shared

* add shared tests for revit

* VS2022 fix up

* Really fix the solution

* add tests, nunit analyzer and update fakes to have Revit 2024 support
2024-07-12 14:53:28 +01:00
Adam Hathcock 3cc20e6275 Fix Revit 2024 locks (#23) 2024-07-12 11:32:48 +00:00
Jedd Morgan 7e5a7e525f DUI3-350 update dui3 connectors to use new api client functions (#20)
* DUI3 all using new FE2 client functions

* undone some warnings (we'll look at those during the meetup)
2024-07-12 11:52:32 +01:00
connorivy 6502efd4b4 adds dui3 to revit 2024 (#15)
* adds dui3 to revit 2024

* remove tests that don't work

* add copy functionality

---------

Co-authored-by: Connor Ivy <connor@speckle.systems>
2024-07-12 08:51:22 +01:00
Adam Hathcock a1e183be29 Add copying/cleaning if RevitVersion defined and is not a CI build (#19) 2024-07-11 16:46:01 +02:00
connorivy c164860994 dui3-175 Direct Shape conversion to native (#8)
* add direct shape conversions

* remove copied comment

* remove correct comment

* change static class

* try fix csharpier

* formatting fix

* remove duplicate interface

* add to projitems

* fix merge conflicts

---------

Co-authored-by: Connor Ivy <connor@speckle.systems>
2024-07-11 08:34:25 -05:00
Jedd Morgan 8e7cfd0919 Bump Core + Objects + fixes (#18)
* Bump Core + Objects + fixes

* Format
2024-07-11 10:53:40 +00:00
Adam Hathcock 527216b678 Some Vs2022 fixes (#17) 2024-07-11 11:29:03 +01:00
Adam Hathcock d35e25d5f7 Setup assembly scaning for Revit2023 and Rhino7 (#16)
* Setup assembly scaning for Revit2023 and Rhino7

* default registration goes first
2024-07-11 09:33:37 +01:00
Adam Hathcock c241028079 Update csharpier and format (#14) 2024-07-10 15:13:55 +01:00
Oğuzhan Koral 7cdf86345b DUI3-126 shared files (#12)
* Account service to get account first from id otherwise from server Url

- And other simplications, removing dup code etc.

* Add TransportException to all bindings

* Register AccountService as singleton and add doc
2024-07-09 22:00:35 +01:00
Oğuzhan Koral 9d0635ce1c DUI3-470 fix max depth of children (#10)
* Temp fix

* Update children max depth

* Remove trailing spaces

* Fix registration issue on box factory

* formatting changes

* Extract common functions and dictionaries to abstract class

* Inject instance object manager

* POC comment

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-09 13:16:50 +01:00
Adam Hathcock 22f7ab8608 change codecov config (#11)
* change codecov config

* see if this produces coverage
2024-07-09 09:50:47 +01:00
Oğuzhan Koral 8b4aed0d98 Fix registration issue on box factory (#9)
* Fix registration issue on box factory

* formatting changes

---------

Co-authored-by: Adam Hathcock <adam@speckle.systems>
2024-07-08 15:08:18 +00:00
Adam Hathcock cfb77eec46 enable build triggers (#6)
* enable build triggers

* remove accidental codecov usage

* this is not a branch name
2024-07-05 16:45:44 +02:00
Adam Hathcock 6e6e2fcffe AGIS: put methods under the native struct (#5)
* add tests with base test class

* update locks

* pin coverage to 4.4.0

* this is a subjob with uses, pass the secrets

* fix secret passing

* try quotes

* try a different glob

* Try simplier glob

* try something else

* try ubuntu for uploads

* update build.sh

* fix target

* update test only target

* Try ExcludeFromCodeCoverage

* better usage of codecov

* What Kat did in https://github.com/specklesystems/speckle-sharp/pull/3546

* Some clean up
2024-07-05 14:38:35 +00:00
Adam Hathcock 49a0af8165 Add Rhino tests and refactor current ones (#4)
* add tests with base test class

* update locks

* pin coverage to 4.4.0

* this is a subjob with uses, pass the secrets

* fix secret passing

* try quotes

* try a different glob

* Try simplier glob

* try something else

* try ubuntu for uploads

* update build.sh

* fix target

* update test only target
2024-07-05 15:31:36 +01:00
Adam Hathcock 91a69a897a Add Revit 2023 and Rhino 7 Converter Tests with Fakes (#3)
* Moved code

* update fakes

* add code coverage

* try code coverage again

* fix test finding

* still file problem?

* try token a different way
2024-07-04 16:00:58 +01:00
Adam Hathcock 3cbed42bdb PR builds (#2) 2024-07-04 13:38:29 +00:00
Adam Hathcock ce815aac76 remove restore keys (#1)
* remove restore keys

* add gitversion tool

* old csharpier for now

* fix build?
2024-07-04 14:11:51 +01:00
1013 changed files with 56155 additions and 19125 deletions
+9 -1
View File
@@ -6,7 +6,15 @@
"version": "0.28.2",
"commands": [
"dotnet-csharpier"
]
],
"rollForward": false
},
"gitversion.tool": {
"version": "6.0.2",
"commands": [
"dotnet-gitversion"
],
"rollForward": false
}
}
}
+10 -2
View File
@@ -212,6 +212,7 @@ dotnet_diagnostic.ide0058.severity = none # Remove unnecessary expression value:
dotnet_diagnostic.ide0010.severity = none # Add missing cases to switch statement: Too verbose
dotnet_diagnostic.ide0200.severity = none # Remove unnecessary lambda expression: may be performance reasons not to
dotnet_diagnostic.ide0058.severity = none # Remove unnecessary expression value: Subjective
dotnet_diagnostic.ide0305.severity = none # Use collection expression for fluent: Can obfuscate intent
dotnet_diagnostic.ide0001.severity = suggestion # Name can be simplified: Non enforceable in build
dotnet_diagnostic.ide0046.severity = suggestion # Use conditional expression for return: Subjective
dotnet_diagnostic.ide0045.severity = suggestion # Use conditional expression for assignment: Subjective
@@ -233,6 +234,15 @@ dotnet_diagnostic.ide0042.severity = suggestion # Deconstruct variable declarati
dotnet_diagnostic.ide0028.severity = suggestion # Use collection initializers: Subjective
dotnet_diagnostic.ide0072.severity = suggestion # Populate switch statement: Subjective
dotnet_diagnostic.ide0074.severity = suggestion # Use compound assignment: Subjective
dotnet_diagnostic.ide0300.severity = suggestion # Use collection expression for array: Subjective, maybe aspirational
dotnet_diagnostic.ide0290.severity = suggestion # primary constructors: subjective, and readonly properties are not a thing
dotnet_diagnostic.ide0290.severity = suggestion # Use primary constructor: Subjective
dotnet_diagnostic.ide0037.severity = suggestion # Use inferred member names: Sometimes its nice to be explicit
dotnet_diagnostic.ide0301.severity = suggestion # Use collection expression for empty: Subjective, intent
dotnet_diagnostic.ide0021.severity = suggestion # Use expression body for constructors : Subjective
dotnet_diagnostic.ide0090.severity = suggestion # Simplify new expression : Subjective
dotnet_diagnostic.ide0047.severity = suggestion # Parentheses preferences: IDEs don't properly pick it up
# Maintainability rules
dotnet_diagnostic.ca1501.severity = warning # Avoid excessive inheritance
@@ -245,8 +255,6 @@ dotnet_diagnostic.ca1509.severity = warning # Invalid entry in code metrics conf
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)
dotnet_diagnostic.cs8618.severity = suggestion # nullable problem
dotnet_diagnostic.CS0809.severity = suggestion # obsolete errors
dotnet_diagnostic.CS0618.severity = suggestion # obsolete errors
# Performance rules
+26 -22
View File
@@ -1,16 +1,11 @@
name: .NET Build
on:
pull_request: # Run build on every pull request that is not to main/dev
pull_request: # Run build on every pull request that is not to main
branches-ignore:
- main
- dev
workflow_call:
outputs:
version:
value: ${{ jobs.build.outputs.version }}
jobs:
jobs:
build:
runs-on: windows-latest
outputs:
@@ -24,29 +19,38 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.2xx # Align with global.json (including roll forward rules)
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: ⚒️ Run GitVersion
run: ./build.ps1 build-server-version
- name: ⚒️ Run build
run: ./build.ps1
run: ./build.ps1 test
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
name: output-${{ env.GitVersion_FullSemVer }}
path: output/*.*
compression-level: 0 # no compression
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- id: set-version
name: Set version to output
run: echo "version=${{ env.GitVersion_FullSemVer }}" >> "$GITHUB_OUTPUT"
- name: ⚒️ Run build
run: ./build.sh test-only
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
with:
file: Converters/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
+89 -22
View File
@@ -2,29 +2,96 @@ name: .NET Build and Publish
on:
push:
branches: ["main", "dev"] # Continuous delivery on every long-lived branch
tags: ["3.*"] # Manual delivery on every 3.x tag
pull_request:
branches: ["main", "dev"] # Releases on every PR that targets main or dev
branches: ["main", "dev", "release/*"] # Continuous delivery on every long-lived branch
tags: ["v3.*"] # Manual delivery on every 3.x tag
jobs:
build:
uses: ./.github/workflows/ci.yml
runs-on: windows-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# deploy-installers:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: 🔫 Trigger Build Installers
# uses: ALEEF02/workflow-dispatch@v3.0.0
# with:
# workflow: Build Installers
# repo: specklesystems/connector-installers
# token: ${{ secrets.CONNECTORS_GH_TOKEN }}
# inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build.outputs.version }}" }'
# ref: main
# wait-for-completion: true
# wait-for-completion-interval: 10s
# wait-for-completion-timeout: 10m
# display-workflow-run-url: true
# display-workflow-run-url-interval: 10s
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- name: ⚒️ Run GitVersion
run: ./build.ps1 build-server-version
- name: ⚒️ Run build
run: ./build.ps1
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ env.GitVersion_FullSemVer }}
path: output/*.*
compression-level: 0 # no compression
- id: set-version
name: Set version to output
run: echo "version=${{ env.GitVersion_FullSemVer }}" >> "$Env:GITHUB_OUTPUT"
deploy-installers:
runs-on: ubuntu-latest
needs: build
env:
IS_TAG_BUILD: ${{ github.ref_type == 'tag' }}
IS_RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release/') || github.ref_name == 'main'}}
steps:
- name: 🔫 Trigger Build Installers
uses: ALEEF02/workflow-dispatch@v3.0.0
continue-on-error: true
with:
workflow: Build Installers
repo: specklesystems/connector-installers
token: ${{ secrets.CONNECTORS_GH_TOKEN }}
inputs: '{ "run_id": "${{ github.run_id }}", "version": "${{ needs.build.outputs.version }}", "public_release": ${{ env.IS_TAG_BUILD }}, "store_artifacts": ${{ env.IS_RELEASE_BRANCH }} }'
ref: main
wait-for-completion: true
wait-for-completion-interval: 10s
wait-for-completion-timeout: 10m
display-workflow-run-url: true
display-workflow-run-url-interval: 10s
- uses: geekyeggo/delete-artifact@v5
with:
name: output-*
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.4xx # Align with global.json (including roll forward rules)
- name: Cache Nuget
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
- name: ⚒️ Run build
run: ./build.sh test-only
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
with:
file: Converters/**/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
+2
View File
@@ -19,3 +19,5 @@ tools
.DS_Store
*.snupkg
coverage.xml
output/
Images/Thumbs.db
+424
View File
@@ -0,0 +1,424 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.35027.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Config", "Config", "{85A13E25-EB29-4F31-8853-B9EE83275B3D}"
ProjectSection(SolutionItems) = preProject
.csharpierrc.yaml = .csharpierrc.yaml
.editorconfig = .editorconfig
codecov.yml = codecov.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
README.md = README.md
CodeMetricsConfig.txt = CodeMetricsConfig.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DUI3", "DUI3", "{FD4D6594-D81E-456F-8F2E-35B09E04A755}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Revit", "Revit", "{D92751C8-1039-4005-90B2-913E55E0B8BD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sdk", "Sdk", "{2E00592E-558D-492D-88F9-3ECEE4C0C7DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Revit2023", "Connectors\Revit\Speckle.Connectors.Revit2023\Speckle.Connectors.Revit2023.csproj", "{01F98733-7352-47AD-A594-537D979DE3DE}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Connectors.RevitShared", "Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.shproj", "{DC570FFF-6FE5-47BD-8BC1-B471A6067786}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.RevitShared", "Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.shproj", "{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2023.DependencyInjection", "Converters\Revit\Speckle.Converters.Revit2023.DependencyInjection\Speckle.Converters.Revit2023.DependencyInjection.csproj", "{83EAD6F0-3CB3-456A-AD81-072127D0DE0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2023", "Converters\Revit\Speckle.Converters.Revit2023\Speckle.Converters.Revit2023.csproj", "{26391930-F86F-47E0-A5F6-B89919E38CE1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.DUI", "DUI3\Speckle.Connectors.DUI\Speckle.Connectors.DUI.csproj", "{D81C0B87-F0C1-4297-A147-02F001FB7E1E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Autofac", "Sdk\Speckle.Autofac\Speckle.Autofac.csproj", "{C9D4CA21-182B-4ED2-81BB-280A6FD713F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Utils", "Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj", "{7291B93C-615D-42DE-B8C1-3F9DF643E0FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Common", "Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj", "{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Rhino", "Rhino", "{9584AEE5-CD59-46E6-93E6-2DC2B5285B75}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Rhino7", "Connectors\Rhino\Speckle.Connectors.Rhino7\Speckle.Connectors.Rhino7.csproj", "{1E2644A9-6B31-4350-8772-CEAAD6EE0B21}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Rhino7", "Converters\Rhino\Speckle.Converters.Rhino7\Speckle.Converters.Rhino7.csproj", "{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Rhino7.DependencyInjection", "Converters\Rhino\Speckle.Converters.Rhino7.DependencyInjection\Speckle.Converters.Rhino7.DependencyInjection.csproj", "{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.ArcGIS3", "Connectors\ArcGIS\Speckle.Connectors.ArcGIS3\Speckle.Connectors.ArcGIS3.csproj", "{A97F7177-86C7-4B38-A6ED-DA51BF762471}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.ArcGIS3", "Converters\ArcGIS\Speckle.Converters.ArcGIS3\Speckle.Converters.ArcGIS3.csproj", "{139F7A79-69E4-4B8A-B2A5-6A30A66C495C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.ArcGIS3.DependencyInjection", "Converters\ArcGIS\Speckle.Converters.ArcGIS3.DependencyInjection\Speckle.Converters.ArcGIS3.DependencyInjection.csproj", "{7DFF1591-237D-499E-A767-EE37B93FB958}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ArcGIS", "ArcGIS", "{CCF48B65-33D1-4E8B-A57B-E03394730B21}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Autocad2023", "Connectors\Autocad\Speckle.Connectors.Autocad2023\Speckle.Connectors.Autocad2023.csproj", "{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Connectors.AutocadShared", "Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.shproj", "{41BC679F-887F-44CF-971D-A5502EE87DB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Common.DependencyInjection", "Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj", "{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Autocad", "Autocad", "{804E065F-914C-414A-AF84-009312C3CFF6}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.AutocadShared", "Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.shproj", "{9ADD1B7A-6401-4202-8613-F668E2FBC0A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2023", "Converters\Autocad\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj", "{631C295A-7CCF-4B42-8686-7034E31469E7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2023.DependencyInjection", "Converters\Autocad\Speckle.Converters.Autocad2023.DependencyInjection\Speckle.Converters.Autocad2023.DependencyInjection.csproj", "{D940853C-003A-482C-BDB0-665367F274A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.DUI.WebView", "DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj", "{7420652C-3046-4F38-BE64-9B9E69D76FA2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "Build\Build.csproj", "{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HostApps", "HostApps", "{42826721-9A18-4762-8BA9-F1429DD5C5B1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Build", "Build", "{59E8E8F3-4E42-4E92-83B3-B1C2AB901D18}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\main.yml = .github\workflows\main.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Civil3d2024", "Connectors\Autocad\Speckle.Connectors.Civil3d2024\Speckle.Connectors.Civil3d2024.csproj", "{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.Civil3dShared", "Converters\Civil3d\Speckle.Converters.Civil3dShared\Speckle.Converters.Civil3dShared.shproj", "{35175682-DA83-4C0A-A49D-B191F5885D8E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Civil3d2024.DependencyInjection", "Converters\Civil3d\Speckle.Converters.Civil3d2024.DependencyInjection\Speckle.Converters.Civil3d2024.DependencyInjection.csproj", "{80F965C4-E2A8-4F54-985D-73D06E45F9CE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2024", "Converters\Autocad\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj", "{C2DE264A-AA87-4012-B954-17E3F403A237}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Autocad2024.DependencyInjection", "Converters\Autocad\Speckle.Converters.Autocad2024.DependencyInjection\Speckle.Converters.Autocad2024.DependencyInjection.csproj", "{AF507D61-6766-4C20-9F58-23DC29508219}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Civil3d2024", "Converters\Civil3d\Speckle.Converters.Civil3d2024\Speckle.Converters.Civil3d2024.csproj", "{25172C49-7AA4-4739-BB07-69785094C379}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.RhinoShared", "Converters\Rhino\Speckle.Converters.RhinoShared\Speckle.Converters.RhinoShared.shproj", "{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Rhino7.Tests", "Converters\Rhino\Speckle.Converters.Rhino7.Tests\Speckle.Converters.Rhino7.Tests.csproj", "{AC2DB416-F05C-4296-9040-56D6AD4FCD27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2023.Tests", "Converters\Revit\Speckle.Converters.Revit2023.Tests\Speckle.Converters.Revit2023.Tests.csproj", "{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Testing", "Sdk\Speckle.Testing\Speckle.Testing.csproj", "{A3869243-B462-4986-914B-94E407D8D20F}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.RevitShared.DependencyInjection", "Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.shproj", "{6067BA60-D279-4156-8AE1-6B44E2D19187}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Revit2024", "Connectors\Revit\Speckle.Connectors.Revit2024\Speckle.Connectors.Revit2024.csproj", "{617BD3C7-87D9-4D28-8AC9-4910945BB9FC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2024", "Converters\Revit\Speckle.Converters.Revit2024\Speckle.Converters.Revit2024.csproj", "{67B888D9-C6C4-49F1-883C-5B964151D889}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2024.DependencyInjection", "Converters\Revit\Speckle.Converters.Revit2024.DependencyInjection\Speckle.Converters.Revit2024.DependencyInjection.csproj", "{7F3055BA-70AA-424C-8748-345AF35127E9}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2023", "2023", "{E9DEBA00-50A4-485D-BA65-D8AB3E3467AB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2024", "2024", "{57F59C0C-5687-4AF9-AE1C-1933B539F0E4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{FC224610-32D3-454E-9BC1-1219FE8ACD5F}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Converters.RevitShared.Tests", "Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.shproj", "{E1C43415-3202-45F4-8BF9-A4DD7D7F2ED6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2024.Tests", "Converters\Revit\Speckle.Converters.Revit2024.Tests\Speckle.Converters.Revit2024.Tests.csproj", "{C32274D9-1B66-4D5C-82F9-EB3F10F46752}"
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Speckle.Connectors.RevitShared.Cef", "Connectors\Revit\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.shproj", "{6A40CBE4-ECAB-4CED-9917-5C64CBF75DA6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2025", "2025", "{8AC2AD6D-6C74-4B24-8DF6-42717FC9B804}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Revit2025", "Connectors\Revit\Speckle.Connectors.Revit2025\Speckle.Connectors.Revit2025.csproj", "{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2025", "Converters\Revit\Speckle.Converters.Revit2025\Speckle.Converters.Revit2025.csproj", "{4D40A101-07E6-4FF2-8934-83434932591D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2025.DependencyInjection", "Converters\Revit\Speckle.Converters.Revit2025.DependencyInjection\Speckle.Converters.Revit2025.DependencyInjection.csproj", "{20751904-0DFC-4126-BF2A-834B53841010}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Connectors.Revit2022", "Connectors\Revit\Speckle.Connectors.Revit2022\Speckle.Connectors.Revit2022.csproj", "{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2022", "Converters\Revit\Speckle.Converters.Revit2022\Speckle.Converters.Revit2022.csproj", "{19424B55-058C-4E9C-B86F-700AEF9EAEC3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2022.DependencyInjection", "Converters\Revit\Speckle.Converters.Revit2022.DependencyInjection\Speckle.Converters.Revit2022.DependencyInjection.csproj", "{881D71A3-D276-4108-98C6-0FFD32129B9C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2022", "2022", "{0AF38BA3-65A0-481B-8CBB-B82E406E1575}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Speckle.Connectors.DUI.Tests", "DUI3\Speckle.Connectors.DUI.Tests\Speckle.Connectors.DUI.Tests.csproj", "{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Speckle.Converters.Revit2022.Tests", "Converters\Revit\Speckle.Converters.Revit2022.Tests\Speckle.Converters.Revit2022.Tests.csproj", "{D8069A23-AD2E-4C9E-8574-7E8C45296A46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2023", "2023", "{2D5AE63D-85C0-43D1-84BF-04418ED93F63}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "2024", "2024", "{2F45036E-D817-41E9-B82F-DBE013EC95D0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Civil3d", "Civil3d", "{91D70DE1-DC8E-4AE1-B100-0671D6263FC5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{4721AA15-AF6E-4A62-A2C3-65564DC563E6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{01F98733-7352-47AD-A594-537D979DE3DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{01F98733-7352-47AD-A594-537D979DE3DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{01F98733-7352-47AD-A594-537D979DE3DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{01F98733-7352-47AD-A594-537D979DE3DE}.Release|Any CPU.Build.0 = Release|Any CPU
{83EAD6F0-3CB3-456A-AD81-072127D0DE0E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83EAD6F0-3CB3-456A-AD81-072127D0DE0E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83EAD6F0-3CB3-456A-AD81-072127D0DE0E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83EAD6F0-3CB3-456A-AD81-072127D0DE0E}.Release|Any CPU.Build.0 = Release|Any CPU
{26391930-F86F-47E0-A5F6-B89919E38CE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26391930-F86F-47E0-A5F6-B89919E38CE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26391930-F86F-47E0-A5F6-B89919E38CE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26391930-F86F-47E0-A5F6-B89919E38CE1}.Release|Any CPU.Build.0 = Release|Any CPU
{D81C0B87-F0C1-4297-A147-02F001FB7E1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D81C0B87-F0C1-4297-A147-02F001FB7E1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D81C0B87-F0C1-4297-A147-02F001FB7E1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D81C0B87-F0C1-4297-A147-02F001FB7E1E}.Release|Any CPU.Build.0 = Release|Any CPU
{C9D4CA21-182B-4ED2-81BB-280A6FD713F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C9D4CA21-182B-4ED2-81BB-280A6FD713F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9D4CA21-182B-4ED2-81BB-280A6FD713F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9D4CA21-182B-4ED2-81BB-280A6FD713F6}.Release|Any CPU.Build.0 = Release|Any CPU
{7291B93C-615D-42DE-B8C1-3F9DF643E0FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7291B93C-615D-42DE-B8C1-3F9DF643E0FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7291B93C-615D-42DE-B8C1-3F9DF643E0FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7291B93C-615D-42DE-B8C1-3F9DF643E0FC}.Release|Any CPU.Build.0 = Release|Any CPU
{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434}.Release|Any CPU.Build.0 = Release|Any CPU
{1E2644A9-6B31-4350-8772-CEAAD6EE0B21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E2644A9-6B31-4350-8772-CEAAD6EE0B21}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E2644A9-6B31-4350-8772-CEAAD6EE0B21}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E2644A9-6B31-4350-8772-CEAAD6EE0B21}.Release|Any CPU.Build.0 = Release|Any CPU
{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5}.Release|Any CPU.Build.0 = Release|Any CPU
{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D}.Release|Any CPU.Build.0 = Release|Any CPU
{A97F7177-86C7-4B38-A6ED-DA51BF762471}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A97F7177-86C7-4B38-A6ED-DA51BF762471}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A97F7177-86C7-4B38-A6ED-DA51BF762471}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A97F7177-86C7-4B38-A6ED-DA51BF762471}.Release|Any CPU.Build.0 = Release|Any CPU
{139F7A79-69E4-4B8A-B2A5-6A30A66C495C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{139F7A79-69E4-4B8A-B2A5-6A30A66C495C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{139F7A79-69E4-4B8A-B2A5-6A30A66C495C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{139F7A79-69E4-4B8A-B2A5-6A30A66C495C}.Release|Any CPU.Build.0 = Release|Any CPU
{7DFF1591-237D-499E-A767-EE37B93FB958}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7DFF1591-237D-499E-A767-EE37B93FB958}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7DFF1591-237D-499E-A767-EE37B93FB958}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7DFF1591-237D-499E-A767-EE37B93FB958}.Release|Any CPU.Build.0 = Release|Any CPU
{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395}.Debug|Any CPU.Build.0 = Debug|Any CPU
{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395}.Release|Any CPU.Build.0 = Release|Any CPU
{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B}.Release|Any CPU.Build.0 = Release|Any CPU
{631C295A-7CCF-4B42-8686-7034E31469E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{631C295A-7CCF-4B42-8686-7034E31469E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{631C295A-7CCF-4B42-8686-7034E31469E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{631C295A-7CCF-4B42-8686-7034E31469E7}.Release|Any CPU.Build.0 = Release|Any CPU
{D940853C-003A-482C-BDB0-665367F274A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D940853C-003A-482C-BDB0-665367F274A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D940853C-003A-482C-BDB0-665367F274A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D940853C-003A-482C-BDB0-665367F274A0}.Release|Any CPU.Build.0 = Release|Any CPU
{7420652C-3046-4F38-BE64-9B9E69D76FA2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7420652C-3046-4F38-BE64-9B9E69D76FA2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7420652C-3046-4F38-BE64-9B9E69D76FA2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7420652C-3046-4F38-BE64-9B9E69D76FA2}.Release|Any CPU.Build.0 = Release|Any CPU
{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89}.Release|Any CPU.Build.0 = Release|Any CPU
{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1}.Release|Any CPU.Build.0 = Release|Any CPU
{80F965C4-E2A8-4F54-985D-73D06E45F9CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{80F965C4-E2A8-4F54-985D-73D06E45F9CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{80F965C4-E2A8-4F54-985D-73D06E45F9CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{80F965C4-E2A8-4F54-985D-73D06E45F9CE}.Release|Any CPU.Build.0 = Release|Any CPU
{C2DE264A-AA87-4012-B954-17E3F403A237}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2DE264A-AA87-4012-B954-17E3F403A237}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2DE264A-AA87-4012-B954-17E3F403A237}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2DE264A-AA87-4012-B954-17E3F403A237}.Release|Any CPU.Build.0 = Release|Any CPU
{AF507D61-6766-4C20-9F58-23DC29508219}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AF507D61-6766-4C20-9F58-23DC29508219}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AF507D61-6766-4C20-9F58-23DC29508219}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AF507D61-6766-4C20-9F58-23DC29508219}.Release|Any CPU.Build.0 = Release|Any CPU
{25172C49-7AA4-4739-BB07-69785094C379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{25172C49-7AA4-4739-BB07-69785094C379}.Debug|Any CPU.Build.0 = Debug|Any CPU
{25172C49-7AA4-4739-BB07-69785094C379}.Release|Any CPU.ActiveCfg = Release|Any CPU
{25172C49-7AA4-4739-BB07-69785094C379}.Release|Any CPU.Build.0 = Release|Any CPU
{AC2DB416-F05C-4296-9040-56D6AD4FCD27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC2DB416-F05C-4296-9040-56D6AD4FCD27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC2DB416-F05C-4296-9040-56D6AD4FCD27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC2DB416-F05C-4296-9040-56D6AD4FCD27}.Release|Any CPU.Build.0 = Release|Any CPU
{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051}.Debug|Any CPU.Build.0 = Debug|Any CPU
{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051}.Release|Any CPU.ActiveCfg = Release|Any CPU
{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051}.Release|Any CPU.Build.0 = Release|Any CPU
{A3869243-B462-4986-914B-94E407D8D20F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3869243-B462-4986-914B-94E407D8D20F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3869243-B462-4986-914B-94E407D8D20F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3869243-B462-4986-914B-94E407D8D20F}.Release|Any CPU.Build.0 = Release|Any CPU
{617BD3C7-87D9-4D28-8AC9-4910945BB9FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{617BD3C7-87D9-4D28-8AC9-4910945BB9FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{617BD3C7-87D9-4D28-8AC9-4910945BB9FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{617BD3C7-87D9-4D28-8AC9-4910945BB9FC}.Release|Any CPU.Build.0 = Release|Any CPU
{67B888D9-C6C4-49F1-883C-5B964151D889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67B888D9-C6C4-49F1-883C-5B964151D889}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67B888D9-C6C4-49F1-883C-5B964151D889}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67B888D9-C6C4-49F1-883C-5B964151D889}.Release|Any CPU.Build.0 = Release|Any CPU
{7F3055BA-70AA-424C-8748-345AF35127E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7F3055BA-70AA-424C-8748-345AF35127E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7F3055BA-70AA-424C-8748-345AF35127E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7F3055BA-70AA-424C-8748-345AF35127E9}.Release|Any CPU.Build.0 = Release|Any CPU
{C32274D9-1B66-4D5C-82F9-EB3F10F46752}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C32274D9-1B66-4D5C-82F9-EB3F10F46752}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C32274D9-1B66-4D5C-82F9-EB3F10F46752}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C32274D9-1B66-4D5C-82F9-EB3F10F46752}.Release|Any CPU.Build.0 = Release|Any CPU
{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C}.Release|Any CPU.Build.0 = Release|Any CPU
{4D40A101-07E6-4FF2-8934-83434932591D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D40A101-07E6-4FF2-8934-83434932591D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D40A101-07E6-4FF2-8934-83434932591D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D40A101-07E6-4FF2-8934-83434932591D}.Release|Any CPU.Build.0 = Release|Any CPU
{20751904-0DFC-4126-BF2A-834B53841010}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20751904-0DFC-4126-BF2A-834B53841010}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20751904-0DFC-4126-BF2A-834B53841010}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20751904-0DFC-4126-BF2A-834B53841010}.Release|Any CPU.Build.0 = Release|Any CPU
{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36}.Debug|Any CPU.ActiveCfg = Debug|x64
{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36}.Debug|Any CPU.Build.0 = Debug|x64
{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36}.Release|Any CPU.ActiveCfg = Debug|x64
{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36}.Release|Any CPU.Build.0 = Debug|x64
{19424B55-058C-4E9C-B86F-700AEF9EAEC3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19424B55-058C-4E9C-B86F-700AEF9EAEC3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19424B55-058C-4E9C-B86F-700AEF9EAEC3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19424B55-058C-4E9C-B86F-700AEF9EAEC3}.Release|Any CPU.Build.0 = Release|Any CPU
{881D71A3-D276-4108-98C6-0FFD32129B9C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{881D71A3-D276-4108-98C6-0FFD32129B9C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{881D71A3-D276-4108-98C6-0FFD32129B9C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{881D71A3-D276-4108-98C6-0FFD32129B9C}.Release|Any CPU.Build.0 = Release|Any CPU
{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885}.Release|Any CPU.Build.0 = Release|Any CPU
{D8069A23-AD2E-4C9E-8574-7E8C45296A46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D8069A23-AD2E-4C9E-8574-7E8C45296A46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D8069A23-AD2E-4C9E-8574-7E8C45296A46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D8069A23-AD2E-4C9E-8574-7E8C45296A46}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D92751C8-1039-4005-90B2-913E55E0B8BD} = {42826721-9A18-4762-8BA9-F1429DD5C5B1}
{01F98733-7352-47AD-A594-537D979DE3DE} = {E9DEBA00-50A4-485D-BA65-D8AB3E3467AB}
{DC570FFF-6FE5-47BD-8BC1-B471A6067786} = {FC224610-32D3-454E-9BC1-1219FE8ACD5F}
{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED6} = {FC224610-32D3-454E-9BC1-1219FE8ACD5F}
{83EAD6F0-3CB3-456A-AD81-072127D0DE0E} = {E9DEBA00-50A4-485D-BA65-D8AB3E3467AB}
{26391930-F86F-47E0-A5F6-B89919E38CE1} = {E9DEBA00-50A4-485D-BA65-D8AB3E3467AB}
{D81C0B87-F0C1-4297-A147-02F001FB7E1E} = {FD4D6594-D81E-456F-8F2E-35B09E04A755}
{C9D4CA21-182B-4ED2-81BB-280A6FD713F6} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{7291B93C-615D-42DE-B8C1-3F9DF643E0FC} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{8AEF06C0-CA5C-4460-BC2D-ADE5F35D0434} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{9584AEE5-CD59-46E6-93E6-2DC2B5285B75} = {42826721-9A18-4762-8BA9-F1429DD5C5B1}
{1E2644A9-6B31-4350-8772-CEAAD6EE0B21} = {9584AEE5-CD59-46E6-93E6-2DC2B5285B75}
{65A2F556-F14A-49F3-8A92-7F2E1E7ED3B5} = {9584AEE5-CD59-46E6-93E6-2DC2B5285B75}
{9C1ECA1D-DE98-4FB7-92D0-FC45BB308E5D} = {9584AEE5-CD59-46E6-93E6-2DC2B5285B75}
{A97F7177-86C7-4B38-A6ED-DA51BF762471} = {CCF48B65-33D1-4E8B-A57B-E03394730B21}
{139F7A79-69E4-4B8A-B2A5-6A30A66C495C} = {CCF48B65-33D1-4E8B-A57B-E03394730B21}
{7DFF1591-237D-499E-A767-EE37B93FB958} = {CCF48B65-33D1-4E8B-A57B-E03394730B21}
{CCF48B65-33D1-4E8B-A57B-E03394730B21} = {42826721-9A18-4762-8BA9-F1429DD5C5B1}
{11F7D41B-AFCA-4D29-BC08-285A14BF3A3B} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{804E065F-914C-414A-AF84-009312C3CFF6} = {42826721-9A18-4762-8BA9-F1429DD5C5B1}
{7420652C-3046-4F38-BE64-9B9E69D76FA2} = {FD4D6594-D81E-456F-8F2E-35B09E04A755}
{C50AA3E3-8C31-4131-9DEC-1D8B377D5A89} = {59E8E8F3-4E42-4E92-83B3-B1C2AB901D18}
{E1C43415-3200-45F4-8BF9-A4DD7D7F2ED9} = {9584AEE5-CD59-46E6-93E6-2DC2B5285B75}
{AC2DB416-F05C-4296-9040-56D6AD4FCD27} = {9584AEE5-CD59-46E6-93E6-2DC2B5285B75}
{68CF9BDF-94AC-4D2D-A7BD-D1C064F97051} = {E9DEBA00-50A4-485D-BA65-D8AB3E3467AB}
{A3869243-B462-4986-914B-94E407D8D20F} = {2E00592E-558D-492D-88F9-3ECEE4C0C7DA}
{6067BA60-D279-4156-8AE1-6B44E2D19187} = {FC224610-32D3-454E-9BC1-1219FE8ACD5F}
{617BD3C7-87D9-4D28-8AC9-4910945BB9FC} = {57F59C0C-5687-4AF9-AE1C-1933B539F0E4}
{67B888D9-C6C4-49F1-883C-5B964151D889} = {57F59C0C-5687-4AF9-AE1C-1933B539F0E4}
{7F3055BA-70AA-424C-8748-345AF35127E9} = {57F59C0C-5687-4AF9-AE1C-1933B539F0E4}
{E9DEBA00-50A4-485D-BA65-D8AB3E3467AB} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{57F59C0C-5687-4AF9-AE1C-1933B539F0E4} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{FC224610-32D3-454E-9BC1-1219FE8ACD5F} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{E1C43415-3202-45F4-8BF9-A4DD7D7F2ED6} = {FC224610-32D3-454E-9BC1-1219FE8ACD5F}
{C32274D9-1B66-4D5C-82F9-EB3F10F46752} = {57F59C0C-5687-4AF9-AE1C-1933B539F0E4}
{6A40CBE4-ECAB-4CED-9917-5C64CBF75DA6} = {FC224610-32D3-454E-9BC1-1219FE8ACD5F}
{8AC2AD6D-6C74-4B24-8DF6-42717FC9B804} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{A6DE3DA0-B242-4F49-AEF0-4E26AF92D16C} = {8AC2AD6D-6C74-4B24-8DF6-42717FC9B804}
{4D40A101-07E6-4FF2-8934-83434932591D} = {8AC2AD6D-6C74-4B24-8DF6-42717FC9B804}
{20751904-0DFC-4126-BF2A-834B53841010} = {8AC2AD6D-6C74-4B24-8DF6-42717FC9B804}
{7F1FDCF2-0CE8-4119-B3C1-F2CC6D7E1C36} = {0AF38BA3-65A0-481B-8CBB-B82E406E1575}
{19424B55-058C-4E9C-B86F-700AEF9EAEC3} = {0AF38BA3-65A0-481B-8CBB-B82E406E1575}
{881D71A3-D276-4108-98C6-0FFD32129B9C} = {0AF38BA3-65A0-481B-8CBB-B82E406E1575}
{0AF38BA3-65A0-481B-8CBB-B82E406E1575} = {D92751C8-1039-4005-90B2-913E55E0B8BD}
{EB83A3A3-F9B6-4281-8EBF-F7289FB5D885} = {FD4D6594-D81E-456F-8F2E-35B09E04A755}
{D8069A23-AD2E-4C9E-8574-7E8C45296A46} = {0AF38BA3-65A0-481B-8CBB-B82E406E1575}
{2D5AE63D-85C0-43D1-84BF-04418ED93F63} = {804E065F-914C-414A-AF84-009312C3CFF6}
{89C4CBC7-1606-40DE-B6DA-FBE3AAC98395} = {2D5AE63D-85C0-43D1-84BF-04418ED93F63}
{631C295A-7CCF-4B42-8686-7034E31469E7} = {2D5AE63D-85C0-43D1-84BF-04418ED93F63}
{D940853C-003A-482C-BDB0-665367F274A0} = {2D5AE63D-85C0-43D1-84BF-04418ED93F63}
{2F45036E-D817-41E9-B82F-DBE013EC95D0} = {804E065F-914C-414A-AF84-009312C3CFF6}
{C2DE264A-AA87-4012-B954-17E3F403A237} = {2F45036E-D817-41E9-B82F-DBE013EC95D0}
{AF507D61-6766-4C20-9F58-23DC29508219} = {2F45036E-D817-41E9-B82F-DBE013EC95D0}
{91D70DE1-DC8E-4AE1-B100-0671D6263FC5} = {804E065F-914C-414A-AF84-009312C3CFF6}
{CA8EAE01-AB9F-4EC1-B6F3-73721487E9E1} = {91D70DE1-DC8E-4AE1-B100-0671D6263FC5}
{25172C49-7AA4-4739-BB07-69785094C379} = {91D70DE1-DC8E-4AE1-B100-0671D6263FC5}
{80F965C4-E2A8-4F54-985D-73D06E45F9CE} = {91D70DE1-DC8E-4AE1-B100-0671D6263FC5}
{35175682-DA83-4C0A-A49D-B191F5885D8E} = {91D70DE1-DC8E-4AE1-B100-0671D6263FC5}
{4721AA15-AF6E-4A62-A2C3-65564DC563E6} = {804E065F-914C-414A-AF84-009312C3CFF6}
{41BC679F-887F-44CF-971D-A5502EE87DB0} = {4721AA15-AF6E-4A62-A2C3-65564DC563E6}
{9ADD1B7A-6401-4202-8613-F668E2FBC0A4} = {4721AA15-AF6E-4A62-A2C3-65564DC563E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EE253116-7070-4E9A-BCE8-2911C251B8C8}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Connectors\Revit\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems*{01f98733-7352-47ad-a594-537d979de3de}*SharedItemsImports = 5
Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems*{01f98733-7352-47ad-a594-537d979de3de}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{19424b55-058c-4e9c-b86f-700aef9eaec3}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.projitems*{20751904-0dfc-4126-bf2a-834b53841010}*SharedItemsImports = 5
Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{25172c49-7aa4-4739-bb07-69785094c379}*SharedItemsImports = 5
Converters\Civil3d\Speckle.Converters.Civil3dShared\Speckle.Converters.Civil3dShared.projitems*{25172c49-7aa4-4739-bb07-69785094c379}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{26391930-f86f-47e0-a5f6-b89919e38ce1}*SharedItemsImports = 5
Converters\Civil3d\Speckle.Converters.Civil3dShared\Speckle.Converters.Civil3dShared.projitems*{35175682-da83-4c0a-a49d-b191f5885d8e}*SharedItemsImports = 13
Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems*{41bc679f-887f-44cf-971d-a5502ee87db0}*SharedItemsImports = 13
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{4d40a101-07e6-4ff2-8934-83434932591d}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.projitems*{6067ba60-d279-4156-8ae1-6b44e2d19187}*SharedItemsImports = 13
Connectors\Revit\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems*{617bd3c7-87d9-4d28-8ac9-4910945bb9fc}*SharedItemsImports = 5
Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems*{617bd3c7-87d9-4d28-8ac9-4910945bb9fc}*SharedItemsImports = 5
Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{631c295a-7ccf-4b42-8686-7034e31469e7}*SharedItemsImports = 5
Converters\Rhino\Speckle.Converters.RhinoShared\Speckle.Converters.RhinoShared.projitems*{65a2f556-f14a-49f3-8a92-7f2e1e7ed3b5}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{67b888d9-c6c4-49f1-883c-5b964151d889}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.projitems*{68cf9bdf-94ac-4d2d-a7bd-d1c064f97051}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{68cf9bdf-94ac-4d2d-a7bd-d1c064f97051}*SharedItemsImports = 5
Connectors\Revit\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems*{6a40cbe4-ecab-4ced-9917-5c64cbf75da6}*SharedItemsImports = 13
Connectors\Revit\Speckle.Connectors.RevitShared.Cef\Speckle.Connectors.RevitShared.Cef.projitems*{7f1fdcf2-0ce8-4119-b3c1-f2cc6d7e1c36}*SharedItemsImports = 5
Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems*{7f1fdcf2-0ce8-4119-b3c1-f2cc6d7e1c36}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.projitems*{7f3055ba-70aa-424c-8748-345af35127e9}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.projitems*{83ead6f0-3cb3-456a-ad81-072127d0de0e}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.DependencyInjection\Speckle.Converters.RevitShared.DependencyInjection.projitems*{881d71a3-d276-4108-98c6-0ffd32129b9c}*SharedItemsImports = 5
Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems*{89c4cbc7-1606-40de-b6da-fbe3aac98395}*SharedItemsImports = 5
Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{9add1b7a-6401-4202-8613-f668e2fbc0a4}*SharedItemsImports = 13
Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems*{a6de3da0-b242-4f49-aef0-4e26af92d16c}*SharedItemsImports = 5
Converters\Rhino\Speckle.Converters.RhinoShared\Speckle.Converters.RhinoShared.projitems*{ac2db416-f05c-4296-9040-56d6ad4fcd27}*SharedItemsImports = 5
Converters\Autocad\Speckle.Converters.AutocadShared\Speckle.Converters.AutocadShared.projitems*{c2de264a-aa87-4012-b954-17e3f403a237}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.projitems*{c32274d9-1b66-4d5c-82f9-eb3f10f46752}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{c32274d9-1b66-4d5c-82f9-eb3f10f46752}*SharedItemsImports = 5
Connectors\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems*{ca8eae01-ab9f-4ec1-b6f3-73721487e9e1}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.projitems*{d8069a23-ad2e-4c9e-8574-7e8c45296a46}*SharedItemsImports = 5
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{d8069a23-ad2e-4c9e-8574-7e8c45296a46}*SharedItemsImports = 5
Connectors\Revit\Speckle.Connectors.RevitShared\Speckle.Connectors.RevitShared.projitems*{dc570fff-6fe5-47bd-8bc1-b471a6067786}*SharedItemsImports = 13
Converters\Revit\Speckle.Converters.RevitShared\Speckle.Converters.RevitShared.projitems*{e1c43415-3200-45f4-8bf9-a4dd7d7f2ed6}*SharedItemsImports = 13
Converters\Rhino\Speckle.Converters.RhinoShared\Speckle.Converters.RhinoShared.projitems*{e1c43415-3200-45f4-8bf9-a4dd7d7f2ed9}*SharedItemsImports = 13
Converters\Revit\Speckle.Converters.RevitShared.Tests\Speckle.Converters.RevitShared.Tests.projitems*{e1c43415-3202-45f4-8bf9-a4dd7d7f2ed6}*SharedItemsImports = 13
EndGlobalSection
EndGlobal
+2
View File
@@ -4,10 +4,12 @@
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bullseye" />
<PackageReference Include="Glob" />
<PackageReference Include="Microsoft.Build" />
<PackageReference Include="SimpleExec" />
</ItemGroup>
</Project>
+55 -31
View File
@@ -1,46 +1,70 @@
using System.Collections.Generic;
namespace Build;
namespace Build;
public static class Consts
{
public static readonly string[] Solutions = { "DUI3-DX.slnf" };
public static readonly string[] TestProjects = System.Array.Empty<string>();
public static readonly string[] Solutions = ["Speckle.Connectors.sln"];
public static readonly InstallerProject[] InstallerManifests =
{
new("arcgis", [new("Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows")]),
new(
"arcgis",
new InstallerAsset[] { new("DUI3-DX/Connectors/ArcGIS/Speckle.Connectors.ArcGIS3", "net6.0-windows") }
"rhino",
[
new("Connectors/Rhino/Speckle.Connectors.Rhino7", "net48"),
new("Connectors/Rhino/Speckle.Connectors.Rhino8", "net48")
]
),
new("rhino", new InstallerAsset[] { new("DUI3-DX/Connectors/Rhino/Speckle.Connectors.Rhino7", "net48") }),
new("revit", new InstallerAsset[] { new("DUI3-DX/Connectors/Revit/Speckle.Connectors.Revit2023", "net48") }),
new("autocad", new InstallerAsset[] { new("DUI3-DX/Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48") })
new(
"revit",
[
new("Connectors/Revit/Speckle.Connectors.Revit2022", "net48"),
new("Connectors/Revit/Speckle.Connectors.Revit2023", "net48"),
new("Connectors/Revit/Speckle.Connectors.Revit2024", "net48"),
new("Connectors/Revit/Speckle.Connectors.Revit2025", "net8.0-windows")
]
),
new(
"autocad",
[
new("Connectors/Autocad/Speckle.Connectors.Autocad2022", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2023", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2024", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Autocad2025", "net8.0-windows")
]
),
new(
"civil3d",
[
new("Connectors/Autocad/Speckle.Connectors.Civil3d2022", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2023", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2024", "net48"),
new("Connectors/Autocad/Speckle.Connectors.Civil3d2025", "net8.0-windows")
]
),
new(
"navisworks",
[
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2020", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2021", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2022", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2023", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2024", "net48"),
new("Connectors/Navisworks/Speckle.Connectors.Navisworks2025", "net48")
]
),
new(
"tekla-structures",
[
new("Connectors/Tekla/Speckle.Connector.Tekla2023", "net48"),
new("Connectors/Tekla/Speckle.Connector.Tekla2024", "net48")
]
)
};
}
public readonly struct InstallerProject
public readonly record struct InstallerProject(string HostAppSlug, IReadOnlyList<InstallerAsset> Projects)
{
public string HostAppSlug { get; init; }
public IReadOnlyList<InstallerAsset> Projects { get; init; }
public InstallerProject(string hostAppSlug, IReadOnlyList<InstallerAsset> projects)
{
HostAppSlug = hostAppSlug;
Projects = projects;
}
public override string ToString() => $"{HostAppSlug}";
}
public readonly struct InstallerAsset
{
public InstallerAsset(string projectPath, string targetName)
{
ProjectPath = projectPath;
TargetName = targetName;
}
public string ProjectPath { get; init; }
public string TargetName { get; init; }
}
public readonly record struct InstallerAsset(string ProjectPath, string TargetName);
+1 -4
View File
@@ -1,9 +1,6 @@
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Net.Http.Headers;
using System.Net.Mime;
using System.Text.Json;
using System.Threading.Tasks;
namespace Build;
+66 -15
View File
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using Build;
using GlobExpressions;
@@ -11,11 +8,15 @@ const string CLEAN = "clean";
const string RESTORE = "restore";
const string BUILD = "build";
const string TEST = "test";
const string TEST_ONLY = "test-only";
const string FORMAT = "format";
const string ZIP = "zip";
const string VERSION = "version";
const string RESTORE_TOOLS = "restore-tools";
const string BUILD_SERVER_VERSION = "build-server-version";
const string CLEAN_LOCKS = "clean-locks";
const string CHECK_SOLUTIONS = "check-solutions";
const string DEEP_CLEAN = "deep-clean";
//need to pass arguments
/*var arguments = new List<string>();
@@ -26,6 +27,47 @@ if (args.Length > 1)
//arguments = arguments.Skip(1).ToList();
}*/
Target(
CLEAN_LOCKS,
() =>
{
foreach (var f in Glob.Files(".", "**/*.lock.json"))
{
Console.WriteLine("Found and will delete: " + f);
File.Delete(f);
}
Console.WriteLine("Running restore now.");
Run("dotnet", "restore .\\Speckle.Connectors.sln --no-cache");
}
);
Target(
DEEP_CLEAN,
() =>
{
foreach (var f in Glob.Directories(".", "**/bin"))
{
if (f.StartsWith("Build"))
{
continue;
}
Console.WriteLine("Found and will delete: " + f);
Directory.Delete(f, true);
}
foreach (var f in Glob.Directories(".", "**/obj"))
{
if (f.StartsWith("Build"))
{
continue;
}
Console.WriteLine("Found and will delete: " + f);
Directory.Delete(f, true);
}
Console.WriteLine("Running restore now.");
Run("dotnet", "restore .\\Speckle.Connectors.sln --no-cache");
}
);
Target(
CLEAN,
ForEach("**/output"),
@@ -82,6 +124,7 @@ Target(
Target(
RESTORE,
DependsOn(FORMAT),
Consts.Solutions,
s =>
{
@@ -109,26 +152,34 @@ Target(
Console.WriteLine($"Version: {version} & {fileVersion}");
Run(
"dotnet",
$"build {s} -c Release --no-restore -p:IsDesktopBuild=false -p:Version={version} -p:FileVersion={fileVersion} -v:m"
$"build {s} -c Release --no-restore -warnaserror -p:Version={version} -p:FileVersion={fileVersion} -v:m"
);
}
);
Target(CHECK_SOLUTIONS, Solutions.CompareConnectorsToLocal);
Target(
TEST,
DependsOn(BUILD),
Consts.TestProjects,
t =>
DependsOn(BUILD, CHECK_SOLUTIONS),
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
IEnumerable<string> GetFiles(string d)
{
return Glob.Files(".", d);
}
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=minimal");
}
);
foreach (var file in GetFiles($"**/{t}.csproj"))
{
Run("dotnet", $"test {file} -c Release --no-build --no-restore --verbosity=normal");
}
Target(
TEST_ONLY,
DependsOn(FORMAT),
Glob.Files(".", "**/*.Tests.csproj"),
file =>
{
Run("dotnet", $"restore {file} --locked-mode");
Run(
"dotnet",
$"test {file} -c Release --no-restore --verbosity=minimal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage /p:AltCoverVerbosity=Warning"
);
}
);
+56
View File
@@ -0,0 +1,56 @@
using Microsoft.Build.Construction;
namespace Build;
public static class Solutions
{
private static bool ValidProjects(KeyValuePair<string, ProjectInSolution> projectInSolution) =>
projectInSolution.Value.ProjectType == SolutionProjectType.KnownToBeMSBuildFormat;
public static void CompareConnectorsToLocal()
{
var localSln = SolutionFile.Parse(Path.Combine(Environment.CurrentDirectory, "Local.sln"));
var connectorsSln = SolutionFile.Parse(Path.Combine(Environment.CurrentDirectory, "Speckle.Connectors.sln"));
var localProjects = localSln.ProjectsByGuid.Where(ValidProjects).ToDictionary();
foreach ((string? _, ProjectInSolution? value) in connectorsSln.ProjectsByGuid.Where(ValidProjects))
{
var localProject = localProjects.Values.FirstOrDefault(x => x.ProjectName == value.ProjectName);
if (localProject is null)
{
throw new InvalidOperationException($"Could not find in LOCAL solution: {value.ProjectName}");
}
if (value.ProjectName != localProject.ProjectName)
{
throw new InvalidOperationException(
"Projects with different names have same Guid in solution: "
+ value.ProjectName
+ " and "
+ localProject.ProjectName
);
}
localProjects.Remove(localProjects.Single(x => x.Value.ProjectName == value.ProjectName).Key);
}
void CheckAndRemoveKnown(string projectName)
{
var localProject = localProjects.Values.FirstOrDefault(x => x.ProjectName == projectName);
if (localProject is null)
{
throw new InvalidOperationException($"Could not find in LOCAL solution: {projectName}");
}
localProjects.Remove(localProjects.Single(x => x.Value.ProjectName == projectName).Key);
}
CheckAndRemoveKnown("Speckle.Objects");
CheckAndRemoveKnown("Speckle.Sdk");
CheckAndRemoveKnown("Speckle.Sdk.Dependencies");
if (localProjects.Count != 0)
{
throw new InvalidOperationException(
"Could not find in CONNECTOR solution: " + localProjects.First().Value.ProjectName
);
}
}
}
+82 -3
View File
@@ -14,6 +14,29 @@
"resolved": "1.1.9",
"contentHash": "AfK5+ECWYTP7G3AAdnU8IfVj+QpGjrh9GC2mpdcJzCvtQ4pnerAGwHsxJ9D4/RnhDUz2DSzd951O/lQjQby2Sw=="
},
"Microsoft.Build": {
"type": "Direct",
"requested": "[17.11.4, )",
"resolved": "17.11.4",
"contentHash": "UMC7DfeFEHY2GGHHaghybUuUlLaByFHEFudR2PehMgDBuRuLAUePp1iaa4eFtVzepRzMtIbeSCVJCzzX3NV2Gg==",
"dependencies": {
"Microsoft.Build.Framework": "17.11.4",
"Microsoft.NET.StringTools": "17.11.4",
"System.Collections.Immutable": "8.0.0",
"System.Configuration.ConfigurationManager": "8.0.0",
"System.Reflection.Metadata": "8.0.0",
"System.Reflection.MetadataLoadContext": "8.0.0"
}
},
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net461": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
@@ -38,19 +61,75 @@
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"Microsoft.Build.Framework": {
"type": "Transitive",
"resolved": "17.11.4",
"contentHash": "u28uDihlqxtt8h2dL1ZJOZ7TRkxBK+HGr+3FgQpILVo7Q7gErkw8mYW9R+RM5PtxvZTdYb/4MWDL66vdIsANBQ=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.NET.StringTools": {
"type": "Transitive",
"resolved": "17.11.4",
"contentHash": "mudqUHhNpeqIdJoUx2YDWZO/I9uEDYVowan89R6wsomfnUJQk6HteoQTlNjZDixhT2B4IXMkMtgZtoceIjLRmA=="
},
"Microsoft.NETFramework.ReferenceAssemblies.net461": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "AmOJZwCqnOCNp6PPcf9joyogScWLtwy0M1WkqfEQ0M9nYwyDD7EX9ZjscKS5iYnyvteX7kzSKFCKt9I9dXA6mA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"System.Collections.Immutable": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg=="
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "JlYi9XVvIREURRUlGMr1F6vOFLk7YSY4p1vHo4kX3tQ0AGrjqlRWHDi66ImHhy6qwXBG3BJ6Y1QlYQ+Qz6Xgww==",
"dependencies": {
"System.Diagnostics.EventLog": "8.0.0",
"System.Security.Cryptography.ProtectedData": "8.0.0"
}
},
"System.Diagnostics.EventLog": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "fdYxcRjQqTTacKId/2IECojlDSFvp7LP5N78+0z/xH7v/Tuw5ZAxu23Y6PTCRinqyu2ePx+Gn1098NC6jM6d+A=="
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==",
"dependencies": {
"System.Collections.Immutable": "8.0.0"
}
},
"System.Reflection.MetadataLoadContext": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "SZxrQ4sQYnIcdwiO3G/lHZopbPYQ2lW0ioT4JezgccWUrKaKbHLJbAGZaDfkYjWcta1pWssAo3MOXLsR0ie4tQ==",
"dependencies": {
"System.Collections.Immutable": "8.0.0",
"System.Reflection.Metadata": "8.0.0"
}
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "+TUFINV2q2ifyXauQXRwy4CiBhqvDEDZeVJU7qfxya4aRYOKzVBpN+4acx25VcPB9ywUN6C0n8drWl110PhZEg=="
}
}
}
+4
View File
@@ -0,0 +1,4 @@
CA1502: 25
CA1501: 5
CA1506(Method): 50
CA1506(Type): 95
@@ -1,11 +1,18 @@
using Speckle.Autofac.DependencyInjection;
using ArcGIS.Desktop.Core;
using ArcGIS.Desktop.Mapping;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Cancellation;
using Speckle.Connectors.Utils.Operations;
using Speckle.Converters.ArcGIS3;
using Speckle.Converters.ArcGIS3.Utils;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.ArcGIS.Bindings;
@@ -14,23 +21,32 @@ public sealed class ArcGISReceiveBinding : IReceiveBinding
public string Name { get; } = "receiveBinding";
private readonly CancellationManager _cancellationManager;
private readonly DocumentModelStore _store;
private readonly IUnitOfWorkFactory _unitOfWorkFactory;
private readonly IServiceProvider _serviceProvider;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<ArcGISReceiveBinding> _logger;
private readonly IArcGISConversionSettingsFactory _arcGISConversionSettingsFactory;
public ReceiveBindingUICommands Commands { get; }
public IBridge Parent { get; }
private ReceiveBindingUICommands Commands { get; }
public IBrowserBridge Parent { get; }
public ArcGISReceiveBinding(
DocumentModelStore store,
IBridge parent,
IBrowserBridge parent,
CancellationManager cancellationManager,
IUnitOfWorkFactory unitOfWorkFactory
IServiceProvider serviceProvider,
IOperationProgressManager operationProgressManager,
ILogger<ArcGISReceiveBinding> logger,
IArcGISConversionSettingsFactory arcGisConversionSettingsFactory
)
{
_store = store;
_cancellationManager = cancellationManager;
Parent = parent;
Commands = new ReceiveBindingUICommands(parent);
_unitOfWorkFactory = unitOfWorkFactory;
_serviceProvider = serviceProvider;
_operationProgressManager = operationProgressManager;
_logger = logger;
_arcGISConversionSettingsFactory = arcGisConversionSettingsFactory;
}
public async Task Receive(string modelCardId)
@@ -44,38 +60,48 @@ public sealed class ArcGISReceiveBinding : IReceiveBinding
throw new InvalidOperationException("No download model card was found.");
}
// Init cancellation token source -> Manager also cancel it if exist before
CancellationTokenSource cts = _cancellationManager.InitCancellationTokenSource(modelCardId);
using IUnitOfWork<ReceiveOperation> unitOfWork = _unitOfWorkFactory.Resolve<ReceiveOperation>();
CancellationToken cancellationToken = _cancellationManager.InitCancellationTokenSource(modelCardId);
using var scope = _serviceProvider.CreateScope();
scope
.ServiceProvider.GetRequiredService<IConverterSettingsStore<ArcGISConversionSettings>>()
.Initialize(
_arcGISConversionSettingsFactory.Create(
Project.Current,
MapView.Active.Map,
new CRSoffsetRotation(MapView.Active.Map)
)
);
// Receive host objects
var receiveOperationResults = await unitOfWork.Service
var receiveOperationResults = await scope
.ServiceProvider.GetRequiredService<ReceiveOperation>()
.Execute(
modelCard.AccountId.NotNull(), // POC: I hear -you are saying why we're passing them separately. Not sure pass the DUI3-> Connectors.DUI project dependency to the SDK-> Connector.Utils
modelCard.ProjectId.NotNull(),
modelCard.ProjectName.NotNull(),
modelCard.ModelName.NotNull(),
modelCard.SelectedVersionId.NotNull(),
cts.Token,
(status, progress) =>
Commands.SetModelProgress(modelCardId, new ModelCardProgress(modelCardId, status, progress), cts)
modelCard.GetReceiveInfo("ArcGIS"), // POC: get host app name from settings? same for GetSendInfo
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationToken),
cancellationToken
)
.ConfigureAwait(false);
modelCard.BakedObjectIds = receiveOperationResults.BakedObjectIds.ToList();
Commands.SetModelReceiveResult(
modelCardId,
receiveOperationResults.BakedObjectIds,
receiveOperationResults.ConversionResults
);
await Commands
.SetModelReceiveResult(
modelCardId,
receiveOperationResults.BakedObjectIds,
receiveOperationResults.ConversionResults
)
.ConfigureAwait(false);
}
// Catch here specific exceptions if they related to model card.
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything
// 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 (Exception ex) 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
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex).ConfigureAwait(false);
}
}
public void CancelReceive(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
@@ -1,18 +1,22 @@
using ArcGIS.Desktop.Mapping;
using ArcGIS.Desktop.Mapping.Events;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using ArcGIS.Desktop.Mapping.Events;
using ArcGIS.Desktop.Mapping;
namespace Speckle.Connectors.ArcGIS.Bindings;
public class ArcGISSelectionBinding : ISelectionBinding
{
private readonly MapMembersUtils _mapMemberUtils;
public string Name => "selectionBinding";
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
public ArcGISSelectionBinding(IBridge parent, ITopLevelExceptionHandler topLevelHandler)
public ArcGISSelectionBinding(IBrowserBridge parent, MapMembersUtils mapMemberUtils)
{
_mapMemberUtils = mapMemberUtils;
Parent = parent;
var topLevelHandler = parent.TopLevelExceptionHandler;
// example: https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Map-Authoring/QueryBuilderControl/DefinitionQueryDockPaneViewModel.cs
// MapViewEventArgs args = new(MapView.Active);
@@ -25,6 +29,22 @@ public class ArcGISSelectionBinding : ISelectionBinding
Parent.Send(SelectionBindingEvents.SET_SELECTION, selInfo);
}
private void GetLayersFromGroup(GroupLayer group, List<MapMember> nestedLayers)
{
nestedLayers.Add(group);
foreach (MapMember member in group.Layers)
{
if (member is GroupLayer subGroup)
{
GetLayersFromGroup(subGroup, nestedLayers);
}
else
{
nestedLayers.Add(member);
}
}
}
public SelectionInfo GetSelection()
{
MapView mapView = MapView.Active;
@@ -32,13 +52,17 @@ public class ArcGISSelectionBinding : ISelectionBinding
selectedMembers.AddRange(mapView.GetSelectedLayers());
selectedMembers.AddRange(mapView.GetSelectedStandaloneTables());
List<string> objectTypes = selectedMembers
List<MapMember> allNestedMembers = new();
var layerMapMembers = _mapMemberUtils.UnpackMapLayers(selectedMembers);
allNestedMembers.AddRange(layerMapMembers);
List<string> objectTypes = allNestedMembers
.Select(o => o.GetType().ToString().Split(".").Last())
.Distinct()
.ToList();
return new SelectionInfo(
selectedMembers.Select(x => x.URI).ToList(),
$"{selectedMembers.Count} layers ({string.Join(", ", objectTypes)})"
allNestedMembers.Select(x => x.URI).ToList(),
$"{allNestedMembers.Count} layers ({string.Join(", ", objectTypes)})"
);
}
}
@@ -1,22 +1,31 @@
using System.Collections.Concurrent;
using System.Diagnostics.CodeAnalysis;
using Speckle.Autofac.DependencyInjection;
using ArcGIS.Core.Data;
using ArcGIS.Desktop.Core;
using ArcGIS.Desktop.Editing.Events;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using ArcGIS.Desktop.Mapping.Events;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.ArcGIS.Filters;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.Utils.Cancellation;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.Settings;
using ArcGIS.Desktop.Mapping.Events;
using ArcGIS.Desktop.Mapping;
using Speckle.Connectors.ArcGIS.Filters;
using ArcGIS.Desktop.Editing.Events;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Core.Data;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;
using Speckle.Converters.ArcGIS3;
using Speckle.Converters.ArcGIS3.Utils;
using Speckle.Converters.Common;
using Speckle.Sdk;
using Speckle.Sdk.Common;
namespace Speckle.Connectors.ArcGIS.Bindings;
@@ -24,62 +33,92 @@ public sealed class ArcGISSendBinding : ISendBinding
{
public string Name => "sendBinding";
public SendBindingUICommands Commands { get; }
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly IUnitOfWorkFactory _unitOfWorkFactory; // POC: unused? :D
private readonly IServiceProvider _serviceProvider;
private readonly List<ISendFilter> _sendFilters;
private readonly CancellationManager _cancellationManager;
private readonly ISendConversionCache _sendConversionCache;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<ArcGISSendBinding> _logger;
private readonly ITopLevelExceptionHandler _topLevelExceptionHandler;
private readonly IArcGISConversionSettingsFactory _arcGISConversionSettingsFactory;
/// <summary>
/// Used internally to aggregate the changed objects' id.
/// 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.
/// https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework
/// </summary>
private HashSet<string> ChangedObjectIds { get; set; } = new();
private ConcurrentDictionary<string, byte> ChangedObjectIds { get; set; } = new();
private List<FeatureLayer> SubscribedLayers { get; set; } = new();
private List<StandaloneTable> SubscribedTables { get; set; } = new();
private readonly MapMembersUtils _mapMemberUtils;
public ArcGISSendBinding(
DocumentModelStore store,
IBridge parent,
IBrowserBridge parent,
IEnumerable<ISendFilter> sendFilters,
IUnitOfWorkFactory unitOfWorkFactory,
IServiceProvider serviceProvider,
CancellationManager cancellationManager,
ISendConversionCache sendConversionCache,
ITopLevelExceptionHandler topLevelExceptionHandler
IOperationProgressManager operationProgressManager,
ILogger<ArcGISSendBinding> logger,
IArcGISConversionSettingsFactory arcGisConversionSettingsFactory,
MapMembersUtils mapMemberUtils
)
{
_store = store;
_unitOfWorkFactory = unitOfWorkFactory;
_serviceProvider = serviceProvider;
_sendFilters = sendFilters.ToList();
_cancellationManager = cancellationManager;
_sendConversionCache = sendConversionCache;
_topLevelExceptionHandler = topLevelExceptionHandler;
_operationProgressManager = operationProgressManager;
_logger = logger;
_topLevelExceptionHandler = parent.TopLevelExceptionHandler;
_arcGISConversionSettingsFactory = arcGisConversionSettingsFactory;
_mapMemberUtils = mapMemberUtils;
Parent = parent;
Commands = new SendBindingUICommands(parent);
SubscribeToArcGISEvents();
_store.DocumentChanged += (_, _) =>
{
_sendConversionCache.ClearCache();
};
}
private void SubscribeToArcGISEvents()
{
LayersRemovedEvent.Subscribe(
a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForLayersRemovedEvent(a)),
a =>
_topLevelExceptionHandler.FireAndForget(async () => await GetIdsForLayersRemovedEvent(a).ConfigureAwait(false)),
true
);
StandaloneTablesRemovedEvent.Subscribe(
a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForStandaloneTablesRemovedEvent(a)),
a =>
_topLevelExceptionHandler.FireAndForget(
async () => await GetIdsForStandaloneTablesRemovedEvent(a).ConfigureAwait(false)
),
true
);
MapPropertyChangedEvent.Subscribe(
a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForMapPropertyChangedEvent(a)),
a =>
_topLevelExceptionHandler.FireAndForget(
async () => await GetIdsForMapPropertyChangedEvent(a).ConfigureAwait(false)
),
true
); // Map units, CRS etc.
MapMemberPropertiesChangedEvent.Subscribe(
a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForMapMemberPropertiesChangedEvent(a)),
a =>
_topLevelExceptionHandler.FireAndForget(
async () => await GetIdsForMapMemberPropertiesChangedEvent(a).ConfigureAwait(false)
),
true
); // e.g. Layer name
@@ -88,12 +127,14 @@ public sealed class ArcGISSendBinding : ISendBinding
true
);
/*
LayersAddedEvent.Subscribe(a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForLayersAddedEvent(a)), true);
StandaloneTablesAddedEvent.Subscribe(
a => _topLevelExceptionHandler.CatchUnhandled(() => GetIdsForStandaloneTablesAddedEvent(a)),
true
);
*/
}
private void SubscribeToMapMembersDataSourceChange()
@@ -154,28 +195,31 @@ public sealed class ArcGISSendBinding : ISendBinding
{
RowCreatedEvent.Subscribe(
(args) =>
{
OnRowChanged(args);
},
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args).ConfigureAwait(false);
}),
layerTable
);
RowChangedEvent.Subscribe(
(args) =>
{
OnRowChanged(args);
},
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args).ConfigureAwait(false);
}),
layerTable
);
RowDeletedEvent.Subscribe(
(args) =>
{
OnRowChanged(args);
},
Parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await OnRowChanged(args).ConfigureAwait(false);
}),
layerTable
);
}
private void OnRowChanged(RowChangedEventArgs args)
private async Task OnRowChanged(RowChangedEventArgs args)
{
if (args == null || MapView.Active == null)
{
@@ -183,54 +227,69 @@ public sealed class ArcGISSendBinding : ISendBinding
}
// get the path of the edited dataset
var datasetURI = args.Row.GetTable().GetPath();
Uri datasetPath = args.Row.GetTable().GetPath();
// find all layers & tables reading from the dataset
foreach (Layer layer in MapView.Active.Map.Layers)
{
if (layer.GetPath() == datasetURI)
try
{
ChangedObjectIds.Add(layer.URI);
if (layer.GetPath() == datasetPath)
{
ChangedObjectIds[layer.URI] = 1;
}
}
catch (UriFormatException) // layer.GetPath() or table.GetPath() can throw this error, if data source was removed from the hard drive
{
// ignore layers with invalid source URI
}
}
foreach (StandaloneTable table in MapView.Active.Map.StandaloneTables)
{
if (table.GetPath() == datasetURI)
try
{
ChangedObjectIds.Add(table.URI);
if (table.GetPath() == datasetPath)
{
ChangedObjectIds[table.URI] = 1;
}
}
catch (UriFormatException) // layer.GetPath() or table.GetPath() can throw this error, if data source was removed from the hard drive
{
// ignore layers with invalid source URI
}
}
RunExpirationChecks(false);
await RunExpirationChecks(false).ConfigureAwait(false);
}
private void GetIdsForLayersRemovedEvent(LayerEventsArgs args)
private async Task GetIdsForLayersRemovedEvent(LayerEventsArgs args)
{
foreach (Layer layer in args.Layers)
{
ChangedObjectIds.Add(layer.URI);
ChangedObjectIds[layer.URI] = 1;
}
RunExpirationChecks(true);
await RunExpirationChecks(true).ConfigureAwait(false);
}
private void GetIdsForStandaloneTablesRemovedEvent(StandaloneTableEventArgs args)
private async Task GetIdsForStandaloneTablesRemovedEvent(StandaloneTableEventArgs args)
{
foreach (StandaloneTable table in args.Tables)
{
ChangedObjectIds.Add(table.URI);
ChangedObjectIds[table.URI] = 1;
}
RunExpirationChecks(true);
await RunExpirationChecks(true).ConfigureAwait(false);
}
private void GetIdsForMapPropertyChangedEvent(MapPropertyChangedEventArgs args)
private async Task GetIdsForMapPropertyChangedEvent(MapPropertyChangedEventArgs args)
{
foreach (Map map in args.Maps)
{
foreach (MapMember member in map.Layers)
List<MapMember> allMapMembers = _mapMemberUtils.GetAllMapMembers(map);
foreach (MapMember member in allMapMembers)
{
ChangedObjectIds.Add(member.URI);
ChangedObjectIds[member.URI] = 1;
}
}
RunExpirationChecks(false);
await RunExpirationChecks(false).ConfigureAwait(false);
}
private void GetIdsForLayersAddedEvent(LayerEventsArgs args)
@@ -252,7 +311,7 @@ public sealed class ArcGISSendBinding : ISendBinding
}
}
private void GetIdsForMapMemberPropertiesChangedEvent(MapMemberPropertiesChangedEventArgs args)
private async Task GetIdsForMapMemberPropertiesChangedEvent(MapMemberPropertiesChangedEventArgs args)
{
// don't subscribe to all events (e.g. expanding group, changing visibility etc.)
bool validEvent = false;
@@ -278,28 +337,15 @@ public sealed class ArcGISSendBinding : ISendBinding
{
foreach (MapMember member in args.MapMembers)
{
ChangedObjectIds.Add(member.URI);
ChangedObjectIds[member.URI] = 1;
}
RunExpirationChecks(false);
await RunExpirationChecks(false).ConfigureAwait(false);
}
}
public List<ISendFilter> GetSendFilters() => _sendFilters;
// POC: delete this
public List<CardSetting> GetSendSettings()
{
return new List<CardSetting>
{
new()
{
Id = "includeAttributes",
Title = "Include Attributes",
Value = true,
Type = "boolean"
},
};
}
public List<ICardSetting> GetSendSettings() => [];
[SuppressMessage(
"Maintainability",
@@ -309,7 +355,7 @@ public sealed class ArcGISSendBinding : ISendBinding
public async Task Send(string modelCardId)
{
//poc: dupe code between connectors
using var unitOfWork = _unitOfWorkFactory.Resolve<SendOperation<MapMember>>();
try
{
if (_store.GetModelById(modelCardId) is not SenderModelCard modelCard)
@@ -318,22 +364,24 @@ public sealed class ArcGISSendBinding : ISendBinding
throw new InvalidOperationException("No publish model card was found.");
}
// Init cancellation token source -> Manager also cancel it if exist before
CancellationTokenSource cts = _cancellationManager.InitCancellationTokenSource(modelCardId);
var sendInfo = new SendInfo(
modelCard.AccountId.NotNull(),
modelCard.ProjectId.NotNull(),
modelCard.ModelId.NotNull(),
"ArcGIS"
);
CancellationToken cancellationToken = _cancellationManager.InitCancellationTokenSource(modelCardId);
var sendResult = await QueuedTask
.Run(async () =>
{
List<MapMember> mapMembers = modelCard.SendFilter
.NotNull()
.GetObjectIds()
using var scope = _serviceProvider.CreateScope();
scope
.ServiceProvider.GetRequiredService<IConverterSettingsStore<ArcGISConversionSettings>>()
.Initialize(
_arcGISConversionSettingsFactory.Create(
Project.Current,
MapView.Active.Map,
new CRSoffsetRotation(MapView.Active.Map)
)
);
List<MapMember> mapMembers = modelCard
.SendFilter.NotNull()
.RefreshObjectIds()
.Select(id => (MapMember)MapView.Active.Map.FindLayer(id) ?? MapView.Active.Map.FindStandaloneTable(id))
.Where(obj => obj != null)
.ToList();
@@ -346,13 +394,26 @@ public sealed class ArcGISSendBinding : ISendBinding
);
}
var result = await unitOfWork.Service
// subscribe to the selected layer events
foreach (MapMember mapMember in mapMembers)
{
if (mapMember is FeatureLayer featureLayer)
{
SubscribeToFeatureLayerDataSourceChange(featureLayer);
}
else if (mapMember is StandaloneTable table)
{
SubscribeToTableDataSourceChange(table);
}
}
var result = await scope
.ServiceProvider.GetRequiredService<SendOperation<MapMember>>()
.Execute(
mapMembers,
sendInfo,
(status, progress) =>
Commands.SetModelProgress(modelCardId, new ModelCardProgress(modelCardId, status, progress), cts),
cts.Token
modelCard.GetSendInfo("ArcGIS"), // POC: get host app name from settings? same for GetReceiveInfo
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationToken),
cancellationToken
)
.ConfigureAwait(false);
@@ -360,18 +421,22 @@ public sealed class ArcGISSendBinding : ISendBinding
})
.ConfigureAwait(false);
Commands.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults);
}
// Catch here specific exceptions if they related to model card.
catch (SpeckleSendFilterException e)
{
Commands.SetModelError(modelCardId, e);
await Commands
.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults)
.ConfigureAwait(false);
}
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything
// 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 (Exception ex) 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
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex).ConfigureAwait(false);
}
}
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
@@ -379,19 +444,19 @@ public sealed class ArcGISSendBinding : ISendBinding
/// <summary>
/// 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.
/// </summary>
private void RunExpirationChecks(bool idsDeleted)
private async Task RunExpirationChecks(bool idsDeleted)
{
var senders = _store.GetSenders();
List<string> expiredSenderIds = new();
string[] objectIdsList = ChangedObjectIds.ToArray();
string[] objectIdsList = ChangedObjectIds.Keys.ToArray();
_sendConversionCache.EvictObjects(objectIdsList);
foreach (SenderModelCard sender in senders)
{
var objIds = sender.SendFilter.NotNull().GetObjectIds();
var objIds = sender.SendFilter.NotNull().RefreshObjectIds();
var intersection = objIds.Intersect(objectIdsList).ToList();
bool isExpired = sender.SendFilter.NotNull().CheckExpiry(ChangedObjectIds.ToArray());
bool isExpired = intersection.Count != 0;
if (isExpired)
{
expiredSenderIds.Add(sender.ModelCardId.NotNull());
@@ -405,7 +470,7 @@ public sealed class ArcGISSendBinding : ISendBinding
}
}
Commands.SetModelsExpired(expiredSenderIds);
ChangedObjectIds = new HashSet<string>();
await Commands.SetModelsExpired(expiredSenderIds).ConfigureAwait(false);
ChangedObjectIds = new();
}
}
@@ -1,15 +1,14 @@
using System.Reflection;
using ArcGIS.Core.Data;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using Speckle.Connectors.ArcGIS.HostApp;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Reflection;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using ArcProject = ArcGIS.Desktop.Core.Project;
namespace Speckle.Connectors.ArcGIS.Bindings;
@@ -17,30 +16,31 @@ namespace Speckle.Connectors.ArcGIS.Bindings;
public class BasicConnectorBinding : IBasicConnectorBinding
{
public string Name => "baseBinding";
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
public BasicConnectorBindingCommands Commands { get; }
private readonly DocumentModelStore _store;
private readonly ArcGISSettings _settings;
private readonly ISpeckleApplication _speckleApplication;
public BasicConnectorBinding(DocumentModelStore store, ArcGISSettings settings, IBridge parent)
public BasicConnectorBinding(DocumentModelStore store, IBrowserBridge parent, ISpeckleApplication speckleApplication)
{
_store = store;
_settings = settings;
_speckleApplication = speckleApplication;
Parent = parent;
Commands = new BasicConnectorBindingCommands(parent);
_store.DocumentChanged += (_, _) =>
{
Commands.NotifyDocumentChanged();
};
parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await Commands.NotifyDocumentChanged().ConfigureAwait(false);
});
}
public string GetSourceApplicationName() => _settings.HostAppInfo.Slug;
public string GetSourceApplicationName() => _speckleApplication.Slug;
public string GetSourceApplicationVersion() => _settings.HostAppInfo.GetVersion(_settings.HostAppVersion);
public string GetSourceApplicationVersion() => _speckleApplication.HostApplicationVersion;
public string GetConnectorVersion() => Assembly.GetAssembly(GetType()).NotNull().GetVersion();
public string GetConnectorVersion() => _speckleApplication.SpeckleVersion;
public DocumentInfo? GetDocumentInfo()
{
@@ -49,21 +49,21 @@ public class BasicConnectorBinding : IBasicConnectorBinding
return null;
}
return new DocumentInfo(MapView.Active.Map.URI, MapView.Active.Map.Name, MapView.Active.Map.Name);
return new DocumentInfo(ArcProject.Current.URI, MapView.Active.Map.Name, MapView.Active.Map.URI);
}
public DocumentModelStore GetDocumentState() => _store;
public void AddModel(ModelCard model) => _store.Models.Add(model);
public void AddModel(ModelCard model) => _store.AddModel(model);
public void UpdateModel(ModelCard model) => _store.UpdateModel(model);
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void HighlightObjects(List<string> objectIds) =>
HighlightObjectsOnView(objectIds.Select(x => new ObjectID(x)).ToList());
public async Task HighlightObjects(IReadOnlyList<string> objectIds) =>
await HighlightObjectsOnView(objectIds.Select(x => new ObjectID(x)).ToList()).ConfigureAwait(false);
public void HighlightModel(string modelCardId)
public async Task HighlightModel(string modelCardId)
{
var model = _store.GetModelById(modelCardId);
@@ -76,7 +76,7 @@ public class BasicConnectorBinding : IBasicConnectorBinding
if (model is SenderModelCard senderModelCard)
{
objectIds = senderModelCard.SendFilter.NotNull().GetObjectIds().Select(x => new ObjectID(x)).ToList();
objectIds = senderModelCard.SendFilter.NotNull().RefreshObjectIds().Select(x => new ObjectID(x)).ToList();
}
if (model is ReceiverModelCard receiverModelCard)
@@ -88,27 +88,27 @@ public class BasicConnectorBinding : IBasicConnectorBinding
{
return;
}
HighlightObjectsOnView(objectIds);
await HighlightObjectsOnView(objectIds).ConfigureAwait(false);
}
private async void HighlightObjectsOnView(List<ObjectID> objectIds)
private async Task HighlightObjectsOnView(IReadOnlyList<ObjectID> objectIds)
{
MapView mapView = MapView.Active;
await QueuedTask
.Run(() =>
.Run(async () =>
{
List<MapMemberFeature> mapMembersFeatures = GetMapMembers(objectIds, mapView);
ClearSelectionInTOC();
ClearSelection();
SelectMapMembersInTOC(mapMembersFeatures);
await SelectMapMembersInTOC(mapMembersFeatures).ConfigureAwait(false);
SelectMapMembersAndFeatures(mapMembersFeatures);
mapView.ZoomToSelected();
})
.ConfigureAwait(false);
}
private List<MapMemberFeature> GetMapMembers(List<ObjectID> objectIds, MapView mapView)
private List<MapMemberFeature> GetMapMembers(IReadOnlyList<ObjectID> objectIds, MapView mapView)
{
// find the layer on the map (from the objectID) and add the featureID is available
List<MapMemberFeature> mapMembersFeatures = new();
@@ -146,7 +146,7 @@ public class BasicConnectorBinding : IBasicConnectorBinding
MapView.Active.ClearTOCSelection();
}
private void SelectMapMembersAndFeatures(List<MapMemberFeature> mapMembersFeatures)
private void SelectMapMembersAndFeatures(IReadOnlyList<MapMemberFeature> mapMembersFeatures)
{
foreach (MapMemberFeature mapMemberFeat in mapMembersFeatures)
{
@@ -171,7 +171,7 @@ public class BasicConnectorBinding : IBasicConnectorBinding
}
}
private void SelectMapMembersInTOC(List<MapMemberFeature> mapMembersFeatures)
private async Task SelectMapMembersInTOC(IReadOnlyList<MapMemberFeature> mapMembersFeatures)
{
List<Layer> layers = new();
List<StandaloneTable> tables = new();
@@ -185,6 +185,10 @@ public class BasicConnectorBinding : IBasicConnectorBinding
{
layers.Add(layer);
}
else
{
await QueuedTask.Run(() => layer.SetExpanded(true)).ConfigureAwait(false);
}
}
else if (member is StandaloneTable table)
{
@@ -47,7 +47,7 @@
</groups>
<controls>
<!-- add your controls here -->
<button id="SpeckleDUI3_SpeckleDUI3OpenButton" caption="SpeckleNewUI"
<button id="SpeckleDUI3_SpeckleDUI3OpenButton" caption="Speckle (Beta)"
className="SpeckleDUI3OpenButton" loadOnClick="true"
keytip="B1"
smallImage="Images/s2logo_16.png"
@@ -59,7 +59,7 @@
</controls>
<dockPanes>
<dockPane id="SpeckleDUI3_SpeckleDUI3" caption="SpeckleNewUI" className="SpeckleDUI3ViewModel" keytip="DockPane" initiallyVisible="true" dock="group" dockWith="esri_core_contentsDockPane">
<dockPane id="SpeckleDUI3_SpeckleDUI3" caption="Speckle (Beta) for ArcGIS" className="SpeckleDUI3ViewModel" keytip="DockPane" initiallyVisible="true" dock="group" dockWith="esri_core_projectDockPane">
<content className="SpeckleDUI3Wrapper" />
</dockPane>
</dockPanes>
@@ -1,63 +1,66 @@
using ArcGIS.Desktop.Mapping;
using Speckle.Autofac.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.ArcGIS.Bindings;
using Speckle.Connectors.ArcGis.Operations.Send;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.ArcGIS.Operations.Receive;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Connectors.Utils.Builders;
using Speckle.Autofac;
using Speckle.Connectors.ArcGIS.Filters;
using Speckle.Connectors.ArcGIS.HostApp;
using Speckle.Connectors.ArcGIS.Operations.Receive;
using Speckle.Connectors.ArcGis.Operations.Send;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.Common;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;
using Speckle.Core.Models.GraphTraversal;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Converters.Common;
using Speckle.Sdk.Models.GraphTraversal;
// POC: This is a temp reference to root object senders to tweak CI failing after having generic interfaces into common project.
// This should go whenever it is aligned.
namespace Speckle.Connectors.ArcGIS.DependencyInjection;
public class ArcGISConnectorModule : ISpeckleModule
public static class ArcGISConnectorModule
{
public void Load(SpeckleContainerBuilder builder)
public static void AddArcGIS(this IServiceCollection serviceCollection)
{
builder.AddAutofac();
builder.AddConnectorUtils();
builder.AddDUI();
builder.AddDUIView();
// POC: Overwriting the SyncToMainThread to SyncToCurrentThread for ArcGIS only!
// On SendOperation, once we called QueuedTask, it expect to run everything on same thread.
builder.AddSingletonInstance<ISyncToThread, SyncToQueuedTask>();
builder.AddSingleton<DocumentModelStore, ArcGISDocumentStore>();
serviceCollection.AddConnectorUtils();
serviceCollection.AddDUI<ArcGISDocumentStore>();
serviceCollection.AddDUIView();
// Register bindings
builder.AddSingleton<IBinding, TestBinding>();
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "ArcGIS"); // POC: Easier like this for now, should be cleaned up later
builder.AddSingleton<IBinding, AccountBinding>();
builder.AddSingleton<IBinding, BasicConnectorBinding>();
builder.AddSingleton<IBasicConnectorBinding, BasicConnectorBinding>();
builder.AddSingleton<IBinding, ArcGISSelectionBinding>();
builder.AddSingleton<IBinding, ArcGISSendBinding>();
builder.AddSingleton<IBinding, ArcGISReceiveBinding>();
serviceCollection.AddSingleton<IBinding, TestBinding>();
serviceCollection.AddSingleton<IBinding, ConfigBinding>();
serviceCollection.AddSingleton<IBinding, AccountBinding>();
serviceCollection.AddSingleton<IBinding>(sp => sp.GetRequiredService<IBasicConnectorBinding>());
serviceCollection.AddSingleton<IBasicConnectorBinding, BasicConnectorBinding>();
builder.AddTransient<ISendFilter, ArcGISSelectionFilter>();
builder.AddScoped<IHostObjectBuilder, ArcGISHostObjectBuilder>();
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());
serviceCollection.RegisterTopLevelExceptionHandler();
serviceCollection.AddSingleton(DefaultTraversal.CreateTraversalFunc());
// register send operation and dependencies
builder.AddScoped<SendOperation<MapMember>>();
builder.AddScoped<ArcGISRootObjectBuilder>();
builder.AddScoped<IRootObjectBuilder<MapMember>, ArcGISRootObjectBuilder>();
serviceCollection.AddSingleton<IBinding, ArcGISSendBinding>();
serviceCollection.AddScoped<SendOperation<MapMember>>();
serviceCollection.AddSingleton<IBinding, ArcGISSelectionBinding>();
serviceCollection.AddTransient<ISendFilter, ArcGISSelectionFilter>();
serviceCollection.AddScoped<ArcGISRootObjectBuilder>();
serviceCollection.AddScoped<IRootObjectBuilder<MapMember>, ArcGISRootObjectBuilder>();
serviceCollection.AddScoped<ArcGISLayerUnpacker>();
serviceCollection.AddScoped<ArcGISColorUnpacker>();
// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();
// register receive operation and dependencies
// serviceCollection.AddSingleton<IBinding, ArcGISReceiveBinding>(); // POC: disabled until receive code is refactored
serviceCollection.AddScoped<LocalToGlobalConverterUtils>();
serviceCollection.AddScoped<ArcGISColorManager>();
serviceCollection.AddScoped<IHostObjectBuilder, ArcGISHostObjectBuilder>();
serviceCollection.AddScoped<MapMembersUtils>();
// operation progress manager
serviceCollection.AddSingleton<IOperationProgressManager, OperationProgressManager>();
}
}
@@ -12,6 +12,9 @@
<PackageOutputPath ParameterType="System.String" Output="true"/>
</ParameterGroup>
<Task>
<!-- <Reference Include="System.IO.Compression.FileSystem"/>-->
<!-- <Reference Include="System.Xml.Linq"/>-->
<!-- <Reference Include="System.Xml"/>-->
<Using Namespace="System"/>
<Using Namespace="System.IO"/>
<Using Namespace="System.Xml.Linq"/>
@@ -151,7 +154,6 @@
Log.LogErrorFromException(ex);
return false;
}
return Success;
]]>
</Code>
</Task>
@@ -187,7 +189,7 @@
{
Log.LogMessage(MessageImportance.Low, "RelativePaths: " + i.ToString());
}
return true;
Success = true;
]]>
</Code>
</Task>
@@ -201,6 +203,8 @@
<CleanInfo ParameterType="System.String" Output="true"/>
</ParameterGroup>
<Task>
<!-- <Reference Include="System.Xml.Linq"/>-->
<!-- <Reference Include="System.Xml"/>-->
<Using Namespace="System"/>
<Using Namespace="System.IO"/>
<Using Namespace="System.Xml.Linq"/>
@@ -261,7 +265,6 @@
CleanInfo = AssemblyName + extension;
}
Success = true;
return Success;
]]>
</Code>
</Task>
@@ -272,8 +275,9 @@
<PackageType Condition="'$(PackageType)' == ''">Addin</PackageType>
</PropertyGroup>
<PropertyGroup>
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))</ArcGISFolder>
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)</ArcGISFolder>
<ArcGISFolder>$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro', 'InstallDir', null, RegistryView.Registry64))\bin</ArcGISFolder>
<ArcGISFolder Condition="'$(ArcGISFolder)' == ''">$(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir)\bin</ArcGISFolder>
<ArcGISFolder Condition="'$(ArcGISFolder)' == '' Or !Exists('$(ArcGISFolder)\RegisterAddIn.exe')">$(ProgramData)\EsriProCommon\</ArcGISFolder>
</PropertyGroup>
<Target Name="ArcGISInstallOutput" AfterTargets="Build">
<Message Text="IntermediateOutputPath Name: $(IntermediateOutputPath)..." Importance="High"/>
@@ -329,9 +333,9 @@
<!-- Shell out to RegisterAddIn.exe to install the package -->
<Message Text="Deploying $(PackageType)..." Importance="High"/>
<Message Text="ArcGISFolder Name: $(ArcGISFolder)..." Importance="High"/>
<Message Text="Unable to execute RegisterAddIn.exe. ArcGIS Pro is not installed." Importance="High" Condition="'$(ArcGISFolder)' == ''"/>
<Message Text="Execute RegisterAddIn.exe &quot;$(PackageFile)&quot; /s..." Importance="High" Condition="'$(ArcGISFolder)' != ''"/>
<Exec IgnoreExitCode="true" WorkingDirectory="$(ArcGISFolder)bin" Command="RegisterAddIn.exe &quot;$(PackageFile)&quot; /s" Condition="'$(ArcGISFolder)' != '' AND $(PackageFile) != '' ">
<Message Text="Unable to execute RegisterAddIn.exe. ArcGIS Pro is not installed." Importance="High" Condition="!Exists('$(ArcGISFolder)')"/>
<Message Text="Execute RegisterAddIn.exe &quot;$(PackageFile)&quot; /s..." Importance="High" Condition="Exists('$(ArcGISFolder)')"/>
<Exec IgnoreExitCode="true" WorkingDirectory="$(ArcGISFolder)" Command="RegisterAddIn.exe &quot;$(PackageFile)&quot; /s" Condition="Exists('$(ArcGISFolder)') AND $(PackageFile) != '' ">
<Output TaskParameter="ExitCode" PropertyName="ESRIRegAddinExitCode" />
</Exec>
<RemoveDir Condition="Exists('$(ZipIntermediatePath)')" Directories="$(ZipIntermediatePath)" />
@@ -342,10 +346,10 @@
PackageType="$(PackageType)">
<Output TaskParameter="CleanInfo" PropertyName="CleanInfo" />
</CleanAddIn>
<Message Text="Clean $(PackageType)..." Importance="High"/>
<Message Text="Execute RegisterAddIn.exe &quot;$(CleanInfo)&quot; /u..." Importance="High" Condition="'$(ArcGISFolder)' != ''"/>
<Message Text="Unable to execute RegisterAddIn.exe. ArcGIS Pro is not installed." Importance="High" Condition="'$(ArcGISFolder)' == ''"/>
<Exec IgnoreExitCode="true" WorkingDirectory="$(ArcGISFolder)bin" Command="RegisterAddIn.exe &quot;$(CleanInfo)&quot; /u /s" Condition="'$(ArcGISFolder)' != '' AND $(CleanInfo) != ''">
<Message Text="Clean $(PackageType).$(ArcGISFolder).." Importance="High"/>
<Message Text="Execute RegisterAddIn.exe &quot;$(CleanInfo)&quot; /u..." Importance="High" Condition="Exists('$(ArcGISFolder)')"/>
<Message Text="Unable to execute RegisterAddIn.exe. ArcGIS Pro is not installed." Importance="High" Condition="!Exists('$(ArcGISFolder)')"/>
<Exec IgnoreExitCode="true" WorkingDirectory="$(ArcGISFolder)" Command="RegisterAddIn.exe &quot;$(CleanInfo)&quot; /u /s" Condition="Exists('$(ArcGISFolder)') AND $(CleanInfo) != ''">
<Output TaskParameter="ExitCode" PropertyName="ESRIRegAddinExitCode" />
</Exec>
</Target>
@@ -1,10 +0,0 @@
using Speckle.Connectors.DUI.Models.Card.SendFilter;
namespace Speckle.Connectors.ArcGIS.Filters;
public class ArcGISEverythingFilter : EverythingSendFilter
{
public override List<string> GetObjectIds() => new(); // TODO
public override bool CheckExpiry(string[] changedObjectIds) => true;
}
@@ -4,7 +4,10 @@ namespace Speckle.Connectors.ArcGIS.Filters;
public class ArcGISSelectionFilter : DirectSelectionSendFilter
{
public override List<string> GetObjectIds() => SelectedObjectIds;
public ArcGISSelectionFilter()
{
IsDefault = true;
}
public override bool CheckExpiry(string[] changedObjectIds) => SelectedObjectIds.Intersect(changedObjectIds).Any();
public override List<string> RefreshObjectIds() => SelectedObjectIds;
}
@@ -0,0 +1,3 @@
global using AC = ArcGIS.Core;
global using ACD = ArcGIS.Core.Data;
global using ADM = ArcGIS.Desktop.Mapping;
@@ -0,0 +1,270 @@
using System.Drawing;
using ArcGIS.Core.CIM;
using ArcGIS.Desktop.Mapping;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.ArcGIS3.Utils;
using Speckle.Objects;
using Speckle.Objects.Other;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.Extensions;
using Speckle.Sdk.Models.GraphTraversal;
using Speckle.Sdk.Models.Proxies;
namespace Speckle.Connectors.ArcGIS.HostApp;
/// <summary>
/// TODO: definitely need to refactor this, probably will collect colors during layer iteration in the root object builder.
/// </summary>
public class ArcGISColorManager
{
public Dictionary<string, Color> ObjectColorsIdMap { get; set; } = new();
public Dictionary<string, Color> ObjectMaterialsIdMap { get; set; } = new();
/// <summary>
/// Parse Color Proxies and stores in ObjectColorsIdMap the relationship between object ids and colors
/// </summary>
/// <param name="colorProxies"></param>
/// <param name="onOperationProgressed"></param>
public async Task ParseColors(List<ColorProxy> colorProxies, IProgress<CardProgress> onOperationProgressed)
{
// injected as Singleton, so we need to clean existing proxies first
ObjectColorsIdMap = new();
var count = 0;
foreach (ColorProxy colorProxy in colorProxies)
{
onOperationProgressed.Report(new("Converting colors", (double)++count / colorProxies.Count));
await Task.Yield();
foreach (string objectId in colorProxy.objects)
{
Color convertedColor = Color.FromArgb(colorProxy.value);
ObjectColorsIdMap.TryAdd(objectId, convertedColor);
}
}
}
/// <summary>
/// Parse Color renderMaterials and stores in ObjectMaterialsIdMap the relationship between object ids and colors
/// </summary>
/// <param name="materialProxies"></param>
/// <param name="onOperationProgressed"></param>
public async Task ParseMaterials(
List<RenderMaterialProxy> materialProxies,
IProgress<CardProgress> onOperationProgressed
)
{
// injected as Singleton, so we need to clean existing proxies first
ObjectMaterialsIdMap = new();
var count = 0;
foreach (RenderMaterialProxy colorProxy in materialProxies)
{
onOperationProgressed.Report(new("Converting materials", (double)++count / materialProxies.Count));
await Task.Yield();
foreach (string objectId in colorProxy.objects)
{
Color convertedColor = Color.FromArgb(colorProxy.value.diffuse);
ObjectMaterialsIdMap.TryAdd(objectId, convertedColor);
}
}
}
public int CIMColorToInt(CIMColor color)
{
return (255 << 24)
| ((int)Math.Round(color.Values[0]) << 16)
| ((int)Math.Round(color.Values[1]) << 8)
| (int)Math.Round(color.Values[2]);
}
/// <summary>
/// Create a new CIMUniqueValueClass for UniqueRenderer per each object ID
/// </summary>
/// <param name="tc"></param>
/// <param name="speckleGeometryType"></param>
private CIMUniqueValueClass CreateColorCategory(
TraversalContext tc,
esriGeometryType speckleGeometryType,
string uniqueLabel
)
{
// declare default white color
Color color = Color.FromArgb(255, 255, 255, 255);
bool colorFound = false;
// get color moving upwards from the object
foreach (var parent in tc.GetAscendants())
{
if (parent.applicationId is string appId)
{
if (ObjectMaterialsIdMap.TryGetValue(appId, out Color objColorMaterial))
{
color = objColorMaterial;
colorFound = true;
break;
}
if (ObjectColorsIdMap.TryGetValue(appId, out Color objColor))
{
color = objColor;
colorFound = true;
break;
}
}
}
// handling Revit case, where child objects have separate colors/materials
if (!colorFound && tc.Current is IDataObject)
{
var displayable = tc.Current.TryGetDisplayValue();
if (displayable != null)
{
foreach (var childObj in displayable)
{
if (childObj.applicationId is string appId)
{
if (ObjectMaterialsIdMap.TryGetValue(appId, out Color objColorMaterial))
{
color = objColorMaterial;
break;
}
if (ObjectColorsIdMap.TryGetValue(appId, out Color objColor))
{
color = objColor;
break;
}
}
}
}
}
CIMSymbolReference symbol = CreateSymbol(speckleGeometryType, color);
// First create a "CIMUniqueValueClass"
List<CIMUniqueValue> listUniqueValues = new() { new CIMUniqueValue { FieldValues = new string[] { uniqueLabel } } };
CIMUniqueValueClass newUniqueValueClass =
new()
{
Editable = true,
Label = uniqueLabel,
Patch = PatchShape.Default,
Symbol = symbol,
Visible = true,
Values = listUniqueValues.ToArray()
};
return newUniqueValueClass;
}
/// <summary>
/// Create a Symbol from GeometryType and Color
/// </summary>
/// <param name="speckleGeometryType"></param>
/// <param name="color"></param>
private CIMSymbolReference CreateSymbol(esriGeometryType speckleGeometryType, Color color)
{
var symbol = SymbolFactory
.Instance.ConstructPointSymbol(ColorFactory.Instance.CreateColor(color))
.MakeSymbolReference();
switch (speckleGeometryType)
{
case esriGeometryType.esriGeometryLine:
case esriGeometryType.esriGeometryPolyline:
symbol = SymbolFactory
.Instance.ConstructLineSymbol(ColorFactory.Instance.CreateColor(color))
.MakeSymbolReference();
break;
case esriGeometryType.esriGeometryPolygon:
case esriGeometryType.esriGeometryMultiPatch:
symbol = SymbolFactory
.Instance.ConstructPolygonSymbol(ColorFactory.Instance.CreateColor(color))
.MakeSymbolReference();
break;
}
return symbol;
}
/// <summary>
/// Add CIMUniqueValueClass to Layer Renderer (if exists); apply Renderer to Layer (again)
/// </summary>
/// <param name="tc"></param>
/// <param name="trackerItem"></param>
public CIMUniqueValueRenderer? CreateOrEditLayerRenderer(
TraversalContext tc,
ObjectConversionTracker trackerItem,
CIMRenderer? existingRenderer
)
{
if (trackerItem.HostAppMapMember is not FeatureLayer fLayer)
{
// do nothing with non-feature layers
return null;
}
// declare default grey color, create default symbol for the given layer geometry type
var color = Color.FromArgb(CIMColorToInt(ColorFactory.Instance.GreyRGB));
CIMSymbolReference defaultSymbol = CreateSymbol(fLayer.ShapeType, color);
// get existing renderer classes
List<CIMUniqueValueClass> listUniqueValueClasses = new() { };
if (existingRenderer is CIMUniqueValueRenderer uniqueRenderer)
{
if (uniqueRenderer.Groups[0].Classes != null)
{
listUniqueValueClasses.AddRange(uniqueRenderer.Groups[0].Classes.ToList());
}
}
// Add new CIMUniqueValueClass (or multiple, if it's a Collection with elements, e.g. VectorLayer)
List<TraversalContext> traversalContexts = new();
if (tc.Current is Collection collection)
{
foreach (var element in collection.elements)
{
TraversalContext newTc = new(element, "elements", tc);
traversalContexts.Add(newTc);
}
}
else
{
traversalContexts.Add(tc);
}
foreach (var tContext in traversalContexts)
{
// get unique label
string? uniqueLabel = tContext.Current?.id;
// remove any GIS-specific classes for now
/*
if (tContext.Current is IGisFeature gisFeat)
{
var existingLabel = gisFeat.attributes["Speckle_ID"];
if (existingLabel is string stringLabel)
{
uniqueLabel = stringLabel;
}
}*/
if (uniqueLabel is not null && !listUniqueValueClasses.Select(x => x.Label).Contains(uniqueLabel))
{
CIMUniqueValueClass newUniqueValueClass = CreateColorCategory(tContext, fLayer.ShapeType, uniqueLabel);
listUniqueValueClasses.Add(newUniqueValueClass);
}
}
// Create a list of CIMUniqueValueGroup
CIMUniqueValueGroup uvg = new() { Classes = listUniqueValueClasses.ToArray(), Heading = "Speckle_ID" };
List<CIMUniqueValueGroup> listUniqueValueGroups = new() { uvg };
// Create the CIMUniqueValueRenderer
CIMUniqueValueRenderer uvr =
new()
{
UseDefaultSymbol = true,
DefaultLabel = "all other values",
DefaultSymbol = defaultSymbol,
Groups = listUniqueValueGroups.ToArray(),
Fields = new string[] { "Speckle_ID" }
};
return uvr;
}
}
@@ -0,0 +1,460 @@
using ArcGIS.Desktop.Mapping;
using Speckle.Sdk.Models.Proxies;
namespace Speckle.Connectors.ArcGIS.HostApp;
public class ArcGISColorUnpacker
{
/// <summary>
/// Cache of all color proxies for converted features. Key is the Color proxy argb value.
/// </summary>
public Dictionary<int, ColorProxy> ColorProxyCache { get; } = new();
/// <summary>
/// Stores the current renderer (determined by mapMember)
/// </summary>
private AC.CIM.CIMRenderer? StoredRenderer { get; set; }
/// <summary>
/// Stores the current renderer (determined by tin mapmember)
/// </summary>
private AC.CIM.CIMTinRenderer? StoredTinRenderer { get; set; }
/// <summary>
/// Stores the used renderer fields from the layer
/// </summary>
private List<string> StoredRendererFields { get; set; }
/// <summary>
/// Stores an already processed color for current mapMember, to dbe used by all mapMember objects. Only applies to simple type renderers
/// </summary>
private int? StoredColor { get; set; }
/// <summary>
/// Stores a feature layer renderer to be used by <see cref="ProcessFeatureLayerColor"/> in <see cref="StoredRenderer"/>, any fields used by the renderer from the layer, and resets the <see cref="StoredColor"/> and <see cref="StoredRendererFields"/>
/// </summary>
/// <param name="featureLayer"></param>
/// <exception cref="AC.CalledOnWrongThreadException">Must be called on MCT.</exception>
public void StoreRendererAndFields(ADM.FeatureLayer featureLayer)
{
// field names are unique, but often their alias is used instead by renderer headings
// so we are storing both names and alias in this dictionary for fast lookup
// POC: adding aliases are not optimal, because they do not need to be unique && they can be the same as the name of another field
Dictionary<string, string> layerFieldDictionary = new();
foreach (ADM.FieldDescription field in featureLayer.GetFieldDescriptions())
{
layerFieldDictionary.TryAdd(field.Name, field.Name);
layerFieldDictionary.TryAdd(field.Alias, field.Name);
}
// clear stored values
StoredRendererFields = new();
StoredColor = null;
StoredRenderer = null;
AC.CIM.CIMRenderer layerRenderer = featureLayer.GetRenderer();
List<string> fields = new();
bool isSupported = false;
switch (layerRenderer)
{
case AC.CIM.CIMSimpleRenderer:
isSupported = true;
break;
case AC.CIM.CIMUniqueValueRenderer uniqueValueRenderer:
isSupported = true;
fields = uniqueValueRenderer.Fields.ToList();
break;
case AC.CIM.CIMClassBreaksRenderer classBreaksRenderer:
isSupported = true;
fields.Add(classBreaksRenderer.Field);
break;
default:
// TODO: log error here that a renderer is unsupported
break;
}
if (isSupported)
{
StoredRenderer = layerRenderer;
foreach (string field in fields)
{
if (layerFieldDictionary.TryGetValue(field, out string? fieldName))
{
StoredRendererFields.Add(fieldName);
}
}
}
}
/// <summary>
/// Stores a las layer renderer to be used by <see cref="ProcessLasLayerColor"/> in <see cref="StoredTinRenderer"/>
/// </summary>
/// <param name="lasLayer"></param>
/// <exception cref="AC.CalledOnWrongThreadException">Must be called on MCT.</exception>
public void StoreRenderer(ADM.LasDatasetLayer lasLayer)
{
// clear stored values
StoredTinRenderer = null;
// POC: not sure why we are only using the first renderer here
AC.CIM.CIMTinRenderer layerRenderer = lasLayer.GetRenderers()[0];
bool isSupported = false;
switch (layerRenderer)
{
case AC.CIM.CIMTinUniqueValueRenderer:
isSupported = true;
break;
default:
// TODO: log error here that a renderer is unsupported
break;
}
if (isSupported)
{
StoredTinRenderer = layerRenderer;
}
}
/// <summary>
/// Processes a las layer's point color by the stored <see cref="StoredRenderer"/>, and stores the point's id and color proxy to the <see cref="ColorProxyCache"/>.
/// POC: logic probably can be combined with ProcessFeatureLayerColor.
/// </summary>
/// <param name="point"></param>
public void ProcessLasLayerColor(ACD.Analyst3D.LasPoint point, string pointApplicationId)
{
// get the color from the renderer and point
AC.CIM.CIMColor? color;
switch (StoredTinRenderer)
{
case AC.CIM.CIMTinUniqueValueRenderer uniqueValueRenderer:
color = GetPointColorByUniqueValueRenderer(uniqueValueRenderer, point);
break;
default:
return;
}
// get or create the color proxy for the point
int argb = CIMColorToInt(color ?? point.RGBColor);
AddObjectIdToColorProxyCache(pointApplicationId, argb);
}
// Retrieves the las point color from a unique value renderer
// unique renderers have groups of conditions that may affect the color of a feature
// resulting in a different color than the default renderer symbol color
private AC.CIM.CIMColor? GetPointColorByUniqueValueRenderer(
AC.CIM.CIMTinUniqueValueRenderer renderer,
ACD.Analyst3D.LasPoint point
)
{
foreach (AC.CIM.CIMUniqueValueGroup group in renderer.Groups)
{
foreach (AC.CIM.CIMUniqueValueClass groupClass in group.Classes)
{
foreach (AC.CIM.CIMUniqueValue value in groupClass.Values)
{
// all field values have to match the row values
for (int i = 0; i < value.FieldValues.Length; i++)
{
string groupValue = value.FieldValues[i].Replace("<Null>", "");
object? pointValue = point.ClassCode;
if (ValuesAreEqual(groupValue, pointValue))
{
return groupClass.Symbol.Symbol.GetColor();
}
}
}
}
}
return null;
}
/// <summary>
/// Processes a feature layer's row color by the stored <see cref="StoredRenderer"/>, and stores the row's id and color proxy to the <see cref="ColorProxyCache"/>.
/// </summary>
/// <param name="row"></param>
/// <returns></returns>
/// <exception cref="ACD.Exceptions.GeodatabaseException"></exception>
public void ProcessFeatureLayerColor(ACD.Row row, string rowApplicationId)
{
// if stored color is not null, this means the renderer was a simple renderer that applies to the entire layer, and was already created.
// just add the row application id to the color proxy.
if (StoredColor is int existingColorProxyId)
{
AddObjectIdToColorProxyCache(rowApplicationId, existingColorProxyId);
}
// get the color from the renderer and row
AC.CIM.CIMColor? color = null;
switch (StoredRenderer)
{
// simple renderers do not rely on fields, so the color can be retrieved from the renderer directly
case AC.CIM.CIMSimpleRenderer simpleRenderer:
color = simpleRenderer.Symbol.Symbol.GetColor();
break;
case AC.CIM.CIMUniqueValueRenderer uniqueValueRenderer:
color = GetRowColorByUniqueValueRenderer(uniqueValueRenderer, row);
break;
case AC.CIM.CIMClassBreaksRenderer classBreaksRenderer:
color = GetRowColorByClassBreaksRenderer(classBreaksRenderer, row);
break;
}
if (color is null)
{
// TODO: log error or throw exception that color could not be retrieved
return;
}
// get or create the color proxy for the row
int argb = CIMColorToInt(color);
AddObjectIdToColorProxyCache(rowApplicationId, argb);
// store color if from simple renderer
if (StoredRenderer is AC.CIM.CIMSimpleRenderer)
{
StoredColor = argb;
}
}
// Retrieves the row color from a class breaks renderer
// unique renderers have groups of conditions that may affect the color of a feature
// resulting in a different color than the default renderer symbol color
private AC.CIM.CIMColor? GetRowColorByClassBreaksRenderer(AC.CIM.CIMClassBreaksRenderer renderer, ACD.Row row)
{
AC.CIM.CIMColor? color = null;
// get the default symbol color
if (renderer.DefaultSymbol?.Symbol.GetColor() is AC.CIM.CIMColor defaultColor)
{
color = defaultColor;
}
// get the first stored field, since this renderer should only have 1 field
double storedFieldValue = Convert.ToDouble(row[StoredRendererFields.First()]);
List<AC.CIM.CIMClassBreak> reversedBreaks = new(renderer.Breaks);
reversedBreaks.Reverse();
foreach (var rBreak in reversedBreaks)
{
// keep looping until the last matching condition
if (storedFieldValue <= rBreak.UpperBound)
{
if (rBreak.Symbol.Symbol.GetColor() is AC.CIM.CIMColor breakColor)
{
color = breakColor;
}
else
{
// TODO: log error here, could not retrieve break color from symbol
}
}
}
return color;
}
// Retrieves the row color from a unique value renderer
// unique renderers have groups of conditions that may affect the color of a feature
// resulting in a different color than the default renderer symbol color
private AC.CIM.CIMColor? GetRowColorByUniqueValueRenderer(AC.CIM.CIMUniqueValueRenderer renderer, ACD.Row row)
{
AC.CIM.CIMColor? color = null;
// get the default symbol color
if (renderer.DefaultSymbol?.Symbol.GetColor() is AC.CIM.CIMColor defaultColor)
{
color = defaultColor;
}
// note: usually there is only 1 group
foreach (AC.CIM.CIMUniqueValueGroup group in renderer.Groups)
{
// loop through all values in groups to see if any have met conditions that result in a different color
foreach (AC.CIM.CIMUniqueValueClass groupClass in group.Classes)
{
bool groupConditionsMet = true;
foreach (AC.CIM.CIMUniqueValue value in groupClass.Values)
{
// all field values have to match the row values
for (int i = 0; i < StoredRendererFields.Count; i++)
{
string groupValue = value.FieldValues[i];
object? rowValue = row[StoredRendererFields[i]];
if (!ValuesAreEqual(groupValue, rowValue))
{
groupConditionsMet = false;
break;
}
}
}
// set the group color to class symbol color if conditions are met
if (groupConditionsMet)
{
if (groupClass.Symbol.Symbol.GetColor() is AC.CIM.CIMColor groupColor)
{
color = groupColor;
}
else
{
// TODO: log error here, could not retrieve group color from symbol
}
}
}
}
return color;
}
/// <summary>
/// Compares the label string of a UniqueValueRenderer (groupValue), and an object value (row, las point), to determine if they are equal
/// </summary>
/// <param name="objectValue"></param>
/// <param name="groupValue"></param>
private bool ValuesAreEqual(string groupValue, object? objectValue)
{
switch (objectValue)
{
case int:
case short:
case long:
case byte:
string objectValueString = Convert.ToString(objectValue) ?? "";
return groupValue.Equals(objectValueString);
case string:
return groupValue.Equals(objectValue);
// POC: these are tricky to compare with the label strings accurately, so will trim both values to 5 decimal places.
case double d:
return double.TryParse(groupValue, out double groupDouble) && groupDouble - d < 0.000001;
case float f:
return float.TryParse(groupValue, out float groupFloat) && groupFloat - f < 0.000001;
default:
return false;
}
}
private void AddObjectIdToColorProxyCache(string objectId, int argb)
{
if (ColorProxyCache.TryGetValue(argb, out ColorProxy? colorProxy))
{
colorProxy.objects.Add(objectId);
}
else
{
ColorProxy newColorProxy =
new()
{
name = argb.ToString(),
objects = new() { objectId },
value = argb,
applicationId = argb.ToString()
};
ColorProxyCache.Add(argb, newColorProxy);
}
}
private int ArgbToInt(int a, int r, int g, int b)
{
return (a << 24) | (r << 16) | (g << 8) | b;
}
// Gets the argb int from a CIMColor
// Defaults to assuming CIMColor.Values represent the red, green, and blue channels.
private int CIMColorToInt(AC.CIM.CIMColor color)
{
switch (color)
{
case AC.CIM.CIMHSVColor hsv:
(float hsvR, float hsvG, float hsvB) = RgbFromHsv(hsv.H, hsv.S, hsv.V);
return ArgbToInt(
(int)Math.Round(hsv.Alpha),
(int)Math.Round(hsvR * 255),
(int)Math.Round(hsvG * 255),
(int)Math.Round(hsvB * 255)
);
case AC.CIM.CIMCMYKColor cmyk:
float k = cmyk.K;
int cmykR = Convert.ToInt32(255 * (1 - cmyk.C) * (1 - k));
int cmykG = Convert.ToInt32(255 * (1 - cmyk.M) * (1 - k));
int cmykB = Convert.ToInt32(255 * (1 - cmyk.Y) * (1 - k));
return ArgbToInt((int)Math.Round(cmyk.Alpha), cmykR, cmykG, cmykB);
default:
return ArgbToInt(
(int)Math.Round(color.Alpha),
(int)Math.Round(color.Values[0]),
(int)Math.Round(color.Values[1]),
(int)Math.Round(color.Values[2])
);
}
}
private (float, float, float) RgbFromHsv(float hue, float saturation, float value)
{
// Translates HSV color to RGB color
// H: 0.0 - 360.0, S: 0.0 - 100.0, V: 0.0 - 100.0
// R, G, B: 0.0 - 1.0
float c = (value / 100) * (saturation / 100);
float x = c * (1 - Math.Abs(((hue / 60) % 2) - 1));
float m = (value / 100) - c;
float r = 0;
float g = 0;
float b = 0;
if (hue >= 0 && hue < 60)
{
r = c;
g = x;
b = 0;
}
else if (hue >= 60 && hue < 120)
{
r = x;
g = c;
b = 0;
}
else if (hue >= 120 && hue < 180)
{
r = 0;
g = c;
b = x;
}
else if (hue >= 180 && hue < 240)
{
r = 0;
g = x;
b = c;
}
else if (hue >= 240 && hue < 300)
{
r = x;
g = 0;
b = c;
}
else if (hue >= 300 && hue < 360)
{
r = c;
g = 0;
b = x;
}
r += m;
g += m;
b += m;
return (r, g, b);
}
}
@@ -0,0 +1,97 @@
using Speckle.Connectors.ArcGIS.HostApp.Extensions;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.ArcGIS.HostApp;
public class ArcGISLayerUnpacker
{
/// <summary>
/// Cache of all collections created by unpacked Layer MapMembers. Key is the Speckle applicationId (Layer URI).
/// </summary>
public Dictionary<string, Collection> CollectionCache { get; } = new();
/// <summary>
/// Mapmembers can be layers containing objects, or LayerContainers containing other layers.
/// Unpacks selected mapMembers and creates their corresponding collection on the root collection.
/// </summary>
/// <param name="mapMembers"></param>
/// <param name="parentCollection"></param>
/// <returns>List of layers containing objects.</returns>
/// <exception cref="AC.CalledOnWrongThreadException">Thrown when this method is *not* called on the MCT, because this method accesses mapmember fields</exception>
public async Task<List<ADM.MapMember>> UnpackSelectionAsync(
IEnumerable<ADM.MapMember> mapMembers,
Collection parentCollection,
List<ADM.MapMember>? objects = null
)
{
if (objects is null)
{
objects = new();
}
foreach (ADM.MapMember mapMember in mapMembers)
{
switch (mapMember)
{
case ADM.ILayerContainer container:
Collection containerCollection = CreateAndCacheMapMemberCollection(mapMember, true);
parentCollection.elements.Add(containerCollection);
await UnpackSelectionAsync(container.Layers, containerCollection, objects).ConfigureAwait(false);
break;
default:
if (!(objects.Contains(mapMember)))
{
Collection collection = CreateAndCacheMapMemberCollection(mapMember);
parentCollection.elements.Add(collection);
objects.Add(mapMember);
}
break;
}
}
return objects;
}
private Collection CreateAndCacheMapMemberCollection(ADM.MapMember mapMember, bool isLayerContainer = false)
{
string mapMemberApplicationId = mapMember.GetSpeckleApplicationId();
Collection collection =
new()
{
name = mapMember.Name,
applicationId = mapMemberApplicationId,
["type"] = mapMember.GetType().Name
};
switch (mapMember)
{
case ADM.IDisplayTable displayTable: // get fields from layers that implement IDisplayTable, eg FeatureLayer or StandaloneTable
Dictionary<string, string>? fields = displayTable
.GetFieldDescriptions()
.ToDictionary(field => field.Name, field => field.Type.ToString());
collection["fields"] = fields;
if (mapMember is ADM.BasicFeatureLayer basicFeatureLayer)
{
collection["shapeType"] = basicFeatureLayer.ShapeType.ToString();
}
break;
case ADM.Layer layer:
collection["mapLayerType"] = layer.MapLayerType.ToString();
break;
case ADM.ILayerContainer:
default:
break;
}
if (!isLayerContainer) // do not cache layer containers, since these won't contain any objects
{
CollectionCache.Add(mapMemberApplicationId, collection);
}
return collection;
}
}
@@ -1,21 +0,0 @@
using System.IO;
using Speckle.Connectors.Utils;
using Speckle.Core.Kits;
namespace Speckle.Connectors.ArcGIS.HostApp;
//poc: dupe code bewtween connectors
public class ArcGISSettings
{
public ArcGISSettings(HostApplication hostAppInfo, HostAppVersion hostAppVersion)
{
HostAppInfo = hostAppInfo;
HostAppVersion = hostAppVersion;
Modules = new[] { new DirectoryInfo(typeof(ArcGISSettings).Assembly.Location).Parent.NotNull().FullName }; //poc: Net6 requires us to use this `location` property rather than ToString, should we use this everywhere?
}
public HostApplication HostAppInfo { get; private set; }
public HostAppVersion HostAppVersion { get; private set; }
public IReadOnlyList<string> Modules { get; private set; }
}
@@ -0,0 +1,31 @@
using ArcGIS.Core.Data.Raster;
namespace Speckle.Connectors.ArcGIS.HostApp.Extensions;
public static class SpeckleApplicationIdExtensions
{
/// <summary>
/// Retrieves the Speckle application id for map members
/// </summary>
public static string GetSpeckleApplicationId(this ADM.MapMember mapMember) => mapMember.URI;
/// <summary>
/// Constructs the Speckle application id for Features as a concatenation of the layer URI (applicationId)
/// and the row OID (index of row in layer).
/// </summary>
/// <exception cref="ACD.Exceptions.GeodatabaseException">Throws when this is *not* called on MCT. Use QueuedTask.Run.</exception>
public static string GetSpeckleApplicationId(this ACD.Row row, string layerApplicationId) =>
$"{layerApplicationId}_{row.GetObjectID()}";
/// <summary>
/// Constructs the Speckle application id for Raster as a concatenation of the layer URI (applicationId) and 0-index
/// </summary>
public static string GetSpeckleApplicationId(this Raster _, string layerApplicationId) => $"{layerApplicationId}_0";
/// <summary>
/// Constructs the Speckle application id for LasDatasets as a concatenation of the layer URI (applicationId)
/// and point OID.
/// </summary>
public static string GetSpeckleApplicationId(this ACD.Analyst3D.LasPoint point, string layerApplicationId) =>
$"{layerApplicationId}_{point.PointID}";
}
@@ -1,9 +0,0 @@
using ArcGIS.Desktop.Framework.Threading.Tasks;
using Speckle.Connectors.Utils.Operations;
namespace Speckle.Connectors.ArcGIS.HostApp;
public class SyncToQueuedTask : ISyncToThread
{
public Task<T> RunOnThread<T>(Func<T> func) => QueuedTask.Run(func);
}
@@ -0,0 +1,416 @@
using System.Diagnostics.Contracts;
using ArcGIS.Core.CIM;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using Speckle.Connectors.ArcGIS.HostApp;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Instances;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.ArcGIS3;
using Speckle.Converters.ArcGIS3.Utils;
using Speckle.Converters.Common;
using Speckle.Objects.Data;
using Speckle.Objects.Other;
using Speckle.Sdk;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.GraphTraversal;
using Speckle.Sdk.Models.Instances;
using Speckle.Sdk.Models.Proxies;
namespace Speckle.Connectors.ArcGIS.Operations.Receive;
public class ArcGISHostObjectBuilder : IHostObjectBuilder
{
private readonly IRootToHostConverter _converter;
private readonly IFeatureClassUtils _featureClassUtils;
private readonly ILocalToGlobalUnpacker _localToGlobalUnpacker;
private readonly LocalToGlobalConverterUtils _localToGlobalConverterUtils;
// POC: figure out the correct scope to only initialize on Receive
private readonly IConverterSettingsStore<ArcGISConversionSettings> _settingsStore;
private readonly GraphTraversal _traverseFunction;
private readonly ArcGISColorManager _colorManager;
public ArcGISHostObjectBuilder(
IRootToHostConverter converter,
IConverterSettingsStore<ArcGISConversionSettings> settingsStore,
IFeatureClassUtils featureClassUtils,
ILocalToGlobalUnpacker localToGlobalUnpacker,
LocalToGlobalConverterUtils localToGlobalConverterUtils,
GraphTraversal traverseFunction,
ArcGISColorManager colorManager
)
{
_converter = converter;
_settingsStore = settingsStore;
_featureClassUtils = featureClassUtils;
_localToGlobalUnpacker = localToGlobalUnpacker;
_localToGlobalConverterUtils = localToGlobalConverterUtils;
_traverseFunction = traverseFunction;
_colorManager = colorManager;
}
public async Task<HostObjectBuilderResult> Build(
Base rootObject,
string projectName,
string modelName,
IProgress<CardProgress> onOperationProgressed,
CancellationToken cancellationToken
)
{
// TODO get spatialRef and offsets & rotation from ProjectInfo in CommitObject
// ATM, GIS commit CRS is stored per layer (in FeatureClass converter), but should be moved to the Root level too
// Prompt the UI conversion started. Progress bar will swoosh.
onOperationProgressed.Report(new("Converting", null));
// get materials
List<RenderMaterialProxy>? materials = (rootObject[ProxyKeys.RENDER_MATERIAL] as List<object>)
?.Cast<RenderMaterialProxy>()
.ToList();
if (materials != null)
{
await _colorManager.ParseMaterials(materials, onOperationProgressed).ConfigureAwait(false);
}
// get colors
List<ColorProxy>? colors = (rootObject[ProxyKeys.COLOR] as List<object>)?.Cast<ColorProxy>().ToList();
if (colors != null)
{
await _colorManager.ParseColors(colors, onOperationProgressed).ConfigureAwait(false);
}
int count = 0;
IReadOnlyCollection<LocalToGlobalMap> objectsToConvert = GetObjectsToConvert(rootObject);
Dictionary<TraversalContext, ObjectConversionTracker> conversionTracker = new();
// 1. convert everything
List<ReceiveConversionResult> results = new(objectsToConvert.Count);
List<string> bakedObjectIds = new();
foreach (LocalToGlobalMap objectToConvert in objectsToConvert)
{
string[] path = GetLayerPath(objectToConvert.TraversalContext);
Base obj = objectToConvert.AtomicObject;
cancellationToken.ThrowIfCancellationRequested();
try
{
obj = _localToGlobalConverterUtils.TransformObjects(objectToConvert.AtomicObject, objectToConvert.Matrix);
object? conversionResult = await QueuedTask.Run(() => _converter.Convert(obj)).ConfigureAwait(false);
string nestedLayerPath = $"{string.Join("\\", path)}";
if (obj is ArcgisObject gisObj)
{
nestedLayerPath += $"\\{gisObj.name}";
}
else
{
nestedLayerPath += $"\\{obj.speckle_type.Split(".")[^1]}"; // add sub-layer by speckleType, for non-GIS objects
}
conversionTracker[objectToConvert.TraversalContext] = new ObjectConversionTracker(
obj,
(Geometry?)conversionResult,
nestedLayerPath
);
}
catch (Exception ex) when (!ex.IsFatal()) // DO NOT CATCH SPECIFIC STUFF, conversion errors should be recoverable
{
results.Add(new(Status.ERROR, obj, null, null, ex));
}
onOperationProgressed.Report(new("Converting", (double)++count / objectsToConvert.Count));
}
// 2.1. Group conversionTrackers (to write into datasets)
onOperationProgressed.Report(new("Grouping features into layers", null));
Dictionary<string, List<(TraversalContext, ObjectConversionTracker)>> convertedGroups = await QueuedTask
.Run(async () =>
{
return await _featureClassUtils
.GroupConversionTrackers(conversionTracker, (s, progres) => onOperationProgressed.Report(new(s, progres)))
.ConfigureAwait(false);
})
.ConfigureAwait(false);
// 2.2. Write groups of objects to Datasets
onOperationProgressed.Report(new("Writing to Database", null));
await QueuedTask
.Run(async () =>
{
await _featureClassUtils
.CreateDatasets(
conversionTracker,
convertedGroups,
(s, progres) => onOperationProgressed.Report(new(s, progres))
)
.ConfigureAwait(false);
})
.ConfigureAwait(false);
// 3. add layer and tables to the Map and Table Of Content
// Create placeholder for GroupLayers
Dictionary<string, GroupLayer> createdLayerGroups = new();
int bakeCount = 0;
Dictionary<string, (MapMember, CIMUniqueValueRenderer?)> bakedMapMembers = new();
onOperationProgressed.Report(new("Adding to Map", bakeCount));
foreach (var item in conversionTracker)
{
cancellationToken.ThrowIfCancellationRequested();
var trackerItem = conversionTracker[item.Key]; // updated tracker object
// BAKE OBJECTS HERE
if (trackerItem.Exception != null)
{
results.Add(new(Status.ERROR, trackerItem.Base, null, null, trackerItem.Exception));
}
else if (trackerItem.DatasetId == null)
{
results.Add(
new(
Status.ERROR,
trackerItem.Base,
null,
null,
new ArgumentException($"Unknown error: Dataset not created for {trackerItem.Base.speckle_type}")
)
);
}
else if (bakedMapMembers.TryGetValue(trackerItem.DatasetId, out var value))
{
// if the layer already created, just add more features to report, and more color categories
// add layer and layer URI to tracker
trackerItem.AddConvertedMapMember(value.Item1);
trackerItem.AddLayerURI(value.Item1.URI);
conversionTracker[item.Key] = trackerItem; // not necessary atm, but needed if we use conversionTracker further
// add color category
CIMUniqueValueRenderer? uvr = _colorManager.CreateOrEditLayerRenderer(item.Key, trackerItem, value.Item2);
// replace renderer
bakedMapMembers[trackerItem.DatasetId] = (value.Item1, uvr);
// only add a report item
AddResultsFromTracker(trackerItem, results);
}
else
{
// no layer yet, create and add layer to Map
MapMember mapMember = await AddDatasetsToMap(trackerItem, createdLayerGroups, projectName, modelName)
.ConfigureAwait(false);
// add layer and layer URI to tracker
trackerItem.AddConvertedMapMember(mapMember);
trackerItem.AddLayerURI(mapMember.URI);
conversionTracker[item.Key] = trackerItem; // not necessary atm, but needed if we use conversionTracker further
// add layer URI to bakedIds
bakedObjectIds.Add(trackerItem.MappedLayerURI == null ? "" : trackerItem.MappedLayerURI);
// add color category
CIMUniqueValueRenderer? uvr = _colorManager.CreateOrEditLayerRenderer(item.Key, trackerItem, null);
// mark dataset as already created
bakedMapMembers[trackerItem.DatasetId] = (mapMember, uvr);
// add report item
AddResultsFromTracker(trackerItem, results);
}
onOperationProgressed.Report(new("Adding to Map", (double)++bakeCount / conversionTracker.Count));
}
// apply renderers to baked layers
foreach (var bakedMember in bakedMapMembers)
{
if (bakedMember.Value.Item1 is FeatureLayer fLayer)
{
// Set the feature layer's renderer.
await QueuedTask.Run(() => fLayer.SetRenderer(bakedMember.Value.Item2)).ConfigureAwait(false);
}
}
bakedObjectIds.AddRange(createdLayerGroups.Values.Select(x => x.URI));
// TODO: validated a correct set regarding bakedobject ids
return new(bakedObjectIds, results);
}
private IReadOnlyCollection<LocalToGlobalMap> GetObjectsToConvert(Base rootObject)
{
// keep GISlayers in the list, because they are still needed to extract CRS of the commit (code below)
List<TraversalContext> objectsToConvertTc = _traverseFunction.Traverse(rootObject).ToList();
// now filter the objects
objectsToConvertTc = objectsToConvertTc.Where(ctx => ctx.Current is not Collection).ToList();
var instanceDefinitionProxies = (rootObject[ProxyKeys.INSTANCE_DEFINITION] as List<object>)
?.Cast<InstanceDefinitionProxy>()
.ToList();
return _localToGlobalUnpacker.Unpack(instanceDefinitionProxies, objectsToConvertTc);
}
private void AddResultsFromTracker(ObjectConversionTracker trackerItem, List<ReceiveConversionResult> results)
{
if (trackerItem.MappedLayerURI == null) // should not happen
{
results.Add(
new(
Status.ERROR,
trackerItem.Base,
null,
null,
new ArgumentException($"Created Layer URI not found for {trackerItem.Base.speckle_type}")
)
);
}
else
{
// encode layer ID and ID of its feature in 1 object represented as string
ObjectID objectId = new(trackerItem.MappedLayerURI, trackerItem.DatasetRow);
if (trackerItem.HostAppGeom != null) // individual hostAppGeometry
{
results.Add(
new(
Status.SUCCESS,
trackerItem.Base,
objectId.ObjectIdToString(),
trackerItem.HostAppGeom.GetType().ToString()
)
);
}
else // hostApp Layers
{
results.Add(
new(
Status.SUCCESS,
trackerItem.Base,
objectId.ObjectIdToString(),
trackerItem.HostAppMapMember?.GetType().ToString()
)
);
}
}
}
private async Task<MapMember> AddDatasetsToMap(
ObjectConversionTracker trackerItem,
Dictionary<string, GroupLayer> createdLayerGroups,
string projectName,
string modelName
)
{
return await QueuedTask
.Run(() =>
{
// get layer details
string? datasetId = trackerItem.DatasetId; // should not be null here
Uri uri = new($"{_settingsStore.Current.SpeckleDatabasePath.AbsolutePath.Replace('/', '\\')}\\{datasetId}");
string nestedLayerName = trackerItem.NestedLayerName;
// add group for the current layer
string shortName = nestedLayerName.Split("\\")[^1];
string nestedLayerPath = string.Join("\\", nestedLayerName.Split("\\").SkipLast(1));
// if no general group layer found
if (createdLayerGroups.Count == 0)
{
Map map = _settingsStore.Current.Map;
GroupLayer mainGroupLayer = LayerFactory.Instance.CreateGroupLayer(map, 0, $"{projectName}: {modelName}");
mainGroupLayer.SetExpanded(true);
createdLayerGroups["Basic Speckle Group"] = mainGroupLayer; // key doesn't really matter here
}
var groupLayer = CreateNestedGroupLayer(nestedLayerPath, createdLayerGroups);
// Most of the Speckle-written datasets will be containing geometry and added as Layers
// although, some datasets might be just tables (e.g. native GIS Tables, in the future maybe Revit schedules etc.
// We can create a connection to the dataset in advance and determine its type, but this will be more
// expensive, than assuming by default that it's a layer with geometry (which in most cases it's expected to be)
try
{
var layer = LayerFactory.Instance.CreateLayer(uri, groupLayer, layerName: shortName);
if (layer == null)
{
throw new SpeckleException($"Layer '{shortName}' was not created");
}
layer.SetExpanded(false);
// if Scene
// https://community.esri.com/t5/arcgis-pro-sdk-questions/sdk-equivalent-to-changing-layer-s-elevation/td-p/1346139
if (_settingsStore.Current.Map.IsScene)
{
var groundSurfaceLayer = _settingsStore.Current.Map.GetGroundElevationSurfaceLayer();
var layerElevationSurface = new CIMLayerElevationSurface
{
ElevationSurfaceLayerURI = groundSurfaceLayer.URI,
};
// for Feature Layers
if (layer.GetDefinition() is CIMFeatureLayer cimLyr)
{
cimLyr.LayerElevation = layerElevationSurface;
layer.SetDefinition(cimLyr);
}
}
return (MapMember)layer;
}
catch (ArgumentException)
{
StandaloneTable table = StandaloneTableFactory.Instance.CreateStandaloneTable(
uri,
groupLayer,
tableName: shortName
);
return table;
}
})
.ConfigureAwait(false);
}
private GroupLayer CreateNestedGroupLayer(string nestedLayerPath, Dictionary<string, GroupLayer> createdLayerGroups)
{
GroupLayer lastGroup = createdLayerGroups.FirstOrDefault().Value;
if (lastGroup == null) // if layer not found
{
throw new InvalidOperationException("Speckle Layer Group not found");
}
// iterate through each nested level
string createdGroupPath = "";
var allPathElements = nestedLayerPath.Split("\\").Where(x => !string.IsNullOrEmpty(x));
foreach (string pathElement in allPathElements)
{
createdGroupPath += "\\" + pathElement;
if (createdLayerGroups.TryGetValue(createdGroupPath, out var existingGroupLayer))
{
lastGroup = existingGroupLayer;
}
else
{
// create new GroupLayer under last found Group, named with last pathElement
lastGroup = LayerFactory.Instance.CreateGroupLayer(lastGroup, 0, pathElement);
lastGroup.SetExpanded(true);
}
createdLayerGroups[createdGroupPath] = lastGroup;
}
return lastGroup;
}
[Pure]
private static string[] GetLayerPath(TraversalContext context)
{
string[] collectionBasedPath = context.GetAscendantOfType<Collection>().Select(c => c.name).ToArray();
string[] reverseOrderPath =
collectionBasedPath.Length != 0 ? collectionBasedPath : context.GetPropertyPath().ToArray();
var originalPath = reverseOrderPath.Reverse().ToArray();
return originalPath.Where(x => !string.IsNullOrEmpty(x)).ToArray();
}
}
@@ -1,293 +0,0 @@
using System.Diagnostics.Contracts;
using ArcGIS.Desktop.Mapping;
using Speckle.Connectors.Utils.Builders;
using Speckle.Converters.Common;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Converters.ArcGIS3.Utils;
using ArcGIS.Core.Geometry;
using Objects.GIS;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Core.Models.GraphTraversal;
using Speckle.Converters.ArcGIS3;
using RasterLayer = Objects.GIS.RasterLayer;
using Speckle.Connectors.ArcGIS.Utils;
namespace Speckle.Connectors.ArcGIS.Operations.Receive;
public class ArcGISHostObjectBuilder : IHostObjectBuilder
{
private readonly IRootToHostConverter _converter;
private readonly INonNativeFeaturesUtils _nonGisFeaturesUtils;
// POC: figure out the correct scope to only initialize on Receive
private readonly IConversionContextStack<ArcGISDocument, Unit> _contextStack;
private readonly GraphTraversal _traverseFunction;
public ArcGISHostObjectBuilder(
IRootToHostConverter converter,
IConversionContextStack<ArcGISDocument, Unit> contextStack,
INonNativeFeaturesUtils nonGisFeaturesUtils,
GraphTraversal traverseFunction
)
{
_converter = converter;
_contextStack = contextStack;
_nonGisFeaturesUtils = nonGisFeaturesUtils;
_traverseFunction = traverseFunction;
}
public HostObjectBuilderResult Build(
Base rootObject,
string projectName,
string modelName,
Action<string, double?>? onOperationProgressed,
CancellationToken cancellationToken
)
{
// Prompt the UI conversion started. Progress bar will swoosh.
onOperationProgressed?.Invoke("Converting", null);
var objectsToConvert = _traverseFunction
.Traverse(rootObject)
.Where(ctx => ctx.Current is not Collection || IsGISType(ctx.Current))
.Where(ctx => HasGISParent(ctx) is false)
.ToList();
int allCount = objectsToConvert.Count;
int count = 0;
Dictionary<TraversalContext, ObjectConversionTracker> conversionTracker = new();
// 1. convert everything
List<ReceiveConversionResult> results = new(objectsToConvert.Count);
List<string> bakedObjectIds = new();
foreach (TraversalContext ctx in objectsToConvert)
{
string[] path = GetLayerPath(ctx);
Base obj = ctx.Current;
cancellationToken.ThrowIfCancellationRequested();
try
{
if (IsGISType(obj))
{
string nestedLayerPath = $"{string.Join("\\", path)}";
string datasetId = (string)_converter.Convert(obj);
conversionTracker[ctx] = new ObjectConversionTracker(obj, nestedLayerPath, datasetId);
}
else
{
string nestedLayerPath = $"{string.Join("\\", path)}\\{obj.speckle_type.Split(".")[^1]}";
Geometry converted = (Geometry)_converter.Convert(obj);
conversionTracker[ctx] = new ObjectConversionTracker(obj, nestedLayerPath, converted);
}
}
catch (Exception ex) when (!ex.IsFatal()) // DO NOT CATCH SPECIFIC STUFF, conversion errors should be recoverable
{
results.Add(new(Status.ERROR, obj, null, null, ex));
}
onOperationProgressed?.Invoke("Converting", (double)++count / allCount);
}
// 2. convert Database entries with non-GIS geometry datasets
onOperationProgressed?.Invoke("Writing to Database", null);
_nonGisFeaturesUtils.WriteGeometriesToDatasets(conversionTracker);
// Create main group layer
Dictionary<string, GroupLayer> createdLayerGroups = new();
Map map = _contextStack.Current.Document.Map;
GroupLayer groupLayer = LayerFactory.Instance.CreateGroupLayer(map, 0, $"{projectName}: {modelName}");
createdLayerGroups["Basic Speckle Group"] = groupLayer; // key doesn't really matter here
// 3. add layer and tables to the Table Of Content
int bakeCount = 0;
Dictionary<string, MapMember> bakedMapMembers = new();
onOperationProgressed?.Invoke("Adding to Map", bakeCount);
foreach (var item in conversionTracker)
{
cancellationToken.ThrowIfCancellationRequested();
var trackerItem = conversionTracker[item.Key]; // updated tracker object
// BAKE OBJECTS HERE
if (trackerItem.Exception != null)
{
results.Add(new(Status.ERROR, trackerItem.Base, null, null, trackerItem.Exception));
}
else if (trackerItem.DatasetId == null)
{
results.Add(
new(
Status.ERROR,
trackerItem.Base,
null,
null,
new ArgumentException($"Unknown error: Dataset not created for {trackerItem.Base.speckle_type}")
)
);
}
else if (bakedMapMembers.TryGetValue(trackerItem.DatasetId, out MapMember? value))
{
// add layer and layer URI to tracker
trackerItem.AddConvertedMapMember(value);
trackerItem.AddLayerURI(value.URI);
conversionTracker[item.Key] = trackerItem; // not necessary atm, but needed if we use conversionTracker further
// only add a report item
AddResultsFromTracker(trackerItem, results);
}
else
{
// add layer to Map
MapMember mapMember = AddDatasetsToMap(trackerItem, createdLayerGroups);
// add layer and layer URI to tracker
trackerItem.AddConvertedMapMember(mapMember);
trackerItem.AddLayerURI(mapMember.URI);
conversionTracker[item.Key] = trackerItem; // not necessary atm, but needed if we use conversionTracker further
// add layer URI to bakedIds
bakedObjectIds.Add(trackerItem.MappedLayerURI == null ? "" : trackerItem.MappedLayerURI);
// mark dataset as already created
bakedMapMembers[trackerItem.DatasetId] = mapMember;
// add report item
AddResultsFromTracker(trackerItem, results);
}
onOperationProgressed?.Invoke("Adding to Map", (double)++bakeCount / conversionTracker.Count);
}
bakedObjectIds.AddRange(createdLayerGroups.Values.Select(x => x.URI));
// TODO: validated a correct set regarding bakedobject ids
return new(bakedObjectIds, results);
}
private void AddResultsFromTracker(ObjectConversionTracker trackerItem, List<ReceiveConversionResult> results)
{
if (trackerItem.MappedLayerURI == null) // should not happen
{
results.Add(
new(
Status.ERROR,
trackerItem.Base,
null,
null,
new ArgumentException($"Created Layer URI not found for {trackerItem.Base.speckle_type}")
)
);
}
else
{
// encode layer ID and ID of its feature in 1 object represented as string
ObjectID objectId = new(trackerItem.MappedLayerURI, trackerItem.DatasetRow);
if (trackerItem.HostAppGeom != null) // individual hostAppGeometry
{
results.Add(
new(
Status.SUCCESS,
trackerItem.Base,
objectId.ObjectIdToString(),
trackerItem.HostAppGeom.GetType().ToString()
)
);
}
else // hostApp Layers
{
results.Add(
new(
Status.SUCCESS,
trackerItem.Base,
objectId.ObjectIdToString(),
trackerItem.HostAppMapMember?.GetType().ToString()
)
);
}
}
}
private MapMember AddDatasetsToMap(
ObjectConversionTracker trackerItem,
Dictionary<string, GroupLayer> createdLayerGroups
)
{
// get layer details
string? datasetId = trackerItem.DatasetId; // should not ne null here
Uri uri = new($"{_contextStack.Current.Document.SpeckleDatabasePath.AbsolutePath.Replace('/', '\\')}\\{datasetId}");
string nestedLayerName = trackerItem.NestedLayerName;
// add group for the current layer
string shortName = nestedLayerName.Split("\\")[^1];
string nestedLayerPath = string.Join("\\", nestedLayerName.Split("\\").SkipLast(1));
GroupLayer groupLayer = CreateNestedGroupLayer(nestedLayerPath, createdLayerGroups);
// Most of the Speckle-written datasets will be containing geometry and added as Layers
// although, some datasets might be just tables (e.g. native GIS Tables, in the future maybe Revit schedules etc.
// We can create a connection to the dataset in advance and determine its type, but this will be more
// expensive, than assuming by default that it's a layer with geometry (which in most cases it's expected to be)
try
{
var layer = LayerFactory.Instance.CreateLayer(uri, groupLayer, layerName: shortName);
layer.SetExpanded(true);
return layer;
}
catch (ArgumentException)
{
var table = StandaloneTableFactory.Instance.CreateStandaloneTable(uri, groupLayer, tableName: shortName);
return table;
}
}
private GroupLayer CreateNestedGroupLayer(string nestedLayerPath, Dictionary<string, GroupLayer> createdLayerGroups)
{
GroupLayer lastGroup = createdLayerGroups.FirstOrDefault().Value;
if (lastGroup == null) // if layer not found
{
throw new InvalidOperationException("Speckle Layer Group not found");
}
// iterate through each nested level
string createdGroupPath = "";
var allPathElements = nestedLayerPath.Split("\\").Where(x => !string.IsNullOrEmpty(x));
foreach (string pathElement in allPathElements)
{
createdGroupPath += "\\" + pathElement;
if (createdLayerGroups.TryGetValue(createdGroupPath, out var existingGroupLayer))
{
lastGroup = existingGroupLayer;
}
else
{
// create new GroupLayer under last found Group, named with last pathElement
lastGroup = LayerFactory.Instance.CreateGroupLayer(lastGroup, 0, pathElement);
lastGroup.SetExpanded(true);
}
createdLayerGroups[createdGroupPath] = lastGroup;
}
return lastGroup;
}
[Pure]
private static string[] GetLayerPath(TraversalContext context)
{
string[] collectionBasedPath = context.GetAscendantOfType<Collection>().Select(c => c.name).ToArray();
string[] reverseOrderPath =
collectionBasedPath.Length != 0 ? collectionBasedPath : context.GetPropertyPath().ToArray();
var originalPath = reverseOrderPath.Reverse().ToArray();
return originalPath.Where(x => !string.IsNullOrEmpty(x)).ToArray();
}
[Pure]
private static bool HasGISParent(TraversalContext context)
{
List<Base> gisLayers = context.GetAscendants().Where(IsGISType).Where(obj => obj != context.Current).ToList();
return gisLayers.Count > 0;
}
[Pure]
private static bool IsGISType(Base obj)
{
return obj is RasterLayer or VectorLayer;
}
}
@@ -1,87 +1,295 @@
using System.Diagnostics;
using ArcGIS.Desktop.Mapping;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Connectors.Utils.Operations;
using ArcGIS.Core.Data.Raster;
using ArcGIS.Core.Geometry;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.ArcGIS.HostApp;
using Speckle.Connectors.ArcGIS.HostApp.Extensions;
using Speckle.Connectors.ArcGIS.Utils;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Extensions;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.ArcGIS3;
using Speckle.Converters.Common;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Sdk;
using Speckle.Sdk.Logging;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.ArcGis.Operations.Send;
/// <summary>
/// Stateless builder object to turn an ISendFilter into a <see cref="Base"/> object
/// </summary>
public class ArcGISRootObjectBuilder : IRootObjectBuilder<MapMember>
public class ArcGISRootObjectBuilder : IRootObjectBuilder<ADM.MapMember>
{
private readonly IUnitOfWorkFactory _unitOfWorkFactory;
private readonly IRootToSpeckleConverter _rootToSpeckleConverter;
private readonly ISendConversionCache _sendConversionCache;
private readonly ArcGISLayerUnpacker _layerUnpacker;
private readonly ArcGISColorUnpacker _colorUnpacker;
private readonly IConverterSettingsStore<ArcGISConversionSettings> _converterSettings;
private readonly ILogger<ArcGISRootObjectBuilder> _logger;
private readonly ISdkActivityFactory _activityFactory;
private readonly MapMembersUtils _mapMemberUtils;
public ArcGISRootObjectBuilder(IUnitOfWorkFactory unitOfWorkFactory, ISendConversionCache sendConversionCache)
public ArcGISRootObjectBuilder(
ISendConversionCache sendConversionCache,
ArcGISLayerUnpacker layerUnpacker,
ArcGISColorUnpacker colorUnpacker,
IConverterSettingsStore<ArcGISConversionSettings> converterSettings,
IRootToSpeckleConverter rootToSpeckleConverter,
ILogger<ArcGISRootObjectBuilder> logger,
ISdkActivityFactory activityFactory,
MapMembersUtils mapMemberUtils
)
{
_unitOfWorkFactory = unitOfWorkFactory;
_sendConversionCache = sendConversionCache;
_layerUnpacker = layerUnpacker;
_colorUnpacker = colorUnpacker;
_converterSettings = converterSettings;
_rootToSpeckleConverter = rootToSpeckleConverter;
_logger = logger;
_activityFactory = activityFactory;
_mapMemberUtils = mapMemberUtils;
}
public RootObjectBuilderResult Build(
IReadOnlyList<MapMember> objects,
public async Task<RootObjectBuilderResult> Build(
IReadOnlyList<ADM.MapMember> layers,
SendInfo sendInfo,
Action<string, double?>? onOperationProgressed = null,
IProgress<CardProgress> onOperationProgressed,
CancellationToken ct = default
)
{
// POC: does this feel like the right place? I am wondering if this should be called from within send/rcv?
// begin the unit of work
using var uow = _unitOfWorkFactory.Resolve<IRootToSpeckleConverter>();
var converter = uow.Service;
// TODO: add a warning if Geographic CRS is set
// "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"
int count = 0;
Collection rootObjectCollection = new(); //TODO: Collections
// 0 - Create Root collection and attach CRS properties
// CRS properties are useful for data based workflows coming out of gis applications
SpatialReference sr = _converterSettings.Current.ActiveCRSoffsetRotation.SpatialReference;
Dictionary<string, object?> spatialReference =
new()
{
["name"] = sr.Name,
["unit"] = sr.Unit.Name,
["wkid"] = sr.Wkid,
["wkt"] = sr.Wkt,
};
List<SendConversionResult> results = new(objects.Count);
var cacheHitCount = 0;
Dictionary<string, object?> crs =
new()
{
["trueNorthRadians"] = _converterSettings.Current.ActiveCRSoffsetRotation.TrueNorthRadians,
["latOffset"] = _converterSettings.Current.ActiveCRSoffsetRotation.LatOffset,
["lonOffset"] = _converterSettings.Current.ActiveCRSoffsetRotation.LonOffset,
["spatialReference"] = spatialReference
};
foreach (MapMember mapMember in objects)
Collection rootCollection =
new()
{
name = ADM.MapView.Active.Map.Name,
["units"] = _converterSettings.Current.SpeckleUnits,
["crs"] = crs
};
// 1 - Unpack the selected mapmembers
// In Arcgis, mapmembers are collections of other mapmember or objects.
// We need to unpack the selected mapmembers into all leaf-level mapmembers (containing just objects) and build the root collection structure during unpacking.
// Mapmember dynamically attached properties are also added at this step.
List<ADM.MapMember> unpackedLayers;
ADM.Map map = ADM.MapView.Active.Map;
IEnumerable<ADM.MapMember> layersOrdered = _mapMemberUtils.GetMapMembersInOrder(map, layers);
using (var _ = _activityFactory.Start("Unpacking selection"))
{
ct.ThrowIfCancellationRequested();
var collectionHost = rootObjectCollection;
var applicationId = mapMember.URI;
try
{
Base converted;
if (_sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference value))
{
converted = value;
cacheHitCount++;
}
else
{
converted = converter.Convert(mapMember);
converted.applicationId = applicationId;
}
// add to host
collectionHost.elements.Add(converted);
results.Add(new(Status.SUCCESS, applicationId, mapMember.GetType().Name, converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
results.Add(new(Status.ERROR, applicationId, mapMember.GetType().Name, null, ex));
// POC: add logging
}
onOperationProgressed?.Invoke("Converting", (double)++count / objects.Count);
unpackedLayers = await QueuedTask
.Run(() => _layerUnpacker.UnpackSelectionAsync(layersOrdered, rootCollection))
.ConfigureAwait(false);
}
// POC: Log would be nice, or can be removed.
Debug.WriteLine(
$"Cache hit count {cacheHitCount} out of {objects.Count} ({(double)cacheHitCount / objects.Count})"
);
List<SendConversionResult> results = new(unpackedLayers.Count);
onOperationProgressed.Report(new("Converting", null));
using (var convertingActivity = _activityFactory.Start("Converting objects"))
{
int count = 0;
foreach (ADM.MapMember layer in unpackedLayers)
{
ct.ThrowIfCancellationRequested();
string layerApplicationId = layer.GetSpeckleApplicationId();
return new(rootObjectCollection, results);
try
{
// get the corresponding collection for this layer - we'll add all converted objects to the collection
if (_layerUnpacker.CollectionCache.TryGetValue(layerApplicationId, out Collection? layerCollection))
{
var status = Status.SUCCESS;
var sdkStatus = SdkActivityStatusCode.Ok;
// TODO: check cache first to see if this layer was previously converted
/*
if (_sendConversionCache.TryGetValue(
sendInfo.ProjectId,
layerApplicationId,
out ObjectReference? value
))
{
}
*/
switch (layer)
{
case ADM.FeatureLayer featureLayer:
List<Base> convertedFeatureLayerObjects = await QueuedTask
.Run(() => ConvertFeatureLayerObjectsAsync(featureLayer))
.ConfigureAwait(false);
layerCollection.elements.AddRange(convertedFeatureLayerObjects);
break;
case ADM.RasterLayer rasterLayer:
List<Base> convertedRasterLayerObjects = await QueuedTask
.Run(() => ConvertRasterLayerObjectsAsync(rasterLayer))
.ConfigureAwait(false);
layerCollection.elements.AddRange(convertedRasterLayerObjects);
break;
case ADM.LasDatasetLayer lasDatasetLayer:
List<Base> convertedLasDatasetObjects = await QueuedTask
.Run(() => ConvertLasDatasetLayerObjectsAsync(lasDatasetLayer))
.ConfigureAwait(false);
layerCollection.elements.AddRange(convertedLasDatasetObjects);
break;
default:
status = Status.ERROR;
sdkStatus = SdkActivityStatusCode.Error;
break;
}
results.Add(new(status, layerApplicationId, layer.GetType().Name, layerCollection));
convertingActivity?.SetStatus(sdkStatus);
}
else
{
throw new SpeckleException($"No converted Collection found for layer {layerApplicationId}.");
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogSendConversionError(ex, layer.GetType().Name);
results.Add(new(Status.ERROR, layerApplicationId, layer.GetType().Name, null, ex));
convertingActivity?.SetStatus(SdkActivityStatusCode.Error);
convertingActivity?.RecordException(ex);
}
onOperationProgressed.Report(new("Converting", (double)++count / layers.Count));
}
}
if (results.All(x => x.Status == Status.ERROR))
{
throw new SpeckleException("Failed to convert all objects."); // fail fast instead creating empty commit! It will appear as model card error with red color.
}
// 3 - Add Color Proxies
rootCollection[ProxyKeys.COLOR] = _colorUnpacker.ColorProxyCache.Values.ToList();
return new RootObjectBuilderResult(rootCollection, results);
}
private async Task<List<Base>> ConvertFeatureLayerObjectsAsync(ADM.FeatureLayer featureLayer)
{
string layerApplicationId = featureLayer.GetSpeckleApplicationId();
List<Base> convertedObjects = new();
await QueuedTask
.Run(() =>
{
// store the layer renderer for color unpacking
_colorUnpacker.StoreRendererAndFields(featureLayer);
// search the rows of the layer, where each row is treated like an object
// RowCursor is IDisposable but is not being correctly picked up by IDE warnings.
// This means we need to be carefully adding using statements based on the API documentation coming from each method/class
using (ACD.RowCursor rowCursor = featureLayer.Search())
{
while (rowCursor.MoveNext())
{
// Same IDisposable issue appears to happen on Row class too. Docs say it should always be disposed of manually by the caller.
using (ACD.Row row = rowCursor.Current)
{
// get application id. test for subtypes before defaulting to base type.
Base converted = _rootToSpeckleConverter.Convert(row);
string applicationId = row.GetSpeckleApplicationId(layerApplicationId);
converted.applicationId = applicationId;
convertedObjects.Add(converted);
// process the object color
_colorUnpacker.ProcessFeatureLayerColor(row, applicationId);
}
}
}
})
.ConfigureAwait(false);
return convertedObjects;
}
// POC: raster colors are stored as mesh vertex colors in RasterToSpeckleConverter. Should probably move to color unpacker.
private async Task<List<Base>> ConvertRasterLayerObjectsAsync(ADM.RasterLayer rasterLayer)
{
string layerApplicationId = rasterLayer.GetSpeckleApplicationId();
List<Base> convertedObjects = new();
await QueuedTask
.Run(() =>
{
Raster raster = rasterLayer.GetRaster();
Base converted = _rootToSpeckleConverter.Convert(raster);
string applicationId = raster.GetSpeckleApplicationId(layerApplicationId);
converted.applicationId = applicationId;
convertedObjects.Add(converted);
})
.ConfigureAwait(false);
return convertedObjects;
}
private async Task<List<Base>> ConvertLasDatasetLayerObjectsAsync(ADM.LasDatasetLayer lasDatasetLayer)
{
string layerApplicationId = lasDatasetLayer.GetSpeckleApplicationId();
List<Base> convertedObjects = new();
try
{
await QueuedTask
.Run(() =>
{
// store the layer renderer for color unpacking
_colorUnpacker.StoreRenderer(lasDatasetLayer);
using (
ACD.Analyst3D.LasPointCursor ptCursor = lasDatasetLayer.SearchPoints(new ACD.Analyst3D.LasPointFilter())
)
{
while (ptCursor.MoveNext())
{
using (ACD.Analyst3D.LasPoint pt = ptCursor.Current)
{
Base converted = _rootToSpeckleConverter.Convert(pt);
string applicationId = pt.GetSpeckleApplicationId(layerApplicationId);
converted.applicationId = applicationId;
convertedObjects.Add(converted);
// process the object color
_colorUnpacker.ProcessLasLayerColor(pt, applicationId);
}
}
}
})
.ConfigureAwait(false);
}
catch (ACD.Exceptions.TinException ex)
{
throw new SpeckleException("3D analyst extension is not enabled for .las layer operations", ex);
}
return convertedObjects;
}
}
@@ -1,9 +1,14 @@
{
"profiles": {
"Speckle.Connectors.ArcGIS3": {
"Speckle.Connectors.ArcGIS3_all_users": {
"commandName": "Executable",
"executablePath": "C:\\Program Files\\ArcGIS\\Pro\\bin\\ArcGISPro.exe",
"commandLineArgs": ""
},
"Speckle.Connectors.ArcGIS3_user": {
"commandName": "Executable",
"executablePath": "C:\\Users\\%USERNAME%\\AppData\\Local\\Programs\\ArcGIS\\Pro\\bin\\ArcGISPro.exe",
"commandLineArgs": ""
}
}
}
@@ -9,29 +9,28 @@
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<DefineConstants>$(DefineConstants);ARCGIS3</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
</PropertyGroup>
<ItemGroup>
<Content Include="Config.daml"/>
<Content Include="Images\s2logo_16.png"/>
<Content Include="Images\s2logo_32.png"/>
<Content Include="DarkImages\s2logo_16.png"/>
<Content Include="DarkImages\s2logo_32.png"/>
<Content Include="Config.daml" />
<Content Include="Images\s2logo_16.png" />
<Content Include="Images\s2logo_32.png" />
<Content Include="DarkImages\s2logo_16.png" />
<Content Include="DarkImages\s2logo_32.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Esri.ArcGISPro.Extensions30" IncludeAssets="compile"/>
<PackageReference Include="Esri.ArcGISPro.Extensions30" IncludeAssets="compile" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
</ItemGroup>
<ItemGroup>
<ProjectReference
Include="..\..\..\Converters\ArcGIS\Speckle.Converters.ArcGIS3.DependencyInjection\Speckle.Converters.ArcGIS3.DependencyInjection.csproj"/>
<ProjectReference
Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj"/>
<ProjectReference
Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj"/>
<ProjectReference Include="..\..\..\Converters\ArcGIS\Speckle.Converters.ArcGIS3\Speckle.Converters.ArcGIS3.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Common\Speckle.Connectors.Common.csproj" />
</ItemGroup>
<Import Project="Esri.ArcGISPro.Extensions30.Speckle.targets"/>
<Import Project="Esri.ArcGISPro.Extensions30.Speckle.targets" />
</Project>
@@ -1,4 +1,5 @@
using System.Windows.Controls;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.DUI.WebView;
namespace Speckle.Connectors.ArcGIS;
@@ -12,6 +13,6 @@ public class SpeckleDUI3Wrapper : UserControl
private void Initialize()
{
Content = SpeckleModule.Current.Container.Resolve<DUI3ControlWebView>();
Content = SpeckleModule.Current.Container.GetRequiredService<DUI3ControlWebView>();
}
}
@@ -1,9 +1,10 @@
using System.Reflection;
using ArcGIS.Desktop.Framework;
using Speckle.Autofac;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.ArcGIS.HostApp;
using Speckle.Core.Kits;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.ArcGIS.DependencyInjection;
using Speckle.Connectors.Common;
using Speckle.Connectors.DUI;
using Speckle.Converters.ArcGIS3;
using Speckle.Sdk.Host;
using Module = ArcGIS.Desktop.Framework.Contracts.Module;
namespace Speckle.Connectors.ArcGIS;
@@ -14,6 +15,7 @@ namespace Speckle.Connectors.ArcGIS;
internal sealed class SpeckleModule : Module
{
private static SpeckleModule? s_this;
private readonly IDisposable? _disposableLogger;
/// <summary>
/// Retrieve the singleton instance to this module here
@@ -21,21 +23,28 @@ internal sealed class SpeckleModule : Module
public static SpeckleModule Current =>
s_this ??= (SpeckleModule)FrameworkApplication.FindModule("ConnectorArcGIS_Module");
public SpeckleContainer Container { get; }
public ServiceProvider Container { get; }
public SpeckleModule()
{
AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver.OnAssemblyResolve<SpeckleModule>;
var builder = SpeckleContainerBuilder.CreateInstance();
var services = new ServiceCollection();
// init DI
_disposableLogger = services.Initialize(HostApplications.ArcGIS, GetVersion());
services.AddArcGIS();
services.AddArcGISConverters();
Container = services.BuildServiceProvider();
Container.UseDUI();
}
// Register Settings
var arcgisSettings = new ArcGISSettings(HostApplications.ArcGIS, HostAppVersion.v3);
Container = builder
.LoadAutofacModules(Assembly.GetExecutingAssembly(), arcgisSettings.Modules)
.AddSingleton(arcgisSettings)
.Build();
private HostAppVersion GetVersion()
{
#if ARCGIS3
return HostAppVersion.v3;
#else
throw new NotImplementedException();
#endif
}
/// <summary>
@@ -46,6 +55,8 @@ internal sealed class SpeckleModule : Module
{
//TODO - add your business logic
//return false to ~cancel~ Application close
_disposableLogger?.Dispose();
Container.Dispose();
return true;
}
}
@@ -5,18 +5,14 @@ using ArcGIS.Desktop.Mapping;
using ArcGIS.Desktop.Mapping.Events;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Utils;
using Speckle.Newtonsoft.Json;
using Speckle.Connectors.DUI.Utils;
namespace Speckle.Connectors.ArcGIS.Utils;
public class ArcGISDocumentStore : DocumentModelStore
{
public ArcGISDocumentStore(
JsonSerializerSettings serializerOption,
ITopLevelExceptionHandler topLevelExceptionHandler
)
: base(serializerOption, true)
public ArcGISDocumentStore(IJsonSerializer jsonSerializer, ITopLevelExceptionHandler topLevelExceptionHandler)
: base(jsonSerializer)
{
ActiveMapViewChangedEvent.Subscribe(a => topLevelExceptionHandler.CatchUnhandled(() => OnMapViewChanged(a)), true);
ProjectSavingEvent.Subscribe(
@@ -37,10 +33,10 @@ public class ArcGISDocumentStore : DocumentModelStore
);
// in case plugin was loaded into already opened Map, read metadata from the current Map
if (IsDocumentInit == false && MapView.Active != null)
if (!IsDocumentInit && MapView.Active != null)
{
IsDocumentInit = true;
ReadFromFile();
LoadState();
OnDocumentChanged();
}
}
@@ -52,14 +48,14 @@ public class ArcGISDocumentStore : DocumentModelStore
return;
}
WriteToFile();
SaveState();
}
private void OnProjectSaving()
{
if (MapView.Active is not null)
{
WriteToFile();
SaveState();
}
}
@@ -74,11 +70,11 @@ public class ArcGISDocumentStore : DocumentModelStore
}
IsDocumentInit = true;
ReadFromFile();
LoadState();
OnDocumentChanged();
}
public override void WriteToFile()
protected override void HostAppSaveState(string modelCardState)
{
Map map = MapView.Active.Map;
QueuedTask.Run(() =>
@@ -91,9 +87,7 @@ public class ArcGISDocumentStore : DocumentModelStore
? XDocument.Parse(existingMetadata)
: new XDocument(new XElement("metadata"));
string serializedModels = Serialize();
XElement xmlModelCards = new("SpeckleModelCards", serializedModels);
XElement xmlModelCards = new("SpeckleModelCards", modelCardState);
// Check if SpeckleModelCards element already exists at root and update it
var speckleModelCardsElement = existingXmlDocument.Root?.Element("SpeckleModelCards");
@@ -110,7 +104,7 @@ public class ArcGISDocumentStore : DocumentModelStore
});
}
public override void ReadFromFile()
protected override void LoadState()
{
Map map = MapView.Active.Map;
QueuedTask.Run(() =>
@@ -120,12 +114,12 @@ public class ArcGISDocumentStore : DocumentModelStore
var element = root?.Element("SpeckleModelCards");
if (element is null)
{
Models = new();
ClearAndSave();
return;
}
string modelsString = element.Value;
Models = Deserialize(modelsString).NotNull();
LoadFromString(modelsString);
});
}
}
@@ -0,0 +1,61 @@
using ArcGIS.Desktop.Mapping;
namespace Speckle.Connectors.ArcGIS.Utils;
public class MapMembersUtils
{
/// <summary>
/// Returns all Layers and Standalone Tables present on the Map
/// </summary>
/// <param name="map"></param>
/// <returns></returns>
public List<MapMember> GetAllMapMembers(Map map)
{
// first get all map layers
List<MapMember> mapMembers = new();
var layerMapMembers = UnpackMapLayers(map.Layers);
mapMembers.AddRange(layerMapMembers);
// add tables
var standaloneTableMapMembers = UnpackMapLayers(map.StandaloneTables);
mapMembers.AddRange(standaloneTableMapMembers);
return mapMembers;
}
public List<MapMember> UnpackMapLayers(IEnumerable<MapMember> mapMembersToUnpack)
{
List<MapMember> mapMembers = new();
foreach (var layer in mapMembersToUnpack)
{
mapMembers.Add(layer);
switch (layer)
{
case ILayerContainer subGroup:
var subLayerMapMembers = UnpackMapLayers(subGroup.Layers);
mapMembers.AddRange(subLayerMapMembers);
break;
}
}
return mapMembers;
}
/// <summary>
/// Sorts the selected mapmembers into the same order as they appear in the Table of Contents (TOC) bar in the file.
/// This is a required step before unpacking layers, because depending on the user selection order, some children layers may appear before their container layer if both the container and children layers are selected.
/// </summary>
public IEnumerable<MapMember> GetMapMembersInOrder(Map map, IReadOnlyList<MapMember> selectedMapMembers)
{
// first get all map layers
List<MapMember> allMapMembers = GetAllMapMembers(map);
// recalculate selected layer priority from all map layers
foreach (MapMember mapMember in allMapMembers)
{
if (selectedMapMembers.Contains(mapMember))
{
yield return mapMember;
}
}
}
}
@@ -10,9 +10,18 @@
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw=="
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net461": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
@@ -32,9 +41,9 @@
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
@@ -67,43 +76,10 @@
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.AspNetCore.Http": {
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "2.2.2",
"contentHash": "BAibpoItxI5puk7YJbIGj95arZueM8B8M5xT1fXBn3hb3L2G3ucrZcYXv1gXdaroLbntUs8qeV8iuBrpjQsrKw==",
"dependencies": {
"Microsoft.AspNetCore.Http.Abstractions": "2.2.0",
"Microsoft.AspNetCore.WebUtilities": "2.2.0",
"Microsoft.Extensions.ObjectPool": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0",
"Microsoft.Net.Http.Headers": "2.2.0"
}
},
"Microsoft.AspNetCore.Http.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "Nxs7Z1q3f1STfLYKJSVXCs1iBl+Ya6E8o4Oy1bCxJ/rNI44E/0f6tbsrVqAWfB7jlnJfyaAtIalBVxPKUPQb4Q==",
"dependencies": {
"Microsoft.AspNetCore.Http.Features": "2.2.0",
"System.Text.Encodings.Web": "4.5.0"
}
},
"Microsoft.AspNetCore.Http.Features": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "ziFz5zH8f33En4dX81LW84I6XrYXKf9jg6aM39cM+LffN9KJahViKZ61dGMSO2gd3e+qe5yBRwsesvyqlZaSMg==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.AspNetCore.WebUtilities": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "9ErxAAKaDzxXASB/b5uLEkLgUWv1QbeVxyJYEHQwMaxXOeFFVkQxiq8RyfVcifLU7NR0QY0p3acqx4ZpYfhHDg==",
"dependencies": {
"Microsoft.Net.Http.Headers": "2.2.0",
"System.Text.Encodings.Web": "4.5.0"
}
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
@@ -132,171 +108,68 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.DependencyInjection": {
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0"
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw=="
},
"Microsoft.Extensions.Logging": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0"
}
},
"Microsoft.Extensions.ObjectPool": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "gA8H7uQOnM5gb+L0uTNjViHYr+hRDqCdfugheGo/MxQnuHzmhhzCBTIPm19qL1z1Xe0NEMabfcOBGv9QghlZ8g=="
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.Net.Http.Headers": {
"Microsoft.NETFramework.ReferenceAssemblies.net461": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "iZNkjYqlo8sIOI0bQfpsSoMTmB/kyvmV2h225ihyZT33aTp48ZpF6qYnXxzSXmHt8DpBAwBTX+1s1UFLbYfZKg==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0",
"System.Buffers": "4.5.0"
}
"resolved": "1.0.3",
"contentHash": "AmOJZwCqnOCNp6PPcf9joyogScWLtwy0M1WkqfEQ0M9nYwyDD7EX9ZjscKS5iYnyvteX7kzSKFCKt9I9dXA6mA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Polly": {
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "7.2.3",
"contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"Polly.Extensions.Http": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==",
"dependencies": {
"Polly": "7.1.0"
}
},
"Sentry": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "8vbD2o6IR2wrRrkSiRbnodWGWUOqIlwYtzpjvPNOb5raJdOf+zxMwfS8f6nx9bmrTTfDj7KrCB8C/5OuicAc8A=="
},
"Sentry.Serilog": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "V8BU7QGWg2qLYfNPqtuTBhC1opysny5l+Ifp6J6PhOeAxU0FssR7nYfbJVetrnLIoh2rd3DlJ6hHYYQosQYcUQ==",
"dependencies": {
"Sentry": "3.33.0",
"Serilog": "2.10.0"
}
},
"Serilog": {
"type": "Transitive",
"resolved": "2.12.0",
"contentHash": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg=="
},
"Serilog.Enrichers.ClientInfo": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "mTc7PM+wC9Hr7LWSwqt5mmnlAr7RJs+eTb3PGPRhwdOackk95MkhUZognuxXEdlW19HAFNmEBTSBY5DfLwM8jQ==",
"dependencies": {
"Microsoft.AspNetCore.Http": "2.2.2",
"Serilog": "2.9.0"
}
},
"Serilog.Exceptions": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==",
"dependencies": {
"Serilog": "2.8.0",
"System.Reflection.TypeExtensions": "4.7.0"
}
},
"Serilog.Formatting.Compact": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Sinks.Console": {
"type": "Transitive",
"resolved": "4.1.0",
"contentHash": "K6N5q+5fetjnJPvCmkWOpJ/V8IEIoMIB1s86OzBrbxwTyHxdx3pmz4H+8+O/Dc/ftUX12DM1aynx/dDowkwzqg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.File": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.PeriodicBatching": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "NDWR7m3PalVlGEq3rzoktrXikjFMLmpwF0HI4sowo8YDdU+gqPlTHlDQiOGxHfB0sTfjPA9JjA7ctKG9zqjGkw==",
"dependencies": {
"Serilog": "2.0.0"
}
},
"Serilog.Sinks.Seq": {
"type": "Transitive",
"resolved": "5.2.2",
"contentHash": "1Csmo5ua7NKUe0yXUx+zsRefjAniPWcXFhUXxXG8pwo0iMiw2gjn9SOkgYnnxbgWqmlGv236w0N/dHc2v5XwMg==",
"dependencies": {
"Serilog": "2.12.0",
"Serilog.Formatting.Compact": "1.1.0",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.PeriodicBatching": "3.1.0"
}
},
"SerilogTimings": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "Zs28eTgszAMwpIrbBnWHBI50yuxL50p/dmAUWmy75+axdZYK/Sjm5/5m1N/CisR8acJUhTVcjPZrsB1P5iv0Uw==",
"dependencies": {
"Serilog": "2.10.0"
}
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
@@ -333,18 +206,10 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.Buffers": {
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "pL2ChpaRRWI/p4LXyy4RgeWlYF2sgfj/pnVMvBqwNFr5cXg7CXNnWZWxrOONLg8VGdFB8oB+EG2Qw4MLgTOe+A=="
},
"System.DoubleNumerics": {
"type": "Transitive",
"resolved": "3.1.3",
"contentHash": "KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
"dependencies": {
"NETStandard.Library": "1.6.1"
}
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
@@ -356,136 +221,114 @@
"resolved": "5.0.0",
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ=="
},
"System.Reflection.TypeExtensions": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "Xg4G4Indi4dqP1iuAiMSwpiWS54ZghzR644OtsRCm/m/lBMG8dUBhLVN7hLm8NNrNTR+iGbshCPTwrvxZPlm4g=="
},
"speckle.autofac": {
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )"
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.arcgis3": {
"type": "Project",
"dependencies": {
"Esri.ArcGISPro.Extensions30": "[3.2.0.49743, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"speckle.converters.arcgis3.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.ArcGIS3": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"Autofac": {
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[5.2.0, )",
"resolved": "5.2.0",
"contentHash": "V8dBH0dsv75uDzl7Sw+HkhKDPUw2eXnlMjcSVMH+tLo2s67MpTKGyDj1pDcpR+IF2u4YRs0s3/x7R88YJzIWvg=="
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1823.32, )",
"resolved": "1.0.1823.32",
"contentHash": "ppRcWBUNggFIqyJp7PfgS4Oe8/7yli/mHcTNDOaqo3ZzJWnv9AOr0WE9ceEP5SPs1M7CQ3QvdGMR7KNz0v09EA=="
},
"Serilog.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "9faU0zNQqU7I6soVhLUMYaGNpgWv6cKlKb2S5AnS8gXxzW/em5Ladm/6FMrWTnX41cdbdGPOWNAo6adi4WaJ6A==",
"dependencies": {
"Microsoft.Extensions.Logging": "7.0.0",
"Serilog": "2.12.0"
}
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "RzQPVIGFFkKvG56YLr8ACtiwdWJE6IJ9vCQ4qHa0PIsUEpfzAIAi59jnzqtByOFC0FiFrFPow9bkfzylaZorAA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "z38LGryMvh7iU1uBW+4uo5DwsB3CwRgLt2uFexWFx3mPSid+A0l5XcJzOgLwgFhNl6B42Ryz4ezBsddTp1Uc/g==",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.14"
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
@@ -501,9 +344,9 @@
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1823.32, )",
"resolved": "1.0.1823.32",
"contentHash": "ppRcWBUNggFIqyJp7PfgS4Oe8/7yli/mHcTNDOaqo3ZzJWnv9AOr0WE9ceEP5SPs1M7CQ3QvdGMR7KNz0v09EA=="
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
}
}
}
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<AutoCADVersion>2022</AutoCADVersion>
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2022;AUTOCAD2022_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(AutoCADVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2022.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2022\Speckle.Converters.Autocad2022.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
@@ -0,0 +1,379 @@
{
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2022.0.2, )",
"resolved": "2022.0.2",
"contentHash": "NFHXnlkBjzM8Bau52d6eF6m0+etHddGx7qlWN8YyrfTtGyz+AmPvF8fgxcLgyjAcB3W4Wim11JeYuEoTNH1X0w=="
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0",
"GraphQL.Client.Abstractions.Websocket": "6.0.0",
"System.Net.WebSockets.Client.Managed": "1.0.22",
"System.Reactive": "5.0.0"
}
},
"GraphQL.Client.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==",
"dependencies": {
"GraphQL.Primitives": "6.0.0"
}
},
"GraphQL.Client.Abstractions.Websocket": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0"
}
},
"GraphQL.Primitives": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
},
"Microsoft.Data.Sqlite": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==",
"dependencies": {
"Microsoft.Data.Sqlite.Core": "7.0.5",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==",
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.4",
"SQLitePCLRaw.provider.dynamic_cdecl": "2.1.4"
}
},
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"SQLitePCLRaw.provider.dynamic_cdecl": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "ZsaKKhgYF9B1fvcnOGKl3EycNAwd9CRWX7v0rEfuPWhQQ5Jjpvf2VEHahiLIGHio3hxi3EIKFJw9KvyowWOUAw==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
"type": "Transitive",
"resolved": "1.0.22",
"contentHash": "WqEOxPlXjuZrIjUtXNE9NxEfU/n5E35iV2PtoZdJSUC4tlrqwHnTee+wvMIM4OUaJWmwrymeqcgYrE0IkGAgLA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.autocad2022": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2022.0.2, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
}
}
}
@@ -1,25 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Speckle.Connectors.Autocad</RootNamespace>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<AutoCADVersion>2023</AutoCADVersion>
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2023;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD 2023\acad.exe</StartProgram>
<DefineConstants>$(DefineConstants);AUTOCAD2023;AUTOCAD</DefineConstants>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(AutoCADVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\2023\Speckle.Converters.Autocad2023.DependencyInjection\Speckle.Converters.Autocad2023.DependencyInjection.csproj" />
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2023\Speckle.Converters.Autocad2023.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Autofac\Speckle.Autofac.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
@@ -2,14 +2,13 @@
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.Extensions.Logging.Abstractions": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5"
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
@@ -36,9 +35,9 @@
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
@@ -74,8 +73,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "3aeMZ1N0lJoSyzqiP03hqemtb1BijhsJADdobn/4nsMJ8V1H+CrpuduUe4hlRdx+ikBQju1VGjMD1GJ3Sk05Eg==",
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
@@ -107,170 +106,68 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.DependencyInjection": {
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Extensions.Logging": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Diagnostics.DiagnosticSource": "7.0.0",
"System.ValueTuple": "4.5.0"
}
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Polly": {
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "7.2.3",
"contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"Polly.Extensions.Http": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==",
"dependencies": {
"Polly": "7.1.0"
}
},
"Sentry": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "8vbD2o6IR2wrRrkSiRbnodWGWUOqIlwYtzpjvPNOb5raJdOf+zxMwfS8f6nx9bmrTTfDj7KrCB8C/5OuicAc8A==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Text.Json": "5.0.2"
}
},
"Sentry.Serilog": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "V8BU7QGWg2qLYfNPqtuTBhC1opysny5l+Ifp6J6PhOeAxU0FssR7nYfbJVetrnLIoh2rd3DlJ6hHYYQosQYcUQ==",
"dependencies": {
"Sentry": "3.33.0",
"Serilog": "2.7.1"
}
},
"Serilog": {
"type": "Transitive",
"resolved": "2.12.0",
"contentHash": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg=="
},
"Serilog.Enrichers.ClientInfo": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "mTc7PM+wC9Hr7LWSwqt5mmnlAr7RJs+eTb3PGPRhwdOackk95MkhUZognuxXEdlW19HAFNmEBTSBY5DfLwM8jQ==",
"dependencies": {
"Serilog": "2.4.0"
}
},
"Serilog.Exceptions": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Formatting.Compact": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Sinks.Console": {
"type": "Transitive",
"resolved": "4.1.0",
"contentHash": "K6N5q+5fetjnJPvCmkWOpJ/V8IEIoMIB1s86OzBrbxwTyHxdx3pmz4H+8+O/Dc/ftUX12DM1aynx/dDowkwzqg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.File": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.PeriodicBatching": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "NDWR7m3PalVlGEq3rzoktrXikjFMLmpwF0HI4sowo8YDdU+gqPlTHlDQiOGxHfB0sTfjPA9JjA7ctKG9zqjGkw==",
"dependencies": {
"Serilog": "2.0.0"
}
},
"Serilog.Sinks.Seq": {
"type": "Transitive",
"resolved": "5.2.2",
"contentHash": "1Csmo5ua7NKUe0yXUx+zsRefjAniPWcXFhUXxXG8pwo0iMiw2gjn9SOkgYnnxbgWqmlGv236w0N/dHc2v5XwMg==",
"dependencies": {
"Serilog": "2.12.0",
"Serilog.Formatting.Compact": "1.1.0",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.PeriodicBatching": "3.1.0"
}
},
"SerilogTimings": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "Zs28eTgszAMwpIrbBnWHBI50yuxL50p/dmAUWmy75+axdZYK/Sjm5/5m1N/CisR8acJUhTVcjPZrsB1P5iv0Uw==",
"dependencies": {
"Serilog": "2.10.0"
}
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
@@ -309,42 +206,22 @@
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.Collections.Immutable": {
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"dependencies": {
"System.Memory": "4.5.4"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.DoubleNumerics": {
"type": "Transitive",
"resolved": "3.1.3",
"contentHash": "KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
"dependencies": {
"NETStandard.Library": "1.6.1"
}
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
@@ -358,8 +235,8 @@
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
@@ -369,47 +246,10 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"dependencies": {
"System.Collections.Immutable": "5.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "KmJ+CJXizDofbq6mpqDoRRLcxgOd2z9X3XoFNULSbvbqVRZkFX3istvr+MUjL6Zw1RT+RNdoI4GYidIINtgvqQ==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encodings.Web": "5.0.1",
"System.Threading.Tasks.Extensions": "4.5.4",
"System.ValueTuple": "4.5.0"
}
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
@@ -419,129 +259,115 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"speckle.autofac": {
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )"
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.autocad2023": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2023.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"speckle.converters.autocad2023.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.Autocad2023": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"Autofac": {
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[5.2.0, )",
"resolved": "5.2.0",
"contentHash": "V8dBH0dsv75uDzl7Sw+HkhKDPUw2eXnlMjcSVMH+tLo2s67MpTKGyDj1pDcpR+IF2u4YRs0s3/x7R88YJzIWvg==",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1823.32, )",
"resolved": "1.0.1823.32",
"contentHash": "ppRcWBUNggFIqyJp7PfgS4Oe8/7yli/mHcTNDOaqo3ZzJWnv9AOr0WE9ceEP5SPs1M7CQ3QvdGMR7KNz0v09EA=="
},
"Serilog.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "9faU0zNQqU7I6soVhLUMYaGNpgWv6cKlKb2S5AnS8gXxzW/em5Ladm/6FMrWTnX41cdbdGPOWNAo6adi4WaJ6A==",
"dependencies": {
"Microsoft.Extensions.Logging": "7.0.0",
"Serilog": "2.12.0"
}
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "RzQPVIGFFkKvG56YLr8ACtiwdWJE6IJ9vCQ4qHa0PIsUEpfzAIAi59jnzqtByOFC0FiFrFPow9bkfzylaZorAA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "z38LGryMvh7iU1uBW+4uo5DwsB3CwRgLt2uFexWFx3mPSid+A0l5XcJzOgLwgFhNl6B42Ryz4ezBsddTp1Uc/g==",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.14"
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<AutoCADVersion>2024</AutoCADVersion>
<DefineConstants>$(DefineConstants);AUTOCAD;AUTOCAD2024;AUTOCAD2022_OR_GREATER;AUTOCAD2023_OR_GREATER;AUTOCAD2024_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(AutoCADVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2024\Speckle.Converters.Autocad2024.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
@@ -2,6 +2,15 @@
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
@@ -26,9 +35,9 @@
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
@@ -97,119 +106,68 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Polly": {
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "7.2.3",
"contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"Polly.Extensions.Http": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==",
"dependencies": {
"Polly": "7.1.0"
}
},
"Sentry": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "8vbD2o6IR2wrRrkSiRbnodWGWUOqIlwYtzpjvPNOb5raJdOf+zxMwfS8f6nx9bmrTTfDj7KrCB8C/5OuicAc8A==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Text.Json": "5.0.2"
}
},
"Sentry.Serilog": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "V8BU7QGWg2qLYfNPqtuTBhC1opysny5l+Ifp6J6PhOeAxU0FssR7nYfbJVetrnLIoh2rd3DlJ6hHYYQosQYcUQ==",
"dependencies": {
"Sentry": "3.33.0",
"Serilog": "2.7.1"
}
},
"Serilog": {
"type": "Transitive",
"resolved": "2.12.0",
"contentHash": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg=="
},
"Serilog.Enrichers.ClientInfo": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "mTc7PM+wC9Hr7LWSwqt5mmnlAr7RJs+eTb3PGPRhwdOackk95MkhUZognuxXEdlW19HAFNmEBTSBY5DfLwM8jQ==",
"dependencies": {
"Serilog": "2.4.0"
}
},
"Serilog.Exceptions": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Formatting.Compact": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Sinks.Console": {
"type": "Transitive",
"resolved": "4.1.0",
"contentHash": "K6N5q+5fetjnJPvCmkWOpJ/V8IEIoMIB1s86OzBrbxwTyHxdx3pmz4H+8+O/Dc/ftUX12DM1aynx/dDowkwzqg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.File": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.PeriodicBatching": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "NDWR7m3PalVlGEq3rzoktrXikjFMLmpwF0HI4sowo8YDdU+gqPlTHlDQiOGxHfB0sTfjPA9JjA7ctKG9zqjGkw==",
"dependencies": {
"Serilog": "2.0.0"
}
},
"Serilog.Sinks.Seq": {
"type": "Transitive",
"resolved": "5.2.2",
"contentHash": "1Csmo5ua7NKUe0yXUx+zsRefjAniPWcXFhUXxXG8pwo0iMiw2gjn9SOkgYnnxbgWqmlGv236w0N/dHc2v5XwMg==",
"dependencies": {
"Serilog": "2.12.0",
"Serilog.Formatting.Compact": "1.1.0",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.PeriodicBatching": "3.1.0"
}
},
"SerilogTimings": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "Zs28eTgszAMwpIrbBnWHBI50yuxL50p/dmAUWmy75+axdZYK/Sjm5/5m1N/CisR8acJUhTVcjPZrsB1P5iv0Uw==",
"dependencies": {
"Serilog": "2.10.0"
}
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
@@ -248,33 +206,22 @@
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.Collections.Immutable": {
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"dependencies": {
"System.Memory": "4.5.4"
}
},
"System.DoubleNumerics": {
"type": "Transitive",
"resolved": "3.1.3",
"contentHash": "KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
"dependencies": {
"NETStandard.Library": "1.6.1"
}
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
@@ -288,8 +235,8 @@
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
@@ -299,47 +246,10 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"dependencies": {
"System.Collections.Immutable": "5.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA=="
},
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "KmJ+CJXizDofbq6mpqDoRRLcxgOd2z9X3XoFNULSbvbqVRZkFX3istvr+MUjL6Zw1RT+RNdoI4GYidIINtgvqQ==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encodings.Web": "5.0.1",
"System.Threading.Tasks.Extensions": "4.5.4",
"System.ValueTuple": "4.5.0"
}
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
@@ -349,66 +259,121 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"speckle.autofac": {
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )"
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.autocad2024": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2024.0.0, )",
"Speckle.Connectors.DUI.WebView": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5"
}
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Speckle.Core": {
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "RzQPVIGFFkKvG56YLr8ACtiwdWJE6IJ9vCQ4qHa0PIsUEpfzAIAi59jnzqtByOFC0FiFrFPow9bkfzylaZorAA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "z38LGryMvh7iU1uBW+4uo5DwsB3CwRgLt2uFexWFx3mPSid+A0l5XcJzOgLwgFhNl6B42Ryz4ezBsddTp1Uc/g==",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.14"
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
}
}
@@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<AutoCADVersion>2025</AutoCADVersion>
<DefineConstants>$(DefineConstants);AUTOCAD2025;AUTOCAD</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<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 -->
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(AutoCADVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\Speckle.Converters.Autocad2025\Speckle.Converters.Autocad2025.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
@@ -0,0 +1,348 @@
{
"version": 2,
"dependencies": {
"net8.0-windows7.0": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net461": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2025.0.0, )",
"resolved": "2025.0.0",
"contentHash": "dqEgZ+bTqAG0tx0WwdnTZcbNKH2igzhOr3SMXtRYai7yIqXiz5btZ4Mf2bmfxbmxLucww3GKVpdZoI+PSZlMuQ=="
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0",
"GraphQL.Client.Abstractions.Websocket": "6.0.0",
"System.Reactive": "5.0.0"
}
},
"GraphQL.Client.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==",
"dependencies": {
"GraphQL.Primitives": "6.0.0"
}
},
"GraphQL.Client.Abstractions.Websocket": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0"
}
},
"GraphQL.Primitives": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
},
"Microsoft.Data.Sqlite": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==",
"dependencies": {
"Microsoft.Data.Sqlite.Core": "7.0.5",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net461": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "AmOJZwCqnOCNp6PPcf9joyogScWLtwy0M1WkqfEQ0M9nYwyDD7EX9ZjscKS5iYnyvteX7kzSKFCKt9I9dXA6mA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==",
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.4",
"SQLitePCLRaw.provider.e_sqlite3": "2.1.4"
}
},
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"SQLitePCLRaw.provider.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "CSlb5dUp1FMIkez9Iv5EXzpeq7rHryVNqwJMWnpq87j9zWZexaEMdisDktMsnnrzKM6ahNrsTkjqNodTBPBxtQ==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA=="
},
"System.Reactive": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.autocad2025": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2025.0.0, )",
"Speckle.Connectors.DUI.WebView": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
},
"net8.0-windows7.0/win-x64": {
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
}
}
}
}
@@ -1,47 +1,56 @@
using Autodesk.AutoCAD.DatabaseServices;
using Sentry.Reflection;
using Speckle.Connectors.Autocad.HostApp;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Core.Credentials;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Utils;
using Speckle.Core.Logging;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Credentials;
namespace Speckle.Connectors.Autocad.Bindings;
public class AutocadBasicConnectorBinding : IBasicConnectorBinding
{
private readonly IAccountManager _accountManager;
public string Name { get; set; } = "baseBinding";
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly AutocadSettings _settings;
private readonly ISpeckleApplication _speckleApplication;
private readonly ILogger<AutocadBasicConnectorBinding> _logger;
public BasicConnectorBindingCommands Commands { get; }
public AutocadBasicConnectorBinding(DocumentModelStore store, AutocadSettings settings, IBridge parent)
public AutocadBasicConnectorBinding(
DocumentModelStore store,
IBrowserBridge parent,
IAccountManager accountManager,
ISpeckleApplication speckleApplication,
ILogger<AutocadBasicConnectorBinding> logger
)
{
_store = store;
_settings = settings;
Parent = parent;
_accountManager = accountManager;
_speckleApplication = speckleApplication;
Commands = new BasicConnectorBindingCommands(parent);
_store.DocumentChanged += (_, _) =>
{
Commands.NotifyDocumentChanged();
};
parent.TopLevelExceptionHandler.FireAndForget(async () =>
{
await Commands.NotifyDocumentChanged().ConfigureAwait(false);
});
_logger = logger;
}
public string GetConnectorVersion() =>
typeof(AutocadBasicConnectorBinding).Assembly.GetNameAndVersion().Version ?? "No version";
public string GetConnectorVersion() => _speckleApplication.SpeckleVersion;
public string GetSourceApplicationName() => _settings.HostAppInfo.Slug;
public string GetSourceApplicationName() => _speckleApplication.Slug;
public string GetSourceApplicationVersion() => _settings.HostAppVersion.ToString();
public string GetSourceApplicationVersion() => _speckleApplication.HostApplicationVersion;
public Account[] GetAccounts() => AccountManager.GetAccounts().ToArray();
public Account[] GetAccounts() => _accountManager.GetAccounts().ToArray();
public DocumentInfo? GetDocumentInfo()
{
@@ -57,23 +66,23 @@ public class AutocadBasicConnectorBinding : IBasicConnectorBinding
public DocumentModelStore GetDocumentState() => _store;
public void AddModel(ModelCard model) => _store.Models.Add(model);
public void AddModel(ModelCard model) => _store.AddModel(model);
public void UpdateModel(ModelCard model) => _store.UpdateModel(model);
public void RemoveModel(ModelCard model) => _store.RemoveModel(model);
public void HighlightObjects(List<string> objectIds)
public async Task HighlightObjects(IReadOnlyList<string> objectIds)
{
// POC: Will be addressed to move it into AutocadContext!
var doc = Application.DocumentManager.MdiActiveDocument;
var dbObjects = doc.GetObjects(objectIds);
var acadObjectIds = dbObjects.Select(tuple => tuple.Root.Id).ToArray();
HighlightObjectsOnView(acadObjectIds);
await HighlightObjectsOnView(acadObjectIds).ConfigureAwait(false);
}
public void HighlightModel(string modelCardId)
public async Task HighlightModel(string modelCardId)
{
// POC: Will be addressed to move it into AutocadContext!
var doc = Application.DocumentManager.MdiActiveDocument;
@@ -86,14 +95,16 @@ public class AutocadBasicConnectorBinding : IBasicConnectorBinding
var objectIds = Array.Empty<ObjectId>();
var model = _store.GetModelById(modelCardId);
if (model == null)
{
_logger.LogError("Model was null when highlighting received model");
return;
}
if (model is SenderModelCard senderModelCard)
{
var dbObjects = doc.GetObjects(senderModelCard.SendFilter.NotNull().GetObjectIds());
var dbObjects = doc.GetObjects(senderModelCard.SendFilter.NotNull().RefreshObjectIds());
objectIds = dbObjects.Select(tuple => tuple.Root.Id).ToArray();
}
@@ -105,54 +116,79 @@ public class AutocadBasicConnectorBinding : IBasicConnectorBinding
if (objectIds.Length == 0)
{
Commands.SetModelError(modelCardId, new OperationCanceledException("No objects found to highlight."));
await Commands
.SetModelError(modelCardId, new OperationCanceledException("No objects found to highlight."))
.ConfigureAwait(false);
return;
}
HighlightObjectsOnView(objectIds, modelCardId);
await HighlightObjectsOnView(objectIds, modelCardId).ConfigureAwait(false);
}
private void HighlightObjectsOnView(ObjectId[] objectIds, string? modelCardId = null)
private async Task HighlightObjectsOnView(ObjectId[] objectIds, string? modelCardId = null)
{
var doc = Application.DocumentManager.MdiActiveDocument;
Parent.RunOnMainThread(() =>
{
try
await Parent
.RunOnMainThreadAsync(async () =>
{
doc.Editor.SetImpliedSelection(Array.Empty<ObjectId>()); // Deselects
doc.Editor.SetImpliedSelection(objectIds); // Selects
doc.Editor.UpdateScreen();
Extents3d selectedExtents = new();
var tr = doc.TransactionManager.StartTransaction();
foreach (ObjectId objectId in objectIds)
try
{
var entity = (Entity)tr.GetObject(objectId, OpenMode.ForRead);
if (entity != null)
doc.Editor.SetImpliedSelection(Array.Empty<ObjectId>()); // Deselects
try
{
selectedExtents.AddExtents(entity.GeometricExtents);
doc.Editor.SetImpliedSelection(objectIds);
}
catch (Exception e) when (!e.IsFatal())
{
// SWALLOW REASON:
// If the objects under the blocks, it won't be able to select them.
// If we try, API will throw the invalid input error, because we request something from API that Autocad doesn't
// handle it on its current canvas. Block elements only selectable when in its scope.
}
doc.Editor.UpdateScreen();
Extents3d selectedExtents = new();
var tr = doc.TransactionManager.StartTransaction();
foreach (ObjectId objectId in objectIds)
{
try
{
var entity = (Entity?)tr.GetObject(objectId, OpenMode.ForRead);
if (entity?.GeometricExtents != null)
{
selectedExtents.AddExtents(entity.GeometricExtents);
}
}
catch (Exception e) when (!e.IsFatal())
{
// Note: we're swallowing exeptions here because of a weird case when receiving blocks, we would have
// acad api throw an error on accessing entity.GeometricExtents.
// may also throw Autodesk.AutoCAD.Runtime.Exception for invalid extents on objects like rays and xlines
}
}
doc.Editor.Zoom(selectedExtents);
tr.Commit();
Autodesk.AutoCAD.Internal.Utils.FlushGraphics();
}
catch (Exception ex) when (!ex.IsFatal())
{
if (modelCardId != null)
{
await Commands
.SetModelError(modelCardId, new OperationCanceledException("Failed to highlight objects."))
.ConfigureAwait(false);
}
else
{
// This will happen, in some cases, where we highlight individual objects. Should be caught by the top level handler and not
// crash the host app.
throw;
}
}
doc.Editor.Zoom(selectedExtents);
tr.Commit();
Autodesk.AutoCAD.Internal.Utils.FlushGraphics();
}
catch (Exception ex) when (!ex.IsFatal())
{
if (modelCardId != null)
{
Commands.SetModelError(modelCardId, new OperationCanceledException("Failed to highlight objects."));
}
else
{
// This will happen, in some cases, where we highlight individual objects. Should be caught by the top level handler and not
// crash the host app.
throw;
}
}
});
})
.ConfigureAwait(false);
}
}
@@ -1,35 +1,51 @@
using Speckle.Autofac.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Utils.Cancellation;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Operations;
using Speckle.Converters.Autocad;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.Bindings;
public sealed class AutocadReceiveBinding : IReceiveBinding
{
public string Name => "receiveBinding";
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly CancellationManager _cancellationManager;
private readonly IUnitOfWorkFactory _unitOfWorkFactory;
private readonly IServiceProvider _serviceProvider;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<AutocadReceiveBinding> _logger;
private readonly IAutocadConversionSettingsFactory _autocadConversionSettingsFactory;
private readonly ISpeckleApplication _speckleApplication;
public ReceiveBindingUICommands Commands { get; }
private ReceiveBindingUICommands Commands { get; }
public AutocadReceiveBinding(
DocumentModelStore store,
IBridge parent,
IBrowserBridge parent,
CancellationManager cancellationManager,
IUnitOfWorkFactory unitOfWorkFactory
IServiceProvider serviceProvider,
IOperationProgressManager operationProgressManager,
ILogger<AutocadReceiveBinding> logger,
IAutocadConversionSettingsFactory autocadConversionSettingsFactory,
ISpeckleApplication speckleApplication
)
{
_store = store;
_cancellationManager = cancellationManager;
_unitOfWorkFactory = unitOfWorkFactory;
_serviceProvider = serviceProvider;
_operationProgressManager = operationProgressManager;
_logger = logger;
_autocadConversionSettingsFactory = autocadConversionSettingsFactory;
_speckleApplication = speckleApplication;
Parent = parent;
Commands = new ReceiveBindingUICommands(parent);
}
@@ -38,7 +54,10 @@ public sealed class AutocadReceiveBinding : IReceiveBinding
public async Task Receive(string modelCardId)
{
using var unitOfWork = _unitOfWorkFactory.Resolve<ReceiveOperation>();
using var scope = _serviceProvider.CreateScope();
scope
.ServiceProvider.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
.Initialize(_autocadConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
try
{
// Get receiver card
@@ -48,8 +67,7 @@ public sealed class AutocadReceiveBinding : IReceiveBinding
throw new InvalidOperationException("No download model card was found.");
}
// Init cancellation token source -> Manager also cancel it if exist before
CancellationTokenSource cts = _cancellationManager.InitCancellationTokenSource(modelCardId);
CancellationToken cancellationToken = _cancellationManager.InitCancellationTokenSource(modelCardId);
// Disable document activation (document creation and document switch)
// Not disabling results in DUI model card being out of sync with the active document
@@ -57,30 +75,34 @@ public sealed class AutocadReceiveBinding : IReceiveBinding
Application.DocumentManager.DocumentActivationEnabled = false;
// Receive host objects
var operationResults = await unitOfWork.Service
var operationResults = await scope
.ServiceProvider.GetRequiredService<ReceiveOperation>()
.Execute(
modelCard.AccountId.NotNull(), // POC: I hear -you are saying why we're passing them separately. Not sure pass the DUI3-> Connectors.DUI project dependency to the SDK-> Connector.Utils
modelCard.ProjectId.NotNull(),
modelCard.ProjectName.NotNull(),
modelCard.ModelName.NotNull(),
modelCard.SelectedVersionId.NotNull(),
cts.Token,
(status, progress) =>
Commands.SetModelProgress(modelCardId, new ModelCardProgress(modelCardId, status, progress), cts)
modelCard.GetReceiveInfo(_speckleApplication.Slug),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationToken),
cancellationToken
)
.ConfigureAwait(false);
Commands.SetModelReceiveResult(modelCardId, operationResults.BakedObjectIds, operationResults.ConversionResults);
await Commands
.SetModelReceiveResult(modelCardId, operationResults.BakedObjectIds, operationResults.ConversionResults)
.ConfigureAwait(false);
}
// Catch here specific exceptions if they related to model card.
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything
// 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 (Exception ex) 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
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex).ConfigureAwait(false);
}
finally
{
// renable document activation
// reenable document activation
Application.DocumentManager.DocumentActivationEnabled = true;
}
}
@@ -1,7 +1,8 @@
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Autodesk.AutoCAD.EditorInput;
namespace Speckle.Connectors.Autocad.Bindings;
@@ -13,11 +14,11 @@ public class AutocadSelectionBinding : ISelectionBinding
public string Name => "selectionBinding";
public IBridge Parent { get; }
public IBrowserBridge Parent { get; }
public AutocadSelectionBinding(IBridge parent, ITopLevelExceptionHandler topLevelExceptionHandler)
public AutocadSelectionBinding(IBrowserBridge parent)
{
_topLevelExceptionHandler = topLevelExceptionHandler;
_topLevelExceptionHandler = parent.TopLevelExceptionHandler;
Parent = parent;
// POC: Use here Context for doc. In converters it's OK but we are still lacking to use context into bindings.
@@ -40,19 +41,28 @@ public class AutocadSelectionBinding : ISelectionBinding
if (!_visitedDocuments.Contains(document))
{
document.ImpliedSelectionChanged += (_, _) =>
_topLevelExceptionHandler.CatchUnhandled(() => Parent.RunOnMainThread(OnSelectionChanged));
_topLevelExceptionHandler.FireAndForget(
async () => await Parent.RunOnMainThreadAsync(OnSelectionChanged).ConfigureAwait(false)
);
_visitedDocuments.Add(document);
}
}
private void OnSelectionChanged()
// NOTE: Autocad 2022 caused problems, so we need to refactor things a bit in here to always store
// selection info locally (and get it updated by the event, which we can control to run on the main thread).
// Ui requests to GetSelection() should just return this local copy that is kept up to date by the event handler.
private SelectionInfo _selectionInfo;
private async Task OnSelectionChanged()
{
SelectionInfo selInfo = GetSelection();
Parent.Send(SELECTION_EVENT, selInfo);
_selectionInfo = GetSelectionInternal();
await Parent.Send(SELECTION_EVENT, _selectionInfo).ConfigureAwait(false);
}
public SelectionInfo GetSelection()
public SelectionInfo GetSelection() => _selectionInfo;
private SelectionInfo GetSelectionInternal()
{
// POC: Will be addressed to move it into AutocadContext! https://spockle.atlassian.net/browse/CNX-9319
Document? doc = Application.DocumentManager.MdiActiveDocument;
@@ -60,10 +70,10 @@ public class AutocadSelectionBinding : ISelectionBinding
List<string> objectTypes = new();
if (doc != null)
{
using var tr = doc.TransactionManager.StartTransaction();
PromptSelectionResult selection = doc.Editor.SelectImplied();
if (selection.Status == PromptStatus.OK)
{
using var tr = doc.TransactionManager.StartTransaction();
foreach (SelectedObject obj in selection.Value)
{
var dbObject = tr.GetObject(obj.ObjectId, OpenMode.ForRead);
@@ -72,9 +82,8 @@ public class AutocadSelectionBinding : ISelectionBinding
continue;
}
var handleString = dbObject.Handle.Value.ToString();
objectTypes.Add(dbObject.GetType().Name);
objs.Add(handleString);
objs.Add(dbObject.GetSpeckleApplicationId());
}
tr.Commit();
@@ -0,0 +1,218 @@
using System.Collections.Concurrent;
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.DUI.Logging;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.Settings;
using Speckle.Sdk;
using Speckle.Sdk.Common;
namespace Speckle.Connectors.Autocad.Bindings;
public abstract class AutocadSendBaseBinding : ISendBinding
{
public string Name => "sendBinding";
public SendBindingUICommands Commands { get; }
private OperationProgressManager OperationProgressManager { get; }
public IBrowserBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly IAutocadIdleManager _idleManager;
private readonly List<ISendFilter> _sendFilters;
private readonly CancellationManager _cancellationManager;
private readonly IServiceProvider _serviceProvider;
private readonly ISendConversionCache _sendConversionCache;
private readonly IOperationProgressManager _operationProgressManager;
private readonly ILogger<AutocadSendBinding> _logger;
private readonly ITopLevelExceptionHandler _topLevelExceptionHandler;
private readonly ISpeckleApplication _speckleApplication;
/// <summary>
/// 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.
/// https://stackoverflow.com/questions/18922985/concurrent-hashsett-in-net-framework
/// </summary>
private ConcurrentDictionary<string, byte> ChangedObjectIds { get; set; } = new();
protected AutocadSendBaseBinding(
DocumentModelStore store,
IAutocadIdleManager idleManager,
IBrowserBridge parent,
IEnumerable<ISendFilter> sendFilters,
CancellationManager cancellationManager,
IServiceProvider serviceProvider,
ISendConversionCache sendConversionCache,
IOperationProgressManager operationProgressManager,
ILogger<AutocadSendBinding> logger,
ISpeckleApplication speckleApplication
)
{
_store = store;
_idleManager = idleManager;
_serviceProvider = serviceProvider;
_cancellationManager = cancellationManager;
_sendFilters = sendFilters.ToList();
_sendConversionCache = sendConversionCache;
_operationProgressManager = operationProgressManager;
_logger = logger;
_speckleApplication = speckleApplication;
_topLevelExceptionHandler = parent.TopLevelExceptionHandler;
Parent = parent;
Commands = new SendBindingUICommands(parent);
Application.DocumentManager.DocumentActivated += (_, args) =>
_topLevelExceptionHandler.CatchUnhandled(() => SubscribeToObjectChanges(args.Document));
if (Application.DocumentManager.CurrentDocument != null)
{
// catches the case when autocad just opens up with a blank new doc
SubscribeToObjectChanges(Application.DocumentManager.CurrentDocument);
}
// Since ids of the objects generates from same seed, we should clear the cache always whenever doc swapped.
_store.DocumentChanged += (_, _) =>
{
_sendConversionCache.ClearCache();
};
}
private readonly List<string> _docSubsTracker = new();
private void SubscribeToObjectChanges(Document doc)
{
if (doc == null || doc.Database == null || _docSubsTracker.Contains(doc.Name))
{
return;
}
_docSubsTracker.Add(doc.Name);
doc.Database.ObjectAppended += (_, e) => OnObjectChanged(e.DBObject);
doc.Database.ObjectErased += (_, e) => OnObjectChanged(e.DBObject);
doc.Database.ObjectModified += (_, e) => OnObjectChanged(e.DBObject);
}
private void OnObjectChanged(DBObject dbObject)
{
_topLevelExceptionHandler.CatchUnhandled(() => OnChangeChangedObjectIds(dbObject));
}
private void OnChangeChangedObjectIds(DBObject dBObject)
{
ChangedObjectIds[dBObject.GetSpeckleApplicationId()] = 1;
_idleManager.SubscribeToIdle(
nameof(AutocadSendBinding),
async () => await RunExpirationChecks().ConfigureAwait(false)
);
}
private async Task RunExpirationChecks()
{
var senders = _store.GetSenders();
string[] objectIdsList = ChangedObjectIds.Keys.ToArray();
List<string> expiredSenderIds = new();
_sendConversionCache.EvictObjects(objectIdsList);
foreach (SenderModelCard modelCard in senders)
{
var intersection = modelCard.SendFilter.NotNull().RefreshObjectIds().Intersect(objectIdsList).ToList();
bool isExpired = intersection.Count != 0;
if (isExpired)
{
expiredSenderIds.Add(modelCard.ModelCardId.NotNull());
}
}
await Commands.SetModelsExpired(expiredSenderIds).ConfigureAwait(false);
ChangedObjectIds = new();
}
public List<ISendFilter> GetSendFilters() => _sendFilters;
public List<ICardSetting> GetSendSettings() => [];
public async Task Send(string modelCardId) =>
await Parent
.RunOnMainThreadAsync(async () => await SendInternal(modelCardId).ConfigureAwait(false))
.ConfigureAwait(false);
protected abstract void InitializeSettings(IServiceProvider serviceProvider);
private async Task SendInternal(string modelCardId)
{
try
{
if (_store.GetModelById(modelCardId) is not SenderModelCard modelCard)
{
// Handle as GLOBAL ERROR at BrowserBridge
throw new InvalidOperationException("No publish model card was found.");
}
using var scope = _serviceProvider.CreateScope();
InitializeSettings(scope.ServiceProvider);
CancellationToken cancellationToken = _cancellationManager.InitCancellationTokenSource(modelCardId);
// Disable document activation (document creation and document switch)
// Not disabling results in DUI model card being out of sync with the active document
// The DocumentActivated event isn't usable probably because it is pushed to back of main thread queue
Application.DocumentManager.DocumentActivationEnabled = false;
// Get elements to convert
List<AutocadRootObject> autocadObjects = Application.DocumentManager.CurrentDocument.GetObjects(
modelCard.SendFilter.NotNull().RefreshObjectIds()
);
if (autocadObjects.Count == 0)
{
// Handle as CARD ERROR in this function
throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!");
}
var sendResult = await scope
.ServiceProvider.GetRequiredService<SendOperation<AutocadRootObject>>()
.Execute(
autocadObjects,
modelCard.GetSendInfo(_speckleApplication.Slug),
_operationProgressManager.CreateOperationProgressEventHandler(Parent, modelCardId, cancellationToken),
cancellationToken
)
.ConfigureAwait(false);
await Commands
.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults)
.ConfigureAwait(false);
}
catch (OperationCanceledException)
{
// 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 (Exception ex) 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
{
_logger.LogModelCardHandledError(ex);
await Commands.SetModelError(modelCardId, ex).ConfigureAwait(false);
}
finally
{
// renable document activation
Application.DocumentManager.DocumentActivationEnabled = true;
}
}
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
}
@@ -1,196 +1,55 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card;
using Speckle.Connectors.Utils.Cancellation;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.DUI.Exceptions;
using Speckle.Connectors.Utils.Operations;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Caching;
using Speckle.Converters.Autocad;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.Bindings;
public sealed class AutocadSendBinding : ISendBinding
public sealed class AutocadSendBinding : AutocadSendBaseBinding
{
public string Name => "sendBinding";
public SendBindingUICommands Commands { get; }
public IBridge Parent { get; }
private readonly DocumentModelStore _store;
private readonly AutocadIdleManager _idleManager;
private readonly List<ISendFilter> _sendFilters;
private readonly CancellationManager _cancellationManager;
private readonly IUnitOfWorkFactory _unitOfWorkFactory;
private readonly AutocadSettings _autocadSettings;
private readonly ISendConversionCache _sendConversionCache;
private readonly ITopLevelExceptionHandler _topLevelExceptionHandler;
/// <summary>
/// Used internally to aggregate the changed objects' id.
/// </summary>
private HashSet<string> ChangedObjectIds { get; set; } = new();
private readonly IAutocadConversionSettingsFactory _autocadConversionSettingsFactory;
public AutocadSendBinding(
DocumentModelStore store,
AutocadIdleManager idleManager,
IBridge parent,
IAutocadIdleManager idleManager,
IBrowserBridge parent,
IEnumerable<ISendFilter> sendFilters,
CancellationManager cancellationManager,
AutocadSettings autocadSettings,
IUnitOfWorkFactory unitOfWorkFactory,
IServiceProvider serviceProvider,
ISendConversionCache sendConversionCache,
ITopLevelExceptionHandler topLevelExceptionHandler
IOperationProgressManager operationProgressManager,
ILogger<AutocadSendBinding> logger,
IAutocadConversionSettingsFactory autocadConversionSettingsFactory,
ISpeckleApplication speckleApplication
)
: base(
store,
idleManager,
parent,
sendFilters,
cancellationManager,
serviceProvider,
sendConversionCache,
operationProgressManager,
logger,
speckleApplication
)
{
_store = store;
_idleManager = idleManager;
_unitOfWorkFactory = unitOfWorkFactory;
_autocadSettings = autocadSettings;
_cancellationManager = cancellationManager;
_sendFilters = sendFilters.ToList();
_sendConversionCache = sendConversionCache;
_topLevelExceptionHandler = topLevelExceptionHandler;
Parent = parent;
Commands = new SendBindingUICommands(parent);
Application.DocumentManager.DocumentActivated += (_, args) =>
topLevelExceptionHandler.CatchUnhandled(() => SubscribeToObjectChanges(args.Document));
if (Application.DocumentManager.CurrentDocument != null)
{
// catches the case when autocad just opens up with a blank new doc
SubscribeToObjectChanges(Application.DocumentManager.CurrentDocument);
}
_autocadConversionSettingsFactory = autocadConversionSettingsFactory;
}
private readonly List<string> _docSubsTracker = new();
private void SubscribeToObjectChanges(Document doc)
protected override void InitializeSettings(IServiceProvider serviceProvider)
{
if (doc == null || doc.Database == null || _docSubsTracker.Contains(doc.Name))
{
return;
}
_docSubsTracker.Add(doc.Name);
doc.Database.ObjectAppended += (_, e) => OnObjectChanged(e.DBObject);
doc.Database.ObjectErased += (_, e) => OnObjectChanged(e.DBObject);
doc.Database.ObjectModified += (_, e) => OnObjectChanged(e.DBObject);
serviceProvider
.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
.Initialize(_autocadConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
}
void OnObjectChanged(DBObject dbObject)
{
_topLevelExceptionHandler.CatchUnhandled(() => OnChangeChangedObjectIds(dbObject));
}
private void OnChangeChangedObjectIds(DBObject dBObject)
{
ChangedObjectIds.Add(dBObject.Handle.Value.ToString());
_idleManager.SubscribeToIdle(RunExpirationChecks);
}
private void RunExpirationChecks()
{
var senders = _store.GetSenders();
string[] objectIdsList = ChangedObjectIds.ToArray();
List<string> expiredSenderIds = new();
_sendConversionCache.EvictObjects(objectIdsList);
foreach (SenderModelCard modelCard in senders)
{
var intersection = modelCard.SendFilter.NotNull().GetObjectIds().Intersect(objectIdsList).ToList();
bool isExpired = intersection.Count != 0;
if (isExpired)
{
expiredSenderIds.Add(modelCard.ModelCardId.NotNull());
}
}
Commands.SetModelsExpired(expiredSenderIds);
ChangedObjectIds = new HashSet<string>();
}
public List<ISendFilter> GetSendFilters() => _sendFilters;
public Task Send(string modelCardId)
{
Parent.RunOnMainThread(async () => await SendInternal(modelCardId).ConfigureAwait(false));
return Task.CompletedTask;
}
private async Task SendInternal(string modelCardId)
{
try
{
if (_store.GetModelById(modelCardId) is not SenderModelCard modelCard)
{
// Handle as GLOBAL ERROR at BrowserBridge
throw new InvalidOperationException("No publish model card was found.");
}
using var uow = _unitOfWorkFactory.Resolve<SendOperation<AutocadRootObject>>();
// Init cancellation token source -> Manager also cancel it if exist before
CancellationTokenSource cts = _cancellationManager.InitCancellationTokenSource(modelCardId);
// Disable document activation (document creation and document switch)
// Not disabling results in DUI model card being out of sync with the active document
// The DocumentActivated event isn't usable probably because it is pushed to back of main thread queue
Application.DocumentManager.DocumentActivationEnabled = false;
// Get elements to convert
List<AutocadRootObject> autocadObjects = Application.DocumentManager.CurrentDocument.GetObjects(
modelCard.SendFilter.NotNull().GetObjectIds()
);
if (autocadObjects.Count == 0)
{
// Handle as CARD ERROR in this function
throw new SpeckleSendFilterException("No objects were found to convert. Please update your publish filter!");
}
var sendInfo = new SendInfo(
modelCard.AccountId.NotNull(),
modelCard.ProjectId.NotNull(),
modelCard.ModelId.NotNull(),
_autocadSettings.HostAppInfo.Name
);
var sendResult = await uow.Service
.Execute(
autocadObjects,
sendInfo,
(status, progress) =>
Commands.SetModelProgress(modelCardId, new ModelCardProgress(modelCardId, status, progress), cts),
cts.Token
)
.ConfigureAwait(false);
Commands.SetModelSendResult(modelCardId, sendResult.RootObjId, sendResult.ConversionResults);
}
// Catch here specific exceptions if they related to model card.
catch (OperationCanceledException)
{
// SWALLOW -> UI handles it immediately, so we do not need to handle anything
return;
}
catch (SpeckleSendFilterException e)
{
Commands.SetModelError(modelCardId, e);
}
finally
{
// renable document activation
Application.DocumentManager.DocumentActivationEnabled = true;
}
}
public void CancelSend(string modelCardId) => _cancellationManager.CancelOperation(modelCardId);
}
@@ -1,69 +1,30 @@
#if AUTOCAD
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Autofac;
using Speckle.Autofac.DependencyInjection;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Interfaces;
using Speckle.Connectors.Autocad.Operations.Receive;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Autocad.Plugin;
using Speckle.Connectors.DUI;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Connectors.Utils;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Instances;
using Speckle.Connectors.Utils.Operations;
using Speckle.Core.Models.GraphTraversal;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.DependencyInjection;
public class AutocadConnectorModule : ISpeckleModule
public static class AutocadConnectorModule
{
public void Load(SpeckleContainerBuilder builder)
public static void AddAutocad(this IServiceCollection serviceCollection)
{
builder.AddAutofac();
builder.AddConnectorUtils();
builder.AddDUI();
builder.AddDUIView();
serviceCollection.AddAutocadBase();
// Register other connector specific types
builder.AddSingleton<IAutocadPlugin, AutocadPlugin>();
builder.AddTransient<TransactionContext>();
builder.AddSingleton(new AutocadDocumentManager()); // TODO: Dependent to TransactionContext, can be moved to AutocadContext
builder.AddSingleton<DocumentModelStore, AutocadDocumentStore>();
builder.AddSingleton<AutocadContext>();
builder.AddSingleton<AutocadIdleManager>();
// Send
serviceCollection.LoadSend();
serviceCollection.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();
SharedConnectorModule.LoadShared(builder);
// Receive
serviceCollection.LoadReceive();
builder.AddScoped<AutocadLayerManager>();
// Operations
builder.AddScoped<SendOperation<AutocadRootObject>>();
builder.AddSingleton(DefaultTraversal.CreateTraversalFunc());
// Object Builders
builder.AddScoped<IHostObjectBuilder, AutocadHostObjectBuilder>();
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();
// Register bindings
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "Autocad"); // POC: Easier like this for now, should be cleaned up later
builder.AddSingleton<IBinding, AutocadSendBinding>();
builder.AddSingleton<IBinding, AutocadReceiveBinding>();
// register send filters
builder.AddTransient<ISendFilter, AutocadSelectionFilter>();
// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
builder.AddScoped<IInstanceObjectsManager<AutocadRootObject, List<Entity>>, AutocadInstanceObjectManager>();
// Register vertical specific bindings
serviceCollection.AddSingleton<IBinding, AutocadSendBinding>();
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
}
}
#endif
@@ -1,37 +1,19 @@
#if CIVIL3D
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.Filters;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Operations;
using Speckle.Connectors.Common.Builders;
namespace Speckle.Connectors.Autocad.DependencyInjection;
public class Civil3dConnectorModule : ISpeckleModule
public static class Civil3dConnectorModule
{
public void Load(SpeckleContainerBuilder builder)
public static void AddCivil3d(this IServiceCollection serviceCollection)
{
SharedConnectorModule.LoadShared(builder);
serviceCollection.AddAutocadBase();
// Operations
builder.AddScoped<SendOperation<AutocadRootObject>>();
// Object Builders
builder.AddScoped<IRootObjectBuilder<AutocadRootObject>, AutocadRootObjectBuilder>();
// Register bindings
builder.AddSingleton<IBinding, ConfigBinding>("connectorName", "Civil3d"); // POC: Easier like this for now, should be cleaned up later
builder.AddSingleton<IBinding, AutocadSendBinding>();
// register send filters
builder.AddTransient<ISendFilter, AutocadSelectionFilter>();
// register send conversion cache
builder.AddSingleton<ISendConversionCache, SendConversionCache>();
// send
serviceCollection.LoadSend();
serviceCollection.AddScoped<IRootObjectBuilder<AutocadRootObject>, Civil3dRootObjectBuilder>();
}
}
#endif
@@ -0,0 +1,94 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.Filters;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Operations.Receive;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Common;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Instances;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Connectors.DUI.WebView;
using Speckle.Sdk.Models.GraphTraversal;
namespace Speckle.Connectors.Autocad.DependencyInjection;
public static class SharedRegistration
{
public static void AddAutocadBase(this IServiceCollection serviceCollection)
{
serviceCollection.AddConnectorUtils();
serviceCollection.AddDUI<AutocadDocumentStore>();
serviceCollection.AddDUIView();
// Register other connector specific types
serviceCollection.AddTransient<TransactionContext>();
serviceCollection.AddSingleton(new AutocadDocumentManager()); // TODO: Dependent to TransactionContext, can be moved to AutocadContext
serviceCollection.AddSingleton<AutocadContext>();
// Unpackers and builders
serviceCollection.AddScoped<AutocadLayerUnpacker>();
serviceCollection.AddScoped<AutocadLayerBaker>();
serviceCollection.AddScoped<AutocadInstanceUnpacker>();
serviceCollection.AddScoped<AutocadInstanceBaker>();
serviceCollection.AddScoped<AutocadGroupUnpacker>();
serviceCollection.AddScoped<AutocadGroupBaker>();
serviceCollection.AddScoped<AutocadColorUnpacker>();
serviceCollection.AddScoped<AutocadColorBaker>();
serviceCollection.AddScoped<AutocadMaterialUnpacker>();
serviceCollection.AddScoped<AutocadMaterialBaker>();
serviceCollection.AddSingleton<IAppIdleManager, AutocadIdleManager>();
// operation progress manager
serviceCollection.AddSingleton<IOperationProgressManager, OperationProgressManager>();
// Register bindings
serviceCollection.AddSingleton<IBinding, TestBinding>();
serviceCollection.AddSingleton<IBinding, AccountBinding>();
serviceCollection.AddSingleton<IBinding, AutocadSelectionBinding>();
serviceCollection.AddSingleton<IBinding>(sp => sp.GetRequiredService<IBasicConnectorBinding>());
serviceCollection.AddSingleton<IBasicConnectorBinding, AutocadBasicConnectorBinding>();
serviceCollection.AddSingleton<IBinding, ConfigBinding>();
serviceCollection.RegisterTopLevelExceptionHandler();
}
public static void LoadSend(this IServiceCollection serviceCollection)
{
// Operations
serviceCollection.AddScoped<SendOperation<AutocadRootObject>>();
// register send filters
serviceCollection.AddTransient<ISendFilter, AutocadSelectionFilter>();
// register send conversion cache
serviceCollection.AddSingleton<ISendConversionCache, SendConversionCache>();
serviceCollection.AddScoped<
IInstanceObjectsManager<AutocadRootObject, List<Entity>>,
InstanceObjectsManager<AutocadRootObject, List<Entity>>
>();
}
public static void LoadReceive(this IServiceCollection serviceCollection)
{
// traversal
serviceCollection.AddSingleton(DefaultTraversal.CreateTraversalFunc());
// Object Builders
serviceCollection.AddScoped<IHostObjectBuilder, AutocadHostObjectBuilder>();
// Register bindings
serviceCollection.AddSingleton<IBinding, AutocadReceiveBinding>();
}
}
@@ -4,7 +4,10 @@ namespace Speckle.Connectors.Autocad.Filters;
public class AutocadSelectionFilter : DirectSelectionSendFilter
{
public override List<string> GetObjectIds() => SelectedObjectIds;
public AutocadSelectionFilter()
{
IsDefault = true;
}
public override bool CheckExpiry(string[] changedObjectIds) => SelectedObjectIds.Intersect(changedObjectIds).Any();
public override List<string> RefreshObjectIds() => SelectedObjectIds;
}
@@ -1,2 +1,2 @@
global using Document = Autodesk.AutoCAD.ApplicationServices.Document;
global using Application = Autodesk.AutoCAD.ApplicationServices.Core.Application;
global using Document = Autodesk.AutoCAD.ApplicationServices.Document;
@@ -0,0 +1,79 @@
using Autodesk.AutoCAD.Colors;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Operations;
using Speckle.Sdk;
using Speckle.Sdk.Models.Proxies;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency for a given operation and helps with layer creation and cleanup.
/// </summary>
public class AutocadColorBaker
{
private readonly ILogger<AutocadColorBaker> _logger;
public AutocadColorBaker(ILogger<AutocadColorBaker> logger)
{
_logger = logger;
}
/// <summary>
/// For receive operations
/// </summary>
public Dictionary<string, AutocadColor> ObjectColorsIdMap { get; } = new();
/// <summary>
/// Parse Color Proxies and stores in ObjectColorIdMap the relationship between object ids and colors
/// </summary>
/// <param name="colorProxies"></param>
/// <param name="onOperationProgressed"></param>
public void ParseColors(IReadOnlyCollection<ColorProxy> colorProxies, IProgress<CardProgress> onOperationProgressed)
{
var count = 0;
foreach (ColorProxy colorProxy in colorProxies)
{
try
{
onOperationProgressed.Report(new("Converting colors", (double)++count / colorProxies.Count));
// skip any colors with source = layer, since object color default source is by layer
if (colorProxy["source"] is string source && source == "layer")
{
continue;
}
foreach (string objectId in colorProxy.objects)
{
AutocadColor convertedColor = ConvertColorProxyToColor(colorProxy);
#if NET8_0
ObjectColorsIdMap.TryAdd(objectId, convertedColor);
#else
if (!ObjectColorsIdMap.ContainsKey(objectId))
{
ObjectColorsIdMap.Add(objectId, convertedColor);
}
#endif
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed parsing color proxy");
}
}
}
private AutocadColor ConvertColorProxyToColor(ColorProxy colorProxy)
{
// if source = block, return a default ByBlock color
if (colorProxy["source"] is string source && source == "block")
{
return AutocadColor.FromColorIndex(ColorMethod.ByBlock, 0);
}
return colorProxy["autocadColorIndex"] is long index
? AutocadColor.FromColorIndex(ColorMethod.ByAci, (short)index)
: AutocadColor.FromColor(System.Drawing.Color.FromArgb(colorProxy.value));
}
}
@@ -0,0 +1,144 @@
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Sdk;
using Speckle.Sdk.Models.Proxies;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency for a given operation and helps with layer creation and cleanup.
/// </summary>
public class AutocadColorUnpacker
{
private readonly ILogger<AutocadColorUnpacker> _logger;
public AutocadColorUnpacker(ILogger<AutocadColorUnpacker> logger)
{
_logger = logger;
}
/// <summary>
/// For send operations
/// </summary>
private Dictionary<string, ColorProxy> ColorProxies { get; } = new();
/// <summary>
/// Iterates through a given set of autocad objects and layers to collect colors.
/// </summary>
/// <param name="unpackedAutocadRootObjects">atomic root objects, including instance objects</param>
/// <param name="layers">layers used by atomic objects</param>
/// <returns></returns>
public List<ColorProxy> UnpackColors(
List<AutocadRootObject> unpackedAutocadRootObjects,
List<LayerTableRecord> layers
)
{
// Stage 1: unpack colors from objects
foreach (AutocadRootObject rootObj in unpackedAutocadRootObjects)
{
try
{
Entity entity = rootObj.Root;
ProcessObjectColor(rootObj.ApplicationId, entity.Color);
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to unpack colors from Autocad Entity");
}
}
// Stage 2: make sure we collect layer colors as well
foreach (LayerTableRecord layer in layers)
{
try
{
ProcessObjectColor(layer.GetSpeckleApplicationId(), layer.Color);
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to unpack colors from Autocad Layer");
}
}
return ColorProxies.Values.ToList();
}
/// <summary>
/// Processes an object's color and adds the object id to a color proxy in <see cref="ColorProxies"/> if object color is set ByAci, ByColor, or ByBlock.
/// Skips processing ByPen for now, because I don't understand what this means.
/// </summary>
/// <param name="objectId"></param>
/// <param name="color"></param>
/// <remarks>Skips processing object colors if it is "ByLayer" since autocad commits are structured by layer and by default sets the color by layer on receive. If this ever changes, then we do need to start processing object colors by layer.</remarks>
private void ProcessObjectColor(string objectId, AutocadColor color)
{
switch (color.ColorMethod)
{
case ColorMethod.ByAci:
case ColorMethod.ByColor:
case ColorMethod.ByBlock:
AddObjectIdToColorProxy(objectId, color);
break;
case ColorMethod.ByLayer: // skipping these since autocad commits are structured by layer. Will need to be updated if this ever changes!!
case ColorMethod.ByPen: // POC: no idea what this means
break;
}
}
private void AddObjectIdToColorProxy(string objectId, AutocadColor color)
{
string colorId = color.GetSpeckleApplicationId();
if (ColorProxies.TryGetValue(colorId, out ColorProxy? proxy))
{
proxy.objects.Add(objectId);
}
else
{
ColorProxy newColor = ConvertColorToColorProxy(color);
newColor.objects.Add(objectId);
ColorProxies[colorId] = newColor;
}
}
private ColorProxy ConvertColorToColorProxy(AutocadColor color)
{
int argb = color.ColorValue.ToArgb();
string name = color.ColorNameForDisplay;
string id = color.GetSpeckleApplicationId();
ColorProxy colorProxy =
new()
{
value = argb,
applicationId = id,
name = name,
objects = new()
};
// add the color source as well for receiving in other apps
// POC: in order to support full fidelity color support across autocad and rhino, we need to keep track of the color source property. Not sure if this is the best place to keep track of the source, vs on a ColorSourceProxy or as a property on the atomic object.
colorProxy["source"] = color.IsByBlock
? "block"
: color.IsByLayer
? "layer"
: "object";
// set additional properties if by aci or by block
// ByBlock colors for some reason do not have their color value set to the correct color (white): instead it's a near-black
// ByACI is an Autocad internal index for set rgb values, which effects name presentation, see: https://gohtx.com/acadcolors.php
if (color.IsByAci)
{
colorProxy["autocadColorIndex"] = (int)color.ColorIndex;
}
else if (color.IsByBlock)
{
colorProxy.value = -1;
}
return colorProxy;
}
}
@@ -1,7 +1,6 @@
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.Utils;
using Speckle.Newtonsoft.Json;
using Speckle.Connectors.DUI.Utils;
namespace Speckle.Connectors.Autocad.HostApp;
@@ -12,11 +11,11 @@ public class AutocadDocumentStore : DocumentModelStore
private readonly AutocadDocumentManager _autocadDocumentManager;
public AutocadDocumentStore(
JsonSerializerSettings jsonSerializerSettings,
IJsonSerializer jsonSerializer,
AutocadDocumentManager autocadDocumentManager,
ITopLevelExceptionHandler topLevelExceptionHandler
)
: base(jsonSerializerSettings, true)
: base(jsonSerializer)
{
_autocadDocumentManager = autocadDocumentManager;
_previousDocName = _nullDocumentName;
@@ -48,32 +47,31 @@ public class AutocadDocumentStore : DocumentModelStore
}
_previousDocName = currentDocName;
ReadFromFile();
LoadState();
OnDocumentChanged();
}
public override void ReadFromFile()
protected override void LoadState()
{
Models = new();
// POC: Will be addressed to move it into AutocadContext!
Document? doc = Application.DocumentManager.MdiActiveDocument;
if (doc == null)
{
ClearAndSave();
return;
}
string? serializedModelCards = _autocadDocumentManager.ReadModelCards(doc);
if (serializedModelCards == null)
{
ClearAndSave();
return;
}
Models = Deserialize(serializedModelCards).NotNull();
LoadFromString(serializedModelCards);
}
public override void WriteToFile()
protected override void HostAppSaveState(string modelCardState)
{
// POC: Will be addressed to move it into AutocadContext!
Document doc = Application.DocumentManager.MdiActiveDocument;
@@ -83,7 +81,6 @@ public class AutocadDocumentStore : DocumentModelStore
return;
}
string modelCardsString = Serialize();
_autocadDocumentManager.WriteModelCards(doc, modelCardsString);
_autocadDocumentManager.WriteModelCards(doc, modelCardState);
}
}
@@ -0,0 +1,81 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Conversion;
using Speckle.Sdk;
using Speckle.Sdk.Dependencies;
using Speckle.Sdk.Models.Proxies;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// This resource expects to be injected "fresh" in each receive operation (scoped lifetime).
/// Extracts group information from a set of objects into proxies in send operations; also creates groups from a set of proxies in receive operations.
/// TODO: Oguzhan! Check whats happening on second receive unless purge groups? naming etc..
/// </summary>
public class AutocadGroupBaker
{
private readonly ILogger<AutocadGroupBaker> _logger;
private readonly AutocadContext _autocadContext;
public AutocadGroupBaker(AutocadContext autocadContext, ILogger<AutocadGroupBaker> logger)
{
_autocadContext = autocadContext;
_logger = logger;
}
/// <summary>
/// Creates groups in the host app from a set of group proxies. Can be called after the bake operation of all atomic objects (including instances) is complete.
/// </summary>
/// <param name="groupProxies"></param>
/// <param name="applicationIdMap"></param>
/// <returns></returns>
// TODO: Oguzhan! Do not report here too! But this is TBD that we don't know the shape of the report yet.
public IReadOnlyCollection<ReceiveConversionResult> CreateGroups(
IEnumerable<GroupProxy> groupProxies,
Dictionary<string, IReadOnlyCollection<Entity>> applicationIdMap
)
{
HashSet<ReceiveConversionResult> results = new();
using var groupCreationTransaction =
Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var groupDictionary = (DBDictionary)
groupCreationTransaction.GetObject(
Application.DocumentManager.CurrentDocument.Database.GroupDictionaryId,
OpenMode.ForWrite
);
foreach (var gp in groupProxies.OrderBy(group => group.objects.Count))
{
try
{
var entities = gp.objects.SelectMany(oldObjId => applicationIdMap[oldObjId]);
var ids = new ObjectIdCollection();
foreach (var entity in entities)
{
ids.Add(entity.ObjectId);
}
var groupName = _autocadContext.RemoveInvalidChars(gp.name);
var newGroup = new Group(groupName, true); // NOTE: this constructor sets both the description (as it says) but also the name at the same time
newGroup.Append(ids);
groupDictionary.UpgradeOpen();
groupDictionary.SetAt(groupName, newGroup);
groupCreationTransaction.AddNewlyCreatedDBObject(newGroup, true);
}
catch (Exception ex) when (!ex.IsFatal())
{
results.Add(new ReceiveConversionResult(Status.ERROR, gp, null, null, ex));
_logger.LogError(ex, "Failed to bake Autocad Group");
}
}
groupCreationTransaction.Commit();
return results.Freeze();
}
}
@@ -0,0 +1,69 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Sdk;
using Speckle.Sdk.Models.Proxies;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// This resource expects to be injected "fresh" in each send/receive operation (scoped lifetime). Extracts group information from a set of objects into proxies in send operations; also creates groups from a set of proxies in receive operations.
/// </summary>
public class AutocadGroupUnpacker
{
private readonly ILogger<AutocadGroupUnpacker> _logger;
public AutocadGroupUnpacker(ILogger<AutocadGroupUnpacker> logger)
{
_logger = logger;
}
/// <summary>
/// Unpacks a selection of atomic objects into their groups
/// </summary>
/// <param name="autocadObjects"></param>
/// <returns></returns>
public List<GroupProxy> UnpackGroups(IEnumerable<AutocadRootObject> autocadObjects)
{
var groupProxies = new Dictionary<string, GroupProxy>();
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
foreach (var (dbObject, applicationId) in autocadObjects)
{
try
{
var persistentReactorIds = dbObject.GetPersistentReactorIds();
foreach (ObjectId oReactorId in persistentReactorIds)
{
var obj = transaction.GetObject(oReactorId, OpenMode.ForRead);
if (obj is not Group group)
{
continue;
}
var groupAppId = group.GetSpeckleApplicationId();
if (groupProxies.TryGetValue(groupAppId, out GroupProxy? groupProxy))
{
groupProxy.objects.Add(applicationId);
}
else
{
groupProxies[groupAppId] = new()
{
applicationId = groupAppId,
name = group.Name,
objects = [applicationId]
};
}
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed on unpacking Autocad group");
}
}
return groupProxies.Values.ToList();
}
}
@@ -1,38 +1,22 @@
using System.Collections.Concurrent;
using Speckle.Connectors.DUI.Bridge;
using Speckle.InterfaceGenerator;
namespace Speckle.Connectors.Autocad.HostApp;
public class AutocadIdleManager
public partial interface IAutocadIdleManager : IAppIdleManager;
[GenerateAutoInterface]
public sealed class AutocadIdleManager(IIdleCallManager idleCallManager)
: AppIdleManager(idleCallManager),
IAutocadIdleManager
{
private readonly ConcurrentDictionary<string, Action> _sCalls = new();
private bool _hasSubscribed;
private readonly IIdleCallManager _idleCallManager = idleCallManager;
/// <summary>
/// Subscribe deferred action to AutocadIdle event to run it whenever Autocad become idle.
/// </summary>
/// <param name="action"> Action to call whenever Autocad become Idle.</param>
public void SubscribeToIdle(Action action)
protected override void AddEvent()
{
_sCalls[action.Method.Name] = action;
if (_hasSubscribed)
{
return;
}
_hasSubscribed = true;
Application.Idle += OnIdleHandler;
Application.Idle += AutocadAppOnIdle;
}
private void OnIdleHandler(object sender, EventArgs e)
{
foreach (var kvp in _sCalls)
{
kvp.Value();
}
_sCalls.Clear();
_hasSubscribed = false;
Application.Idle -= OnIdleHandler;
}
private void AutocadAppOnIdle(object? sender, EventArgs e) =>
_idleCallManager.AppOnIdle(() => Application.Idle -= AutocadAppOnIdle);
}
@@ -0,0 +1,297 @@
using System.Diagnostics.CodeAnalysis;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Instances;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.Autocad;
using Speckle.Converters.Common;
using Speckle.DoubleNumerics;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Common.Exceptions;
using Speckle.Sdk.Dependencies;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.Instances;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency receive operation.
/// </summary>
public class AutocadInstanceBaker : IInstanceBaker<IReadOnlyCollection<Entity>>
{
private readonly AutocadLayerBaker _layerBaker;
private readonly AutocadColorBaker _colorBaker;
private readonly AutocadMaterialBaker _materialBaker;
private readonly AutocadContext _autocadContext;
private readonly ILogger<AutocadInstanceBaker> _logger;
private readonly IConverterSettingsStore<AutocadConversionSettings> _converterSettings;
public AutocadInstanceBaker(
AutocadLayerBaker layerBaker,
AutocadColorBaker colorBaker,
AutocadMaterialBaker materialBaker,
AutocadContext autocadContext,
ILogger<AutocadInstanceBaker> logger,
IConverterSettingsStore<AutocadConversionSettings> converterSettings
)
{
_layerBaker = layerBaker;
_colorBaker = colorBaker;
_materialBaker = materialBaker;
_autocadContext = autocadContext;
_logger = logger;
_converterSettings = converterSettings;
}
[SuppressMessage("Maintainability", "CA1506:Avoid excessive class coupling")]
public BakeResult BakeInstances(
ICollection<(Collection[] collectionPath, IInstanceComponent obj)> instanceComponents,
Dictionary<string, IReadOnlyCollection<Entity>> applicationIdMap,
string baseLayerName,
IProgress<CardProgress> onOperationProgressed
)
{
var sortedInstanceComponents = instanceComponents
.OrderByDescending(x => x.obj.maxDepth) // Sort by max depth, so we start baking from the deepest element first
.ThenBy(x => x.obj is InstanceDefinitionProxy ? 0 : 1) // Ensure we bake the deepest definition first, then any instances that depend on it
.ToList();
var definitionIdAndApplicationIdMap = new Dictionary<string, ObjectId>();
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var conversionResults = new HashSet<ReceiveConversionResult>();
var createdObjectIds = new HashSet<string>();
var consumedObjectIds = new HashSet<string>();
var count = 0;
foreach (var (collectionPath, instanceOrDefinition) in sortedInstanceComponents)
{
try
{
onOperationProgressed.Report(new("Converting blocks", (double)++count / sortedInstanceComponents.Count));
if (instanceOrDefinition is InstanceDefinitionProxy { applicationId: not null } definitionProxy)
{
// TODO: create definition (block table record)
var constituentEntities = definitionProxy
.objects.Select(id =>
applicationIdMap.TryGetValue(id, out IReadOnlyCollection<Entity>? value) ? value : null
)
.Where(x => x is not null)
.SelectMany(ent => ent!)
.ToList();
var record = new BlockTableRecord();
var objectIds = new ObjectIdCollection();
// We're expecting to have Name prop always for definitions. If there is an edge case, ask to Dim or Ogu
record.Name = _autocadContext.RemoveInvalidChars(
$"{definitionProxy.name}-({definitionProxy.applicationId})-{baseLayerName}"
);
foreach (var entity in constituentEntities)
{
objectIds.Add(entity.ObjectId);
}
if (constituentEntities.Count == 0)
{
throw new ConversionException("No objects found to create instance definition.");
}
using var blockTable = (BlockTable)
transaction.GetObject(Application.DocumentManager.CurrentDocument.Database.BlockTableId, OpenMode.ForWrite);
var id = blockTable.Add(record);
record.AssumeOwnershipOf(objectIds);
definitionIdAndApplicationIdMap[definitionProxy.applicationId] = id;
transaction.AddNewlyCreatedDBObject(record, true);
var consumedEntitiesHandleValues = constituentEntities.Select(ent => ent.GetSpeckleApplicationId()).ToArray();
consumedObjectIds.UnionWith(consumedEntitiesHandleValues);
createdObjectIds.RemoveWhere(newId => consumedEntitiesHandleValues.Contains(newId));
}
else if (
instanceOrDefinition is InstanceProxy instanceProxy
&& definitionIdAndApplicationIdMap.TryGetValue(instanceProxy.definitionId, out ObjectId definitionId)
)
{
var matrix3d = GetMatrix3d(instanceProxy.transform, instanceProxy.units);
var insertionPoint = Point3d.Origin.TransformBy(matrix3d);
var modelSpaceBlockTableRecord = Application.DocumentManager.CurrentDocument.Database.GetModelSpace(
OpenMode.ForWrite
);
// POC: collectionPath for instances should be an array of size 1, because we are flattening collections on traversal
string layerName = _layerBaker.CreateLayerForReceive(collectionPath, baseLayerName);
// get color and material if any
string instanceId = instanceProxy.applicationId ?? instanceProxy.id.NotNull();
AutocadColor? objColor = _colorBaker.ObjectColorsIdMap.TryGetValue(instanceId, out AutocadColor? color)
? color
: null;
ObjectId objMaterial = _materialBaker.ObjectMaterialsIdMap.TryGetValue(instanceId, out ObjectId matId)
? matId
: ObjectId.Null;
BlockReference blockRef = new(insertionPoint, definitionId) { BlockTransform = matrix3d, Layer = layerName, };
if (objColor is not null)
{
blockRef.Color = objColor;
}
if (objMaterial != ObjectId.Null)
{
blockRef.MaterialId = objMaterial;
}
modelSpaceBlockTableRecord.AppendEntity(blockRef);
applicationIdMap[instanceId] = new List<Entity> { blockRef };
transaction.AddNewlyCreatedDBObject(blockRef, true);
conversionResults.Add(
new(Status.SUCCESS, instanceProxy, blockRef.GetSpeckleApplicationId(), "Instance (Block)")
);
createdObjectIds.Add(blockRef.GetSpeckleApplicationId());
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to create an instance from proxy");
conversionResults.Add(new(Status.ERROR, instanceOrDefinition as Base ?? new Base(), null, null, ex));
}
}
transaction.Commit();
return new(createdObjectIds.Freeze(), consumedObjectIds.Freeze(), conversionResults.Freeze());
}
/// <summary>
/// Cleans up any previously created instances.
/// POC: This function will not be able to delete block definitions if the user creates a new one composed out of received definitions.
/// </summary>
/// <param name="namePrefix"></param>
public void PurgeInstances(string namePrefix)
{
namePrefix = _autocadContext.RemoveInvalidChars(namePrefix);
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var instanceDefinitionsToDelete = new Dictionary<string, BlockTableRecord>();
// Helper function that recurses through a given block table record's constituent objects and purges inner instances as required.
void TraverseAndClean(BlockTableRecord btr)
{
foreach (var objectId in btr)
{
var obj = transaction.GetObject(objectId, OpenMode.ForRead) as BlockReference;
if (obj == null)
{
continue;
}
var definition = (BlockTableRecord)transaction.GetObject(obj.BlockTableRecord, OpenMode.ForRead);
if (obj.IsErased)
{
TraverseAndClean(definition);
continue;
}
obj.UpgradeOpen();
obj.Erase();
TraverseAndClean(definition);
instanceDefinitionsToDelete[obj.BlockTableRecord.ToString()] = definition;
}
}
using var blockTable = (BlockTable)
transaction.GetObject(Application.DocumentManager.CurrentDocument.Database.BlockTableId, OpenMode.ForRead);
// deep clean definitions
foreach (var btrId in blockTable)
{
var btr = (BlockTableRecord)transaction.GetObject(btrId, OpenMode.ForRead);
if (btr.Name.Contains(namePrefix)) // POC: this is tightly coupled with a naming convention for definitions in the instance object manager
{
TraverseAndClean(btr);
instanceDefinitionsToDelete[btr.Name] = btr;
}
}
foreach (var def in instanceDefinitionsToDelete.Values)
{
def.UpgradeOpen();
def.Erase();
}
transaction.Commit();
}
private Matrix3d GetMatrix3d(Matrix4x4 matrix, string units)
{
var sf = Units.GetConversionFactor(units, _converterSettings.Current.SpeckleUnits);
var scaledTransform = new[]
{
matrix.M11,
matrix.M12,
matrix.M13,
matrix.M14 * sf,
matrix.M21,
matrix.M22,
matrix.M23,
matrix.M24 * sf,
matrix.M31,
matrix.M32,
matrix.M33,
matrix.M34 * sf,
matrix.M41,
matrix.M42,
matrix.M43,
matrix.M44
};
var m3d = new Matrix3d(scaledTransform);
if (!m3d.IsScaledOrtho())
{
m3d = new Matrix3d(MakePerpendicular(m3d));
}
return m3d;
}
// https://forums.autodesk.com/t5/net/set-blocktransform-values/m-p/6452121#M49479
private double[] MakePerpendicular(Matrix3d matrix)
{
// Get the basis vectors of the matrix
Vector3d right = new(matrix[0, 0], matrix[1, 0], matrix[2, 0]);
Vector3d up = new(matrix[0, 1], matrix[1, 1], matrix[2, 1]);
Vector3d newForward = right.CrossProduct(up).GetNormal();
Vector3d newUp = newForward.CrossProduct(right).GetNormal();
return
[
right.X,
newUp.X,
newForward.X,
matrix[0, 3],
right.Y,
newUp.Y,
newForward.Y,
matrix[1, 3],
right.Z,
newUp.Z,
newForward.Z,
matrix[2, 3],
0.0,
0.0,
0.0,
matrix[3, 3]
];
}
}
@@ -1,368 +0,0 @@
using System.DoubleNumerics;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Connectors.Utils.Instances;
using Speckle.Core.Kits;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Core.Models.Instances;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// <inheritdoc/>
/// Expects to be a scoped dependency per send or receive operation.
/// </summary>
public class AutocadInstanceObjectManager : IInstanceObjectsManager<AutocadRootObject, List<Entity>>
{
private readonly AutocadLayerManager _autocadLayerManager;
private Dictionary<string, InstanceProxy> InstanceProxies { get; set; } = new();
private Dictionary<string, List<InstanceProxy>> InstanceProxiesByDefinitionId { get; set; } = new();
private Dictionary<string, InstanceDefinitionProxy> DefinitionProxies { get; set; } = new();
private Dictionary<string, AutocadRootObject> FlatAtomicObjects { get; set; } = new();
public AutocadInstanceObjectManager(AutocadLayerManager autocadLayerManager)
{
_autocadLayerManager = autocadLayerManager;
}
public UnpackResult<AutocadRootObject> UnpackSelection(IEnumerable<AutocadRootObject> objects)
{
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
foreach (var obj in objects)
{
if (obj.Root is BlockReference blockReference && !blockReference.IsDynamicBlock)
{
UnpackInstance(blockReference, 0, transaction);
}
FlatAtomicObjects[obj.ApplicationId] = obj;
}
return new(FlatAtomicObjects.Values.ToList(), InstanceProxies, DefinitionProxies.Values.ToList());
}
private void UnpackInstance(BlockReference instance, int depth, Transaction transaction)
{
var instanceIdString = instance.Handle.Value.ToString();
var definitionId = instance.BlockTableRecord;
InstanceProxies[instanceIdString] = new InstanceProxy()
{
applicationId = instanceIdString,
DefinitionId = definitionId.ToString(),
MaxDepth = depth,
Transform = GetMatrix(instance.BlockTransform.ToArray()),
Units = Application.DocumentManager.CurrentDocument.Database.Insunits.ToSpeckleString()
};
// For each block instance that has the same definition, we need to keep track of the "maximum depth" at which is found.
// This will enable on receive to create them in the correct order (descending by max depth, interleaved definitions and instances).
// We need to interleave the creation of definitions and instances, as some definitions may depend on instances.
if (
!InstanceProxiesByDefinitionId.TryGetValue(
definitionId.ToString(),
out List<InstanceProxy> instanceProxiesWithSameDefinition
)
)
{
instanceProxiesWithSameDefinition = new List<InstanceProxy>();
InstanceProxiesByDefinitionId[definitionId.ToString()] = instanceProxiesWithSameDefinition;
}
// We ensure that all previous instance proxies that have the same definition are at this max depth. I kind of have a feeling this can be done more elegantly, but YOLO
foreach (var instanceProxy in instanceProxiesWithSameDefinition)
{
instanceProxy.MaxDepth = depth;
}
instanceProxiesWithSameDefinition.Add(InstanceProxies[instanceIdString]);
if (DefinitionProxies.TryGetValue(definitionId.ToString(), out InstanceDefinitionProxy value))
{
value.MaxDepth = depth;
return; // exit fast - we've parsed this one so no need to go further
}
var definition = (BlockTableRecord)transaction.GetObject(definitionId, OpenMode.ForRead);
// definition.Origin
var definitionProxy = new InstanceDefinitionProxy()
{
applicationId = definitionId.ToString(),
Objects = new(),
MaxDepth = depth,
["name"] = definition.Name,
["comments"] = definition.Comments,
["units"] = definition.Units // ? not sure needed?
};
// Go through each definition object
foreach (ObjectId id in definition)
{
var obj = transaction.GetObject(id, OpenMode.ForRead);
var handleIdString = obj.Handle.Value.ToString();
definitionProxy.Objects.Add(handleIdString);
if (obj is BlockReference blockReference && !blockReference.IsDynamicBlock)
{
UnpackInstance(blockReference, depth + 1, transaction);
}
FlatAtomicObjects[handleIdString] = new(obj, handleIdString);
}
DefinitionProxies[definitionId.ToString()] = definitionProxy;
}
public BakeResult BakeInstances(
List<(string[] layerPath, IInstanceComponent obj)> instanceComponents,
Dictionary<string, List<Entity>> applicationIdMap,
string baseLayerName,
Action<string, double?>? onOperationProgressed
)
{
var sortedInstanceComponents = instanceComponents
.OrderByDescending(x => x.obj.MaxDepth) // Sort by max depth, so we start baking from the deepest element first
.ThenBy(x => x.obj is InstanceDefinitionProxy ? 0 : 1) // Ensure we bake the deepest definition first, then any instances that depend on it
.ToList();
var definitionIdAndApplicationIdMap = new Dictionary<string, ObjectId>();
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var conversionResults = new List<ReceiveConversionResult>();
var createdObjectIds = new List<string>();
var consumedObjectIds = new List<string>();
var count = 0;
foreach (var (path, instanceOrDefinition) in sortedInstanceComponents)
{
try
{
onOperationProgressed?.Invoke("Converting blocks", (double)++count / sortedInstanceComponents.Count);
if (instanceOrDefinition is InstanceDefinitionProxy { applicationId: not null } definitionProxy)
{
// TODO: create definition (block table record)
var constituentEntities = definitionProxy.Objects
.Select(id => applicationIdMap.TryGetValue(id, out List<Entity> value) ? value : null)
.Where(x => x is not null)
.SelectMany(ent => ent)
.ToList();
var record = new BlockTableRecord();
var objectIds = new ObjectIdCollection();
record.Name = baseLayerName;
if (definitionProxy["name"] is string name)
{
record.Name += name;
}
else
{
record.Name += definitionProxy.applicationId;
}
foreach (var entity in constituentEntities)
{
// record.AppendEntity(entity);
objectIds.Add(entity.ObjectId);
}
using var blockTable = (BlockTable)
transaction.GetObject(Application.DocumentManager.CurrentDocument.Database.BlockTableId, OpenMode.ForWrite);
var id = blockTable.Add(record);
record.AssumeOwnershipOf(objectIds);
definitionIdAndApplicationIdMap[definitionProxy.applicationId] = id;
transaction.AddNewlyCreatedDBObject(record, true);
var consumedEntitiesHandleValues = constituentEntities.Select(ent => ent.Handle.Value.ToString()).ToArray();
consumedObjectIds.AddRange(consumedEntitiesHandleValues);
createdObjectIds.RemoveAll(newId => consumedEntitiesHandleValues.Contains(newId));
}
else if (
instanceOrDefinition is InstanceProxy instanceProxy
&& definitionIdAndApplicationIdMap.TryGetValue(instanceProxy.DefinitionId, out ObjectId definitionId)
)
{
var matrix3d = GetMatrix3d(instanceProxy.Transform, instanceProxy.Units);
var insertionPoint = Point3d.Origin.TransformBy(matrix3d);
var modelSpaceBlockTableRecord = Application.DocumentManager.CurrentDocument.Database.GetModelSpace(
OpenMode.ForWrite
);
_autocadLayerManager.CreateLayerForReceive(path[0]);
var blockRef = new BlockReference(insertionPoint, definitionId)
{
BlockTransform = matrix3d,
Layer = path[0],
};
modelSpaceBlockTableRecord.AppendEntity(blockRef);
if (instanceProxy.applicationId != null)
{
applicationIdMap[instanceProxy.applicationId] = new List<Entity> { blockRef };
}
transaction.AddNewlyCreatedDBObject(blockRef, true);
conversionResults.Add(
new(Status.SUCCESS, instanceProxy, blockRef.Handle.Value.ToString(), "Instance (Block)")
);
createdObjectIds.Add(blockRef.Handle.Value.ToString());
}
}
catch (Exception ex) when (!ex.IsFatal())
{
conversionResults.Add(new(Status.ERROR, instanceOrDefinition as Base ?? new Base(), null, null, ex));
}
}
transaction.Commit();
return new(createdObjectIds, consumedObjectIds, conversionResults);
}
/// <summary>
/// Cleans up any previously created instances.
/// POC: This function will not be able to delete block definitions if the user creates a new one composed out of received definitions.
/// </summary>
/// <param name="namePrefix"></param>
public void PurgeInstances(string namePrefix)
{
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var instanceDefinitionsToDelete = new Dictionary<string, BlockTableRecord>();
// Helper function that recurses through a given block table record's constituent objects and purges inner instances as required.
void TraverseAndClean(BlockTableRecord btr)
{
foreach (var objectId in btr)
{
var obj = transaction.GetObject(objectId, OpenMode.ForRead) as BlockReference;
if (obj == null)
{
continue;
}
var definition = (BlockTableRecord)transaction.GetObject(obj.BlockTableRecord, OpenMode.ForRead);
if (obj.IsErased)
{
TraverseAndClean(definition);
continue;
}
obj.UpgradeOpen();
obj.Erase();
TraverseAndClean(definition);
instanceDefinitionsToDelete[obj.BlockTableRecord.ToString()] = definition;
}
}
using var blockTable = (BlockTable)
transaction.GetObject(Application.DocumentManager.CurrentDocument.Database.BlockTableId, OpenMode.ForRead);
// deep clean definitions
foreach (var btrId in blockTable)
{
var btr = (BlockTableRecord)transaction.GetObject(btrId, OpenMode.ForRead);
if (btr.Name.Contains(namePrefix)) // POC: this is tightly coupled with a naming convention for definitions in the instance object manager
{
TraverseAndClean(btr);
instanceDefinitionsToDelete[btr.Name] = btr;
}
}
foreach (var def in instanceDefinitionsToDelete.Values)
{
def.UpgradeOpen();
def.Erase();
}
transaction.Commit();
}
private Matrix4x4 GetMatrix(double[] t)
{
return new Matrix4x4(
t[0],
t[1],
t[2],
t[3],
t[4],
t[5],
t[6],
t[7],
t[8],
t[9],
t[10],
t[11],
t[12],
t[13],
t[14],
t[15]
);
}
private Matrix3d GetMatrix3d(Matrix4x4 matrix, string units)
{
var sf = Units.GetConversionFactor(
units,
Application.DocumentManager.CurrentDocument.Database.Insunits.ToSpeckleString()
);
var scaledTransform = new[]
{
matrix.M11,
matrix.M12,
matrix.M13,
matrix.M14 * sf,
matrix.M21,
matrix.M22,
matrix.M23,
matrix.M24 * sf,
matrix.M31,
matrix.M32,
matrix.M33,
matrix.M34 * sf,
matrix.M41,
matrix.M42,
matrix.M43,
matrix.M44
};
var m3d = new Matrix3d(scaledTransform);
if (!m3d.IsScaledOrtho())
{
m3d = new Matrix3d(MakePerpendicular(m3d));
}
return m3d;
}
// https://forums.autodesk.com/t5/net/set-blocktransform-values/m-p/6452121#M49479
private static double[] MakePerpendicular(Matrix3d matrix)
{
// Get the basis vectors of the matrix
Vector3d right = new(matrix[0, 0], matrix[1, 0], matrix[2, 0]);
Vector3d up = new(matrix[0, 1], matrix[1, 1], matrix[2, 1]);
Vector3d newForward = right.CrossProduct(up).GetNormal();
Vector3d newUp = newForward.CrossProduct(right).GetNormal();
return new[]
{
right.X,
newUp.X,
newForward.X,
matrix[0, 3],
right.Y,
newUp.Y,
newForward.Y,
matrix[1, 3],
right.Z,
newUp.Z,
newForward.Z,
matrix[2, 3],
0.0,
0.0,
0.0,
matrix[3, 3],
};
}
}
@@ -0,0 +1,161 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Common.Instances;
using Speckle.Converters.Common;
using Speckle.DoubleNumerics;
using Speckle.Sdk;
using Speckle.Sdk.Models.Instances;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency per send operation.
/// </summary>
public class AutocadInstanceUnpacker : IInstanceUnpacker<AutocadRootObject>
{
private readonly IHostToSpeckleUnitConverter<UnitsValue> _unitsConverter;
private readonly IInstanceObjectsManager<AutocadRootObject, List<Entity>> _instanceObjectsManager;
private readonly ILogger<AutocadInstanceUnpacker> _logger;
public AutocadInstanceUnpacker(
IHostToSpeckleUnitConverter<UnitsValue> unitsConverter,
IInstanceObjectsManager<AutocadRootObject, List<Entity>> instanceObjectsManager,
ILogger<AutocadInstanceUnpacker> logger
)
{
_unitsConverter = unitsConverter;
_instanceObjectsManager = instanceObjectsManager;
_logger = logger;
}
public UnpackResult<AutocadRootObject> UnpackSelection(IEnumerable<AutocadRootObject> objects)
{
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
foreach (var obj in objects)
{
// Note: isDynamicBlock always returns false for a selection of doc objects. Instances of dynamic blocks are represented in the document as blocks that have
// a definition reference to the anonymous block table record.
if (obj.Root is BlockReference blockReference && !blockReference.IsDynamicBlock)
{
UnpackInstance(blockReference, 0, transaction);
}
_instanceObjectsManager.AddAtomicObject(obj.ApplicationId, obj);
}
return _instanceObjectsManager.GetUnpackResult();
}
private void UnpackInstance(BlockReference instance, int depth, Transaction transaction)
{
try
{
string instanceId = instance.GetSpeckleApplicationId();
// If this instance has a reference to an anonymous block, it means it's spawned from a dynamic block. Anonymous blocks are
// used to represent specific "instances" of dynamic ones.
// We do not want to send the full dynamic block definition, but its current "instance", as such here we're making sure we
// take up the anon block table reference definition (if it exists). If it's not an instance of a dynamic block, we're
// using the normal def reference.
ObjectId definitionId = !instance.AnonymousBlockTableRecord.IsNull
? instance.AnonymousBlockTableRecord
: instance.BlockTableRecord;
InstanceProxy instanceProxy =
new()
{
applicationId = instanceId,
definitionId = definitionId.ToString(),
maxDepth = depth,
transform = GetMatrix(instance.BlockTransform.ToArray()),
units = _unitsConverter.ConvertOrThrow(Application.DocumentManager.CurrentDocument.Database.Insunits)
};
_instanceObjectsManager.AddInstanceProxy(instanceId, instanceProxy);
// For each block instance that has the same definition, we need to keep track of the "maximum depth" at which is found.
// This will enable on receive to create them in the correct order (descending by max depth, interleaved definitions and instances).
// We need to interleave the creation of definitions and instances, as some definitions may depend on instances.
if (
!_instanceObjectsManager.TryGetInstanceProxiesFromDefinitionId(
definitionId.ToString(),
out List<InstanceProxy>? instanceProxiesWithSameDefinition
)
)
{
instanceProxiesWithSameDefinition = new List<InstanceProxy>();
_instanceObjectsManager.AddInstanceProxiesByDefinitionId(
definitionId.ToString(),
instanceProxiesWithSameDefinition
);
}
// We ensure that all previous instance proxies that have the same definition are at this max depth. I kind of have a feeling this can be done more elegantly, but YOLO
foreach (var instanceProxyWithSameDefinition in instanceProxiesWithSameDefinition)
{
if (instanceProxyWithSameDefinition.maxDepth < depth)
{
instanceProxyWithSameDefinition.maxDepth = depth;
}
}
instanceProxiesWithSameDefinition.Add(_instanceObjectsManager.GetInstanceProxy(instanceId));
if (
_instanceObjectsManager.TryGetInstanceDefinitionProxy(
definitionId.ToString(),
out InstanceDefinitionProxy? value
)
)
{
int depthDifference = depth - value.maxDepth;
if (depthDifference > 0)
{
// all MaxDepth of children definitions and its instances should be increased with difference of depth
_instanceObjectsManager.UpdateChildrenMaxDepth(value, depthDifference);
}
return;
}
var definition = (BlockTableRecord)transaction.GetObject(definitionId, OpenMode.ForRead);
var definitionProxy = new InstanceDefinitionProxy()
{
applicationId = definitionId.ToString(),
objects = new(),
maxDepth = depth,
name = !instance.AnonymousBlockTableRecord.IsNull ? "Dynamic instance " + definitionId : definition.Name
};
// Go through each definition object
foreach (ObjectId id in definition)
{
Entity obj = (Entity)transaction.GetObject(id, OpenMode.ForRead);
// In the case of dynamic blocks, this prevents sending objects that are not visibile in its current state.
if (!obj.Visible)
{
continue;
}
string appId = obj.GetSpeckleApplicationId();
definitionProxy.objects.Add(appId);
if (obj is BlockReference blockReference)
{
UnpackInstance(blockReference, depth + 1, transaction);
}
_instanceObjectsManager.AddAtomicObject(appId, new(obj, appId));
}
_instanceObjectsManager.AddDefinitionProxy(definitionId.ToString(), definitionProxy);
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed unpacking Autocad instance");
}
}
private Matrix4x4 GetMatrix(double[] t) =>
new(t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7], t[8], t[9], t[10], t[11], t[12], t[13], t[14], t[15]);
}
@@ -1,38 +1,75 @@
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.EditorInput;
using Autodesk.AutoCAD.LayerManager;
using Speckle.Core.Models;
using Speckle.Core.Models.GraphTraversal;
using Speckle.Connectors.Common.Operations.Receive;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models.Collections;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency for a given operation and helps with layer creation and cleanup.
/// </summary>
public class AutocadLayerManager
public class AutocadLayerBaker : TraversalContextUnpacker
{
private readonly AutocadContext _autocadContext;
private readonly string _layerFilterName = "Speckle";
// POC: Will be addressed to move it into AutocadContext!
private readonly AutocadContext _autocadContext;
private readonly AutocadMaterialBaker _materialBaker;
private readonly AutocadColorBaker _colorBaker;
private Document Doc => Application.DocumentManager.MdiActiveDocument;
private readonly HashSet<string> _uniqueLayerNames = new();
public AutocadLayerManager(AutocadContext autocadContext)
public AutocadLayerBaker(
AutocadContext autocadContext,
AutocadMaterialBaker materialBaker,
AutocadColorBaker colorBaker
)
{
_autocadContext = autocadContext;
_materialBaker = materialBaker;
_colorBaker = colorBaker;
}
/// <summary>
/// Will create a layer with the provided name, or, if it finds an existing one, will "purge" all objects from it.
/// This ensures we're creating the new objects we've just received rather than overlaying them.
/// </summary>
/// <param name="layerName">Name to search layer for purge and create.</param>
public void CreateLayerForReceive(string layerName)
/// <returns>The name of the existing or created layer</returns>
public string CreateLayerForReceive(Collection[] layerPath, string baseLayerPrefix)
{
string[] namePath = layerPath.Select(c => c.name).ToArray();
string layerName = _autocadContext.RemoveInvalidChars(baseLayerPrefix + string.Join("-", namePath));
if (!_uniqueLayerNames.Add(layerName))
{
return;
return layerName;
}
// get the color and material if any, of the leaf collection with a color
AutocadColor? layerColor = null;
ObjectId layerMaterial = ObjectId.Null;
if (_colorBaker.ObjectColorsIdMap.Count > 0 || _materialBaker.ObjectMaterialsIdMap.Count > 0)
{
bool foundColor = false;
bool foundMaterial = false;
// Goes up the tree to find any potential parent layer that has a material/color
for (int j = layerPath.Length - 1; j >= 0; j--)
{
string layerId = layerPath[j].applicationId ?? layerPath[j].id.NotNull();
if (!foundColor)
{
foundColor = _colorBaker.ObjectColorsIdMap.TryGetValue(layerId, out layerColor);
}
if (!foundMaterial)
{
foundMaterial = _materialBaker.ObjectMaterialsIdMap.TryGetValue(layerId, out layerMaterial);
}
if (foundColor && foundMaterial)
{
break;
}
}
}
Doc.LockDocument();
@@ -42,28 +79,41 @@ public class AutocadLayerManager
transaction.TransactionManager.GetObject(Doc.Database.LayerTableId, OpenMode.ForRead) as LayerTable;
LayerTableRecord layerTableRecord = new() { Name = layerName };
if (layerColor is not null)
{
layerTableRecord.Color = layerColor;
}
if (layerMaterial != ObjectId.Null)
{
layerTableRecord.MaterialId = layerMaterial;
}
bool hasLayer = layerTable != null && layerTable.Has(layerName);
if (hasLayer)
{
TypedValue[] tvs = { new((int)DxfCode.LayerName, layerName) };
TypedValue[] tvs = [new((int)DxfCode.LayerName, layerName)];
SelectionFilter selectionFilter = new(tvs);
SelectionSet selectionResult = Doc.Editor.SelectAll(selectionFilter).Value;
if (selectionResult == null)
{
return;
return layerName;
}
foreach (SelectedObject selectedObject in selectionResult)
{
transaction.GetObject(selectedObject.ObjectId, OpenMode.ForWrite).Erase();
}
return;
return layerName;
}
layerTable?.UpgradeOpen();
layerTable?.Add(layerTableRecord);
transaction.AddNewlyCreatedDBObject(layerTableRecord, true);
transaction.Commit();
return layerName;
}
public void DeleteAllLayersByPrefix(string prefix)
@@ -72,19 +122,26 @@ public class AutocadLayerManager
using Transaction transaction = Doc.TransactionManager.StartTransaction();
var layerTable = (LayerTable)transaction.TransactionManager.GetObject(Doc.Database.LayerTableId, OpenMode.ForRead);
var activeLayer = (LayerTableRecord)transaction.GetObject(Doc.Database.Clayer, OpenMode.ForRead);
foreach (var layerId in layerTable)
{
var layer = (LayerTableRecord)transaction.GetObject(layerId, OpenMode.ForRead);
var layerName = layer.Name;
if (layer.Name.Contains(prefix))
{
if (activeLayer.Name == layerName)
{
// Layer `0` cannot be deleted or renamed in Autocad, so it is safe to get zero layer id.
ObjectId zeroLayerId = layerTable["0"];
Doc.Database.Clayer = zeroLayerId;
}
// Delete objects from this layer
TypedValue[] tvs = { new((int)DxfCode.LayerName, layerName) };
TypedValue[] tvs = [new((int)DxfCode.LayerName, layerName)];
SelectionFilter selectionFilter = new(tvs);
SelectionSet selectionResult = Doc.Editor.SelectAll(selectionFilter).Value;
if (selectionResult == null)
{
return;
continue;
}
foreach (SelectedObject selectedObject in selectionResult)
{
@@ -142,19 +199,4 @@ public class AutocadLayerManager
groupFilter.NestedFilters.Add(layerFilter);
Doc.Database.LayerFilters = layerFilterTree;
}
/// <summary>
/// Gets a valid layer name for a given context.
/// </summary>
/// <param name="context"></param>
/// <param name="baseLayerPrefix"></param>
/// <returns></returns>
public string GetLayerPath(TraversalContext context, string baseLayerPrefix)
{
string[] collectionBasedPath = context.GetAscendantOfType<Collection>().Select(c => c.name).Reverse().ToArray();
string[] path = collectionBasedPath.Length != 0 ? collectionBasedPath : context.GetPropertyPath().ToArray();
var name = baseLayerPrefix + string.Join("-", path);
return _autocadContext.RemoveInvalidChars(name);
}
}
@@ -0,0 +1,30 @@
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Sdk;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.Autocad.HostApp;
public class AutocadLayerUnpacker
{
private readonly Dictionary<string, Layer> _layerCollectionCache = new();
public Layer GetOrCreateSpeckleLayer(Entity entity, Transaction tr, out LayerTableRecord? layer)
{
string layerName = entity.Layer;
layer = null;
if (_layerCollectionCache.TryGetValue(layerName, out Layer? speckleLayer))
{
return speckleLayer;
}
if (tr.GetObject(entity.LayerId, OpenMode.ForRead) is LayerTableRecord autocadLayer)
{
speckleLayer = new Layer(layerName) { applicationId = autocadLayer.GetSpeckleApplicationId() }; // Do not use handle directly, see note in the 'GetSpeckleApplicationId' method
_layerCollectionCache[layerName] = speckleLayer;
layer = autocadLayer;
return speckleLayer;
}
throw new SpeckleException("Unexpected condition in GetOrCreateSpeckleLayer");
}
}
@@ -0,0 +1,201 @@
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.GraphicsInterface;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Operations;
using Speckle.Objects.Other;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Models;
using Material = Autodesk.AutoCAD.DatabaseServices.Material;
using RenderMaterial = Speckle.Objects.Other.RenderMaterial;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency for a given operation and helps with layer creation and cleanup.
/// </summary>
public class AutocadMaterialBaker
{
private readonly ILogger<AutocadMaterialBaker> _logger;
private readonly AutocadContext _autocadContext;
private Document Doc => Application.DocumentManager.MdiActiveDocument;
public Dictionary<string, ObjectId> ObjectMaterialsIdMap { get; } = new();
public AutocadMaterialBaker(AutocadContext autocadContext, ILogger<AutocadMaterialBaker> logger)
{
_autocadContext = autocadContext;
_logger = logger;
}
/// <summary>
/// Try to get material id from original object or its parent (if provided) as fallback).
/// It covers one-to-many problem, i.e.
/// - rhino: Brep (material id is extracted into render material proxy objects) -> [Mesh, Mesh, ...] (child objects application ids ARE NOT EXIST in render material proxy objects)
/// - revit : RevitElement (material IS NOT extracted into render material proxy objects) -> [Mesh, Mesh...] (child objects application ids EXIST in render material proxy objects)
/// </summary>
/// <remarks>
/// This is a question that we need to answer where to handle these cases.
/// We alsa do reverse search for layer render materials on Revit Receive, and mutating the proxy list accordingly.
/// These cases are increasing, and need some ideation around it before going more messy.
/// </remarks>
public bool TryGetMaterialId(Base originalObject, Base? parentObject, out ObjectId materialId)
{
materialId = ObjectId.Null;
var originalObjectId = originalObject.applicationId ?? originalObject.id.NotNull();
if (ObjectMaterialsIdMap.TryGetValue(originalObjectId, out ObjectId originalObjectMaterialId))
{
materialId = originalObjectMaterialId;
return true;
}
if (parentObject is null)
{
return false;
}
var subObjectId = parentObject.applicationId ?? parentObject.id.NotNull();
if (ObjectMaterialsIdMap.TryGetValue(subObjectId, out ObjectId subObjectMaterialId))
{
materialId = subObjectMaterialId;
return true;
}
return false;
}
/// <summary>
/// Removes all materials with a name starting with <paramref name="namePrefix"/> from the active document
/// </summary>
/// <param name="namePrefix"></param>
public void PurgeMaterials(string namePrefix)
{
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
if (transaction.GetObject(Doc.Database.MaterialDictionaryId, OpenMode.ForWrite) is DBDictionary materialDict)
{
foreach (var entry in materialDict)
{
try
{
if (entry.Key.Contains(namePrefix))
{
materialDict.Remove(entry.Value);
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to purge a material from the document");
}
}
}
transaction.Commit();
}
public void ParseAndBakeRenderMaterials(
IReadOnlyCollection<RenderMaterialProxy> materialProxies,
string baseLayerPrefix,
IProgress<CardProgress> onOperationProgressed
)
{
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
var materialDict = transaction.GetObject(Doc.Database.MaterialDictionaryId, OpenMode.ForWrite) as DBDictionary;
if (materialDict == null)
{
// POC: we should report failed conversion here if material dict is not accessible, but it is not linked to a Base source
transaction.Commit();
return;
}
var count = 0;
foreach (RenderMaterialProxy materialProxy in materialProxies)
{
onOperationProgressed.Report(new("Converting render materials", (double)++count / materialProxies.Count));
// bake render material
RenderMaterial renderMaterial = materialProxy.value;
string renderMaterialId = renderMaterial.applicationId ?? renderMaterial.id.NotNull();
ObjectId materialId = ObjectId.Null;
if (!ObjectMaterialsIdMap.TryGetValue(renderMaterialId, out materialId))
{
(materialId, ReceiveConversionResult result) = BakeMaterial(
renderMaterial,
baseLayerPrefix,
materialDict,
transaction
);
}
if (materialId == ObjectId.Null)
{
continue;
}
// parse render material object ids
foreach (string objectId in materialProxy.objects)
{
ObjectMaterialsIdMap[objectId] = materialId;
}
}
transaction.Commit();
}
private (ObjectId, ReceiveConversionResult) BakeMaterial(
RenderMaterial renderMaterial,
string baseLayerPrefix,
DBDictionary materialDict,
Transaction tr
)
{
ObjectId materialId = ObjectId.Null;
try
{
// 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?
string renderMaterialId = renderMaterial.applicationId ?? renderMaterial.id.NotNull();
string matName = _autocadContext.RemoveInvalidChars(
$"{renderMaterial.name}-({renderMaterialId})-{baseLayerPrefix}"
);
MaterialMap map = new();
MaterialOpacityComponent opacity = new(renderMaterial.opacity, map);
var systemDiffuse = System.Drawing.Color.FromArgb(renderMaterial.diffuse);
EntityColor entityDiffuseColor = new(systemDiffuse.R, systemDiffuse.G, systemDiffuse.B);
MaterialColor diffuseColor = new(Method.Override, 1, entityDiffuseColor);
MaterialDiffuseComponent diffuse = new(diffuseColor, map);
Material mat =
new()
{
Name = matName,
Opacity = opacity,
Diffuse = diffuse
};
if (renderMaterial["reflectivity"] is double reflectivity)
{
mat.Reflectivity = reflectivity;
}
if (renderMaterial["ior"] is double ior)
{
mat.Refraction = new(ior, map);
}
// POC: assumes all materials with this prefix has already been purged from doc
materialId = materialDict.SetAt(matName, mat);
tr.AddNewlyCreatedDBObject(mat, true);
return (materialId, new(Status.SUCCESS, renderMaterial, matName, "Material"));
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to add a material to the document");
return (materialId, new(Status.ERROR, renderMaterial, null, null, ex));
}
}
}
@@ -0,0 +1,133 @@
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Objects.Other;
using Speckle.Sdk;
using Material = Autodesk.AutoCAD.DatabaseServices.Material;
using RenderMaterial = Speckle.Objects.Other.RenderMaterial;
namespace Speckle.Connectors.Autocad.HostApp;
/// <summary>
/// Expects to be a scoped dependency for a given operation and helps with layer creation and cleanup.
/// </summary>
public class AutocadMaterialUnpacker
{
private readonly ILogger<AutocadMaterialUnpacker> _logger;
public AutocadMaterialUnpacker(ILogger<AutocadMaterialUnpacker> logger)
{
_logger = logger;
}
/// <summary>
/// Iterates through a given set of autocad objects and collects their materials. Note: expects objects to be "atomic", and extracted out of their instances already.
/// </summary>
/// <param name="unpackedAutocadObjects"></param>
/// <param name="layers"></param>
/// <returns></returns>
public List<RenderMaterialProxy> UnpackMaterials(
List<AutocadRootObject> unpackedAutocadObjects,
List<LayerTableRecord> layers
)
{
Dictionary<string, RenderMaterialProxy> materialProxies = new();
using var transaction = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
// Stage 1: unpack materials from objects
foreach (AutocadRootObject rootObj in unpackedAutocadObjects)
{
try
{
Entity entity = rootObj.Root;
// skip inherited materials
if (entity.Material == "ByLayer" || entity.Material == "ByBlock")
{
continue;
}
if (transaction.GetObject(entity.MaterialId, OpenMode.ForRead) is Material material)
{
string materialId = material.GetSpeckleApplicationId();
if (materialProxies.TryGetValue(materialId, out RenderMaterialProxy? value))
{
value.objects.Add(rootObj.ApplicationId);
}
else
{
RenderMaterialProxy materialProxy = ConvertMaterialToRenderMaterialProxy(material, materialId);
materialProxy.objects.Add(rootObj.ApplicationId);
materialProxies[materialId] = materialProxy;
}
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to unpack render material from Autocad Entity");
}
}
// Stage 2: make sure we collect layer materials as well
foreach (LayerTableRecord layer in layers)
{
try
{
if (transaction.GetObject(layer.MaterialId, OpenMode.ForRead) is Material material)
{
string materialId = material.GetSpeckleApplicationId();
string layerId = layer.GetSpeckleApplicationId(); // Do not use handle directly, see note in the 'GetSpeckleApplicationId' method
if (materialProxies.TryGetValue(materialId, out RenderMaterialProxy? value))
{
value.objects.Add(layerId);
}
else
{
RenderMaterialProxy materialProxy = ConvertMaterialToRenderMaterialProxy(material, materialId);
materialProxy.objects.Add(layerId);
materialProxies[materialId] = materialProxy;
}
}
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogError(ex, "Failed to unpack render material from Autocad Layer");
}
}
transaction.Commit();
return materialProxies.Values.ToList();
}
private RenderMaterialProxy ConvertMaterialToRenderMaterialProxy(Material material, string id)
{
EntityColor diffuseColor = material.Diffuse.Color.Color;
System.Drawing.Color diffuse = System.Drawing.Color.FromArgb(
diffuseColor.Red,
diffuseColor.Green,
diffuseColor.Blue
);
RenderMaterial renderMaterial =
new()
{
name = material.Name,
opacity = material.Opacity.Percentage,
diffuse = diffuse.ToArgb(),
applicationId = id
};
// Add additional properties
renderMaterial["ior"] = material.Refraction.Index;
renderMaterial["reflectivity"] = material.Reflectivity;
return new RenderMaterialProxy()
{
value = renderMaterial,
objects = new(),
applicationId = id
};
}
}
@@ -1,19 +0,0 @@
using System.IO;
using Speckle.Core.Kits; // POC: Must go https://spockle.atlassian.net/browse/CNX-9325
namespace Speckle.Connectors.Autocad.HostApp;
public class AutocadSettings
{
public AutocadSettings(HostApplication hostAppInfo, HostAppVersion hostAppVersion)
{
HostAppInfo = hostAppInfo;
HostAppVersion = hostAppVersion;
Modules = new[] { new DirectoryInfo(typeof(AutocadSettings).Assembly.Location).Parent.FullName };
}
public HostApplication HostAppInfo { get; private set; }
public HostAppVersion HostAppVersion { get; private set; }
public IReadOnlyList<string> Modules { get; private set; }
}
@@ -1,39 +0,0 @@
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Core.Kits;
using Speckle.Core.Logging;
namespace Speckle.Connectors.Autocad.HostApp.Extensions;
public static class AcadUnitsExtension
{
public static string ToSpeckleString(this UnitsValue units)
{
switch (units)
{
case UnitsValue.Millimeters:
return Units.Millimeters;
case UnitsValue.Centimeters:
return Units.Centimeters;
case UnitsValue.Meters:
return Units.Meters;
case UnitsValue.Kilometers:
return Units.Kilometers;
case UnitsValue.Inches:
case UnitsValue.USSurveyInch:
return Units.Inches;
case UnitsValue.Feet:
case UnitsValue.USSurveyFeet:
return Units.Feet;
case UnitsValue.Yards:
case UnitsValue.USSurveyYard:
return Units.Yards;
case UnitsValue.Miles:
case UnitsValue.USSurveyMile:
return Units.Miles;
case UnitsValue.Undefined:
return Units.None;
default:
throw new SpeckleException($"The Unit System \"{units}\" is unsupported.");
}
}
}
@@ -1,4 +1,4 @@
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Runtime;
using Speckle.Connectors.Autocad.Operations.Send;
@@ -25,7 +25,7 @@ public static class DocumentExtensions
{
if (tr.GetObject(myObjectId, OpenMode.ForRead) is DBObject dbObject)
{
objects.Add(new(dbObject, objectIdHandle));
objects.Add(new((Entity)dbObject, objectIdHandle));
}
}
}
@@ -6,12 +6,16 @@ namespace Speckle.Connectors.Autocad.HostApp.Extensions;
public static class EditorExtensions
{
public static void Zoom(this Editor editor, Extents3d ext)
public static void Zoom(this Editor? editor, Extents3d ext)
{
#if NET8_0
ArgumentNullException.ThrowIfNull(editor);
#else
if (editor == null)
{
throw new ArgumentNullException(nameof(editor));
}
#endif
using ViewTableRecord view = editor.GetCurrentView();
@@ -0,0 +1,44 @@
using Autodesk.AutoCAD.DatabaseServices;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.HostApp.Extensions;
public static class SpeckleApplicationIdExtensions
{
/// <summary>
/// Retrieves the Speckle object application id
/// </summary>
public static string GetSpeckleApplicationId(this Entity entity) => entity.Handle.Value.ToString();
/// <summary>
/// Retrieves the Speckle object application id
/// </summary>
public static string GetSpeckleApplicationId(this DBObject dbObj) => dbObj.Handle.Value.ToString();
/// <summary>
/// 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.
/// </summary>
public static string GetSpeckleApplicationId(this LayerTableRecord layerTableRecord) =>
$"layer_{layerTableRecord.Handle.Value}";
/// <summary>
/// Retrieves a unique material Speckle object application id.
/// </summary>
/// <remarks> Unconfirmed, but materials and geometries may have same application ids.</remarks>
public static string GetSpeckleApplicationId(this Material material) => $"material_{material.Handle.Value}";
/// <summary>
/// Retrieves a unique color Speckle object application id from the rgb value and color source.
/// </summary>
/// <remarks> Uses the rgb value since color names are not unique </remarks>
public static string GetSpeckleApplicationId(this AutocadColor color) =>
$"color_{color.ColorValue}_{(color.IsByBlock ? "block" : color.IsByLayer ? "layer" : "object")}";
/// <summary>
/// Retrieves a unique group Speckle object application id.
/// </summary>
/// <remarks>Unconfirmed, but groups and geometries may have same application ids.</remarks>
public static string GetSpeckleApplicationId(this Group group) => $"group_{group.Handle.Value}";
}
@@ -1,7 +0,0 @@
namespace Speckle.Connectors.Autocad.Interfaces;
internal interface IAutocadPlugin
{
void Initialise();
void Shutdown();
}
@@ -1,15 +1,19 @@
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.HostApp.Extensions;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Core.Models;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Connectors.Utils.Instances;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Extensions;
using Speckle.Connectors.Common.Operations;
using Speckle.Connectors.Common.Operations.Receive;
using Speckle.Converters.Common;
using Speckle.Core.Logging;
using Speckle.Core.Models.GraphTraversal;
using Speckle.Core.Models.Instances;
using Speckle.Sdk;
using Speckle.Sdk.Common;
using Speckle.Sdk.Dependencies;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.Instances;
using AutocadColor = Autodesk.AutoCAD.Colors.Color;
namespace Speckle.Connectors.Autocad.Operations.Receive;
@@ -18,108 +22,134 @@ namespace Speckle.Connectors.Autocad.Operations.Receive;
/// </summary>
public class AutocadHostObjectBuilder : IHostObjectBuilder
{
private readonly AutocadLayerManager _autocadLayerManager;
private readonly AutocadLayerBaker _layerBaker;
private readonly IRootToHostConverter _converter;
private readonly GraphTraversal _traversalFunction;
// private readonly HashSet<string> _uniqueLayerNames = new();
private readonly IInstanceObjectsManager<AutocadRootObject, List<Entity>> _instanceObjectsManager;
private readonly ISyncToThread _syncToThread;
private readonly AutocadGroupBaker _groupBaker;
private readonly AutocadMaterialBaker _materialBaker;
private readonly AutocadColorBaker _colorBaker;
private readonly AutocadInstanceBaker _instanceBaker;
private readonly AutocadContext _autocadContext;
private readonly RootObjectUnpacker _rootObjectUnpacker;
public AutocadHostObjectBuilder(
IRootToHostConverter converter,
GraphTraversal traversalFunction,
AutocadLayerManager autocadLayerManager,
IInstanceObjectsManager<AutocadRootObject, List<Entity>> instanceObjectsManager
AutocadLayerBaker layerBaker,
AutocadGroupBaker groupBaker,
AutocadInstanceBaker instanceBaker,
AutocadMaterialBaker materialBaker,
AutocadColorBaker colorBaker,
ISyncToThread syncToThread,
AutocadContext autocadContext,
RootObjectUnpacker rootObjectUnpacker
)
{
_converter = converter;
_traversalFunction = traversalFunction;
_autocadLayerManager = autocadLayerManager;
_instanceObjectsManager = instanceObjectsManager;
_layerBaker = layerBaker;
_groupBaker = groupBaker;
_instanceBaker = instanceBaker;
_materialBaker = materialBaker;
_colorBaker = colorBaker;
_syncToThread = syncToThread;
_autocadContext = autocadContext;
_rootObjectUnpacker = rootObjectUnpacker;
}
public HostObjectBuilderResult Build(
public async Task<HostObjectBuilderResult> Build(
Base rootObject,
string projectName,
string modelName,
Action<string, double?>? onOperationProgressed,
CancellationToken cancellationToken
IProgress<CardProgress> onOperationProgressed,
CancellationToken _
)
{
// NOTE: This is the only place we apply ISyncToThread across connectors. We need to sync up with main thread here
// after GetObject and Deserialization. It is anti-pattern now. Happiness level 3/10 but works.
return await _syncToThread
.RunOnThread(async () =>
{
await Task.CompletedTask.ConfigureAwait(true);
return BuildSync(rootObject, projectName, modelName, onOperationProgressed);
})
.ConfigureAwait(false);
}
private HostObjectBuilderResult BuildSync(
Base rootObject,
string projectName,
string modelName,
IProgress<CardProgress> onOperationProgressed
)
{
// Prompt the UI conversion started. Progress bar will swoosh.
onOperationProgressed?.Invoke("Converting", null);
onOperationProgressed.Report(new("Converting", null));
// Layer filter for received commit with project and model name
_autocadLayerManager.CreateLayerFilter(projectName, modelName);
//TODO: make the layerManager handle \/ ?
string baseLayerPrefix = $"SPK-{projectName}-{modelName}-";
_layerBaker.CreateLayerFilter(projectName, modelName);
// 0 - Clean then Rock n Roll!
string baseLayerPrefix = _autocadContext.RemoveInvalidChars($"SPK-{projectName}-{modelName}-");
PreReceiveDeepClean(baseLayerPrefix);
List<ReceiveConversionResult> results = new();
List<string> bakedObjectIds = new();
// 1 - Unpack objects and proxies from root commit object
var unpackedRoot = _rootObjectUnpacker.Unpack(rootObject);
// return new(bakedObjectIds, results);
var objectGraph = _traversalFunction.Traverse(rootObject).Where(obj => obj.Current is not Collection);
// 2 - Split atomic objects and instance components with their path
var (atomicObjects, instanceComponents) = _rootObjectUnpacker.SplitAtomicObjectsAndInstances(
unpackedRoot.ObjectsToConvert
);
var atomicObjectsWithPath = _layerBaker.GetAtomicObjectsWithPath(atomicObjects);
var instanceComponentsWithPath = _layerBaker.GetInstanceComponentsWithPath(instanceComponents);
// POC: these are not captured by traversal, so we need to re-add them here
var instanceDefinitionProxies = (rootObject["instanceDefinitionProxies"] as List<object>)
?.Cast<InstanceDefinitionProxy>()
.ToList();
var instanceComponents = new List<(string[] path, IInstanceComponent obj)>();
// POC: these are not captured by traversal, so we need to re-add them here
if (instanceDefinitionProxies != null && instanceDefinitionProxies.Count > 0)
if (unpackedRoot.DefinitionProxies != null && unpackedRoot.DefinitionProxies.Count > 0)
{
var transformed = instanceDefinitionProxies.Select(proxy => (Array.Empty<string>(), proxy as IInstanceComponent));
instanceComponents.AddRange(transformed);
var transformed = unpackedRoot.DefinitionProxies.Select(proxy =>
(Array.Empty<Collection>(), proxy as IInstanceComponent)
);
instanceComponentsWithPath.AddRange(transformed);
}
var atomicObjects = new List<(string layerName, Base obj)>();
foreach (TraversalContext tc in objectGraph)
// 3 - Bake materials and colors, as they are used later down the line by layers and objects
if (unpackedRoot.RenderMaterialProxies != null)
{
var layerName = _autocadLayerManager.GetLayerPath(tc, baseLayerPrefix);
if (tc.Current is IInstanceComponent instanceComponent)
{
instanceComponents.Add((new string[] { layerName }, instanceComponent));
}
else
{
atomicObjects.Add((layerName, tc.Current));
}
_materialBaker.ParseAndBakeRenderMaterials(
unpackedRoot.RenderMaterialProxies,
baseLayerPrefix,
onOperationProgressed
);
}
// Stage 1: Convert atomic objects
Dictionary<string, List<Entity>> applicationIdMap = new();
if (unpackedRoot.ColorProxies != null)
{
_colorBaker.ParseColors(unpackedRoot.ColorProxies, onOperationProgressed);
}
// 5 - Convert atomic objects
HashSet<ReceiveConversionResult> results = new();
HashSet<string> bakedObjectIds = new();
Dictionary<string, IReadOnlyCollection<Entity>> applicationIdMap = new();
var count = 0;
foreach (var (layerName, atomicObject) in atomicObjects)
foreach (var (layerPath, atomicObject) in atomicObjectsWithPath)
{
onOperationProgressed?.Invoke("Converting objects", (double)++count / atomicObjects.Count);
string objectId = atomicObject.applicationId ?? atomicObject.id.NotNull();
onOperationProgressed.Report(new("Converting objects", (double)++count / atomicObjects.Count));
try
{
var convertedObjects = ConvertObject(atomicObject, layerName).ToList();
IReadOnlyCollection<Entity> convertedObjects = ConvertObject(atomicObject, layerPath, baseLayerPrefix);
if (atomicObject.applicationId != null)
{
applicationIdMap[atomicObject.applicationId] = convertedObjects;
}
applicationIdMap[objectId] = convertedObjects;
results.AddRange(
convertedObjects.Select(
e =>
new ReceiveConversionResult(
Status.SUCCESS,
atomicObject,
e.Handle.Value.ToString(),
e.GetType().ToString()
)
)
results.UnionWith(
convertedObjects.Select(e => new ReceiveConversionResult(
Status.SUCCESS,
atomicObject,
e.GetSpeckleApplicationId(),
e.GetType().ToString()
))
);
bakedObjectIds.AddRange(convertedObjects.Select(e => e.Handle.Value.ToString()));
bakedObjectIds.UnionWith(convertedObjects.Select(e => e.GetSpeckleApplicationId()));
}
catch (Exception ex) when (!ex.IsFatal())
{
@@ -127,55 +157,112 @@ public class AutocadHostObjectBuilder : IHostObjectBuilder
}
}
// Stage 2: Convert instances
var (createdInstanceIds, consumedObjectIds, instanceConversionResults) = _instanceObjectsManager.BakeInstances(
instanceComponents,
// 6 - Convert instances
var (createdInstanceIds, consumedObjectIds, instanceConversionResults) = _instanceBaker.BakeInstances(
instanceComponentsWithPath,
applicationIdMap,
baseLayerPrefix,
onOperationProgressed
);
bakedObjectIds.RemoveAll(id => consumedObjectIds.Contains(id));
bakedObjectIds.AddRange(createdInstanceIds);
results.RemoveAll(result => result.ResultId != null && consumedObjectIds.Contains(result.ResultId));
results.AddRange(instanceConversionResults);
bakedObjectIds.RemoveWhere(id => consumedObjectIds.Contains(id));
bakedObjectIds.UnionWith(createdInstanceIds);
results.RemoveWhere(result => result.ResultId != null && consumedObjectIds.Contains(result.ResultId));
results.UnionWith(instanceConversionResults);
return new(bakedObjectIds, results);
// 7 - Create groups
if (unpackedRoot.GroupProxies != null)
{
IReadOnlyCollection<ReceiveConversionResult> groupResults = _groupBaker.CreateGroups(
unpackedRoot.GroupProxies,
applicationIdMap
);
results.UnionWith(groupResults);
}
return new HostObjectBuilderResult(bakedObjectIds, results);
}
private void PreReceiveDeepClean(string baseLayerPrefix)
{
_autocadLayerManager.DeleteAllLayersByPrefix(baseLayerPrefix);
_instanceObjectsManager.PurgeInstances(baseLayerPrefix);
_layerBaker.DeleteAllLayersByPrefix(baseLayerPrefix);
_instanceBaker.PurgeInstances(baseLayerPrefix);
_materialBaker.PurgeMaterials(baseLayerPrefix);
}
private IEnumerable<Entity> ConvertObject(Base obj, string layerName)
private IReadOnlyCollection<Entity> ConvertObject(Base obj, Collection[] layerPath, string baseLayerNamePrefix)
{
using TransactionContext transactionContext = TransactionContext.StartTransaction(
Application.DocumentManager.MdiActiveDocument
string layerName = _layerBaker.CreateLayerForReceive(layerPath, baseLayerNamePrefix);
var convertedEntities = new HashSet<Entity>();
using var tr = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction();
// 1: convert
var converted = _converter.Convert(obj);
// 2: handle result
if (converted is Entity entity)
{
var bakedEntity = BakeObject(entity, obj, layerName);
convertedEntities.Add(bakedEntity);
}
else if (converted is List<(Entity, Base)> fallbackConversionResult)
{
var bakedFallbackEntities = BakeObjectsAsGroup(fallbackConversionResult, obj, layerName, baseLayerNamePrefix);
convertedEntities.UnionWith(bakedFallbackEntities);
}
tr.Commit();
return convertedEntities.Freeze();
}
private Entity BakeObject(Entity entity, Base originalObject, string layerName, Base? parentObject = null)
{
var objId = originalObject.applicationId ?? originalObject.id.NotNull();
if (_colorBaker.ObjectColorsIdMap.TryGetValue(objId, out AutocadColor? color))
{
entity.Color = color;
}
if (_materialBaker.TryGetMaterialId(originalObject, parentObject, out ObjectId matId))
{
entity.MaterialId = matId;
}
entity.AppendToDb(layerName);
return entity;
}
private List<Entity> BakeObjectsAsGroup(
List<(Entity, Base)> fallbackConversionResult,
Base parentObject,
string layerName,
string baseLayerName
)
{
var ids = new ObjectIdCollection();
var entities = new List<Entity>();
foreach (var (conversionResult, originalObject) in fallbackConversionResult)
{
BakeObject(conversionResult, originalObject, layerName, parentObject);
ids.Add(conversionResult.ObjectId);
entities.Add(conversionResult);
}
var tr = Application.DocumentManager.CurrentDocument.Database.TransactionManager.TopTransaction;
var groupDictionary = (DBDictionary)
tr.GetObject(Application.DocumentManager.CurrentDocument.Database.GroupDictionaryId, OpenMode.ForWrite);
var groupName = _autocadContext.RemoveInvalidChars(
$@"{parentObject.speckle_type.Split('.').Last()} - {parentObject.applicationId ?? parentObject.id} ({baseLayerName})"
);
_autocadLayerManager.CreateLayerForReceive(layerName);
var newGroup = new Group(groupName, true);
newGroup.Append(ids);
groupDictionary.UpgradeOpen();
groupDictionary.SetAt(groupName, newGroup);
tr.AddNewlyCreatedDBObject(newGroup, true);
object converted;
using (var tr = Application.DocumentManager.CurrentDocument.Database.TransactionManager.StartTransaction())
{
converted = _converter.Convert(obj);
tr.Commit();
}
IEnumerable<Entity?> flattened = Utilities.FlattenToHostConversionResult(converted).Cast<Entity>();
foreach (Entity? conversionResult in flattened)
{
if (conversionResult == null)
{
// POC: This needed to be double checked why we check null and continue
continue;
}
conversionResult.AppendToDb(layerName);
yield return conversionResult;
}
return entities;
}
}
@@ -1,6 +1,6 @@
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.DatabaseServices;
namespace Speckle.Connectors.Autocad.Operations.Send;
// Note: naming is a bit confusing, Root is similar to base commit object, or root commit object, etc. It might be just in my head (dim)
public record AutocadRootObject(DBObject Root, string ApplicationId);
public record AutocadRootObject(Entity Root, string ApplicationId);
@@ -0,0 +1,192 @@
using System.Diagnostics.CodeAnalysis;
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Conversion;
using Speckle.Connectors.Common.Extensions;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.Common;
using Speckle.Sdk;
using Speckle.Sdk.Logging;
using Speckle.Sdk.Models;
using Speckle.Sdk.Models.Collections;
using Speckle.Sdk.Models.Instances;
namespace Speckle.Connectors.Autocad.Operations.Send;
public abstract class AutocadRootObjectBaseBuilder : IRootObjectBuilder<AutocadRootObject>
{
private readonly IRootToSpeckleConverter _converter;
private readonly string[] _documentPathSeparator = ["\\"];
private readonly ISendConversionCache _sendConversionCache;
private readonly AutocadInstanceUnpacker _instanceUnpacker;
private readonly AutocadMaterialUnpacker _materialUnpacker;
private readonly AutocadColorUnpacker _colorUnpacker;
private readonly AutocadGroupUnpacker _groupUnpacker;
private readonly ILogger<AutocadRootObjectBuilder> _logger;
private readonly ISdkActivityFactory _activityFactory;
protected AutocadRootObjectBaseBuilder(
IRootToSpeckleConverter converter,
ISendConversionCache sendConversionCache,
AutocadInstanceUnpacker instanceObjectManager,
AutocadMaterialUnpacker materialUnpacker,
AutocadColorUnpacker colorUnpacker,
AutocadGroupUnpacker groupUnpacker,
ILogger<AutocadRootObjectBuilder> logger,
ISdkActivityFactory activityFactory
)
{
_converter = converter;
_sendConversionCache = sendConversionCache;
_instanceUnpacker = instanceObjectManager;
_materialUnpacker = materialUnpacker;
_colorUnpacker = colorUnpacker;
_groupUnpacker = groupUnpacker;
_logger = logger;
_activityFactory = activityFactory;
}
public Task<RootObjectBuilderResult> Build(
IReadOnlyList<AutocadRootObject> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken ct = default
) => Task.FromResult(BuildSync(objects, sendInfo, onOperationProgressed, ct));
[SuppressMessage(
"Maintainability",
"CA1506:Avoid excessive class coupling",
Justification = """
It is already simplified but has many different references since it is a builder. Do not know can we simplify it now.
Later we might consider to refactor proxies from one proxy manager? but we do not know the shape of it all potential
proxy classes yet. So I'm supressing this one now!!!
"""
)]
private RootObjectBuilderResult BuildSync(
IReadOnlyList<AutocadRootObject> objects,
SendInfo sendInfo,
IProgress<CardProgress> onOperationProgressed,
CancellationToken ct = default
)
{
// 0 - Init the root
Collection root =
new()
{
name = Application
.DocumentManager.CurrentDocument.Name // POC: https://spockle.atlassian.net/browse/CNX-9319
.Split(_documentPathSeparator, StringSplitOptions.None)
.Reverse()
.First()
};
// TODO: better handling for document and transactions!!
Document doc = Application.DocumentManager.CurrentDocument;
using Transaction tr = doc.Database.TransactionManager.StartTransaction();
// 1 - Unpack the instances
var (atomicObjects, instanceProxies, instanceDefinitionProxies) = _instanceUnpacker.UnpackSelection(objects);
root[ProxyKeys.INSTANCE_DEFINITION] = instanceDefinitionProxies;
// 2 - Unpack the groups
root[ProxyKeys.GROUP] = _groupUnpacker.UnpackGroups(atomicObjects);
using (var _ = _activityFactory.Start("Converting objects"))
{
// 3 - Convert atomic objects
List<LayerTableRecord> usedAcadLayers = new(); // Keeps track of autocad layers used, so we can pass them on later to the material and color unpacker.
List<SendConversionResult> results = new();
int count = 0;
foreach (var (entity, applicationId) in atomicObjects)
{
ct.ThrowIfCancellationRequested();
using (var convertActivity = _activityFactory.Start("Converting object"))
{
// Create and add a collection for this entity if not done so already.
(Collection objectCollection, LayerTableRecord? autocadLayer) = CreateObjectCollection(entity, tr);
if (autocadLayer is not null)
{
usedAcadLayers.Add(autocadLayer);
root.elements.Add(objectCollection);
}
var result = ConvertAutocadEntity(
entity,
applicationId,
objectCollection,
instanceProxies,
sendInfo.ProjectId
);
results.Add(result);
onOperationProgressed.Report(new("Converting", (double)++count / atomicObjects.Count));
}
}
if (results.All(x => x.Status == Status.ERROR))
{
throw new SpeckleException("Failed to convert all objects."); // fail fast instead creating empty commit! It will appear as model card error with red color.
}
// 4 - Unpack the render material proxies
root[ProxyKeys.RENDER_MATERIAL] = _materialUnpacker.UnpackMaterials(atomicObjects, usedAcadLayers);
// 5 - Unpack the color proxies
root[ProxyKeys.COLOR] = _colorUnpacker.UnpackColors(atomicObjects, usedAcadLayers);
// add any additional properties (most likely from verticals)
AddAdditionalProxiesToRoot(root);
return new RootObjectBuilderResult(root, results);
}
}
public virtual (Collection, LayerTableRecord?) CreateObjectCollection(Entity entity, Transaction tr)
{
return (new(), null);
}
public virtual void AddAdditionalProxiesToRoot(Collection rootCollection)
{
return;
}
private SendConversionResult ConvertAutocadEntity(
Entity entity,
string applicationId,
Collection collectionHost,
IReadOnlyDictionary<string, InstanceProxy> instanceProxies,
string projectId
)
{
string sourceType = entity.GetType().ToString();
try
{
Base converted;
if (entity is BlockReference && instanceProxies.TryGetValue(applicationId, out InstanceProxy? instanceProxy))
{
converted = instanceProxy;
}
else if (_sendConversionCache.TryGetValue(projectId, applicationId, out ObjectReference? value))
{
converted = value;
}
else
{
converted = _converter.Convert(entity);
converted.applicationId = applicationId;
}
collectionHost.elements.Add(converted);
return new(Status.SUCCESS, applicationId, sourceType, converted);
}
catch (Exception ex) when (!ex.IsFatal())
{
_logger.LogSendConversionError(ex, sourceType);
return new(Status.ERROR, applicationId, sourceType, null, ex);
}
}
}
@@ -1,113 +1,46 @@
using System.Diagnostics;
using Autodesk.AutoCAD.DatabaseServices;
using Speckle.Connectors.Utils.Builders;
using Speckle.Connectors.Utils.Caching;
using Speckle.Connectors.Utils.Conversion;
using Speckle.Connectors.Utils.Instances;
using Speckle.Connectors.Utils.Operations;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Common.Caching;
using Speckle.Converters.Common;
using Speckle.Core.Logging;
using Speckle.Core.Models;
using Speckle.Core.Models.Instances;
using Speckle.Sdk.Logging;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.Autocad.Operations.Send;
public class AutocadRootObjectBuilder : IRootObjectBuilder<AutocadRootObject>
public sealed class AutocadRootObjectBuilder : AutocadRootObjectBaseBuilder
{
private readonly IRootToSpeckleConverter _converter;
private readonly string[] _documentPathSeparator = { "\\" };
private readonly ISendConversionCache _sendConversionCache;
private readonly IInstanceObjectsManager<AutocadRootObject, List<Entity>> _instanceObjectsManager;
private readonly AutocadLayerUnpacker _layerUnpacker;
public AutocadRootObjectBuilder(
AutocadLayerUnpacker layerUnpacker,
IRootToSpeckleConverter converter,
ISendConversionCache sendConversionCache,
IInstanceObjectsManager<AutocadRootObject, List<Entity>> instanceObjectManager
AutocadInstanceUnpacker instanceObjectManager,
AutocadMaterialUnpacker materialUnpacker,
AutocadColorUnpacker colorUnpacker,
AutocadGroupUnpacker groupUnpacker,
ILogger<AutocadRootObjectBuilder> logger,
ISdkActivityFactory activityFactory
)
: base(
converter,
sendConversionCache,
instanceObjectManager,
materialUnpacker,
colorUnpacker,
groupUnpacker,
logger,
activityFactory
)
{
_converter = converter;
_sendConversionCache = sendConversionCache;
_instanceObjectsManager = instanceObjectManager;
_layerUnpacker = layerUnpacker;
}
public RootObjectBuilderResult Build(
IReadOnlyList<AutocadRootObject> objects,
SendInfo sendInfo,
Action<string, double?>? onOperationProgressed = null,
CancellationToken ct = default
)
public override (Collection, LayerTableRecord?) CreateObjectCollection(Entity entity, Transaction tr)
{
Collection modelWithLayers =
new()
{
name = Application.DocumentManager.CurrentDocument.Name // POC: https://spockle.atlassian.net/browse/CNX-9319
.Split(_documentPathSeparator, StringSplitOptions.None)
.Reverse()
.First(),
collectionType = "root"
};
Layer layer = _layerUnpacker.GetOrCreateSpeckleLayer(entity, tr, out LayerTableRecord? autocadLayer);
// Cached dictionary to create Collection for autocad entity layers. We first look if collection exists. If so use it otherwise create new one for that layer.
Dictionary<string, Collection> collectionCache = new();
int count = 0;
var (atomicObjects, instanceProxies, instanceDefinitionProxies) = _instanceObjectsManager.UnpackSelection(objects);
// POC: until we formalise a bit more the root object
modelWithLayers["instanceDefinitionProxies"] = instanceDefinitionProxies;
List<SendConversionResult> results = new();
var cacheHitCount = 0;
foreach (var (dbObject, applicationId) in atomicObjects)
{
ct.ThrowIfCancellationRequested();
try
{
Base converted;
if (dbObject is BlockReference && instanceProxies.TryGetValue(applicationId, out InstanceProxy instanceProxy))
{
converted = instanceProxy;
}
else if (_sendConversionCache.TryGetValue(sendInfo.ProjectId, applicationId, out ObjectReference value))
{
converted = value;
cacheHitCount++;
}
else
{
converted = _converter.Convert(dbObject);
converted.applicationId = applicationId;
}
// Create and add a collection for each layer if not done so already.
if ((dbObject as Entity)?.Layer is string layer)
{
if (!collectionCache.TryGetValue(layer, out Collection? collection))
{
collection = new Collection() { name = layer, collectionType = "layer" };
collectionCache[layer] = collection;
modelWithLayers.elements.Add(collectionCache[layer]);
}
collection.elements.Add(converted);
}
results.Add(new(Status.SUCCESS, applicationId, dbObject.GetType().ToString(), converted));
}
catch (Exception ex) when (!ex.IsFatal())
{
results.Add(new(Status.ERROR, applicationId, dbObject.GetType().ToString(), null, ex));
// POC: add logging
}
onOperationProgressed?.Invoke("Converting", (double)++count / atomicObjects.Count);
}
// POC: Log would be nice, or can be removed.
Debug.WriteLine(
$"Cache hit count {cacheHitCount} out of {objects.Count} ({(double)cacheHitCount / objects.Count})"
);
return new(modelWithLayers, results);
return (layer, autocadLayer);
}
}
@@ -0,0 +1,28 @@
using Speckle.Sdk.Host;
namespace Speckle.Connectors.Autocad.Plugin;
public static class AppUtils
{
public static HostApplication App =>
#if CIVIL3D
HostApplications.Civil3D;
#elif AUTOCAD
HostApplications.AutoCAD;
#else
throw new NotSupportedException();
#endif
public static HostAppVersion Version =>
#if AUTOCAD2025 || CIVIL3D2025
HostAppVersion.v2025;
#elif AUTOCAD2024 || CIVIL3D2024
HostAppVersion.v2024;
#elif AUTOCAD2023|| CIVIL3D2023
HostAppVersion.v2023;
#elif AUTOCAD2022 || CIVIL3D2022
HostAppVersion.v2022;
#else
throw new NotSupportedException();
#endif
}
@@ -1,24 +1,28 @@
using System.Drawing;
using System.Reflection;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Windows;
using Speckle.Autofac.DependencyInjection;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Core.Kits;
using Speckle.Connectors.Autocad.Interfaces;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.Common;
using Speckle.Connectors.DUI;
using Speckle.Connectors.DUI.WebView;
#if AUTOCAD
using Speckle.Connectors.Autocad.DependencyInjection;
using Speckle.Converters.Autocad;
#elif CIVIL3D
using Speckle.Converters.Civil3dShared;
using Speckle.Connectors.Civil3dShared.DependencyInjection;
#endif
namespace Speckle.Connectors.Autocad.Plugin;
public class AutocadCommand
{
private static PaletteSet? PaletteSet { get; set; }
private static readonly Guid s_id = new("3223E594-1B09-4E54-B3DD-8EA0BECE7BA5");
private IAutocadPlugin? _autocadPlugin;
public ServiceProvider? Container { get; private set; }
private IDisposable? _disposableLogger;
public const string COMMAND_STRING = "SpeckleBeta";
public SpeckleContainer? Container { get; private set; }
[CommandMethod("SpeckleNewUI")]
[CommandMethod(COMMAND_STRING)]
public void Command()
{
if (PaletteSet != null)
@@ -27,33 +31,28 @@ public class AutocadCommand
return;
}
PaletteSet = new PaletteSet("Speckle DUI3", s_id)
PaletteSet = new PaletteSet($"Speckle (Beta) for {AppUtils.App.Name}", s_id)
{
Size = new Size(400, 500),
DockEnabled = (DockSides)((int)DockSides.Left + (int)DockSides.Right)
};
var builder = SpeckleContainerBuilder.CreateInstance();
#if CIVIL3D2024
AutocadSettings autocadSettings = new (HostApplications.Civil3D, HostAppVersion.v2024);
#elif AUTOCAD2023
AutocadSettings autocadSettings = new(HostApplications.AutoCAD, HostAppVersion.v2023);
#else
AutocadSettings autocadSettings = new(HostApplications.AutoCAD, HostAppVersion.v2023);
// init DI
var services = new ServiceCollection();
_disposableLogger = services.Initialize(AppUtils.App, AppUtils.Version);
#if AUTOCAD
services.AddAutocad();
services.AddAutocadConverters();
#elif CIVIL3D
services.AddCivil3d();
services.AddCivil3dConverters();
#endif
Container = builder
.LoadAutofacModules(Assembly.GetExecutingAssembly(), autocadSettings.Modules)
.AddSingleton(autocadSettings)
.Build();
Container = services.BuildServiceProvider();
Container.UseDUI();
// Resolve root plugin object and initialise.
_autocadPlugin = Container.Resolve<IAutocadPlugin>();
_autocadPlugin.Initialise();
var panelWebView = Container.GetRequiredService<DUI3ControlWebView>();
var panelWebView = Container.Resolve<DUI3ControlWebView>();
PaletteSet.AddVisual("Speckle DUI3 WebView", panelWebView);
PaletteSet.AddVisual($"Speckle (Beta) for {AppUtils.App.Name} WebView", panelWebView);
FocusPalette();
}
@@ -1,12 +1,18 @@
using Autodesk.AutoCAD.Runtime;
using Speckle.Autofac;
using Speckle.Connectors.Common;
namespace Speckle.Connectors.Autocad.Plugin;
public class AutocadExtensionApplication : IExtensionApplication
{
public void Initialize() =>
public void Initialize()
{
AppDomain.CurrentDomain.AssemblyResolve += AssemblyResolver.OnAssemblyResolve<AutocadExtensionApplication>;
AutocadCommand autocadCommand = new();
AutocadRibbon ribbon = new(autocadCommand);
ribbon.CreateRibbon();
}
public void Terminate() { }
}
@@ -1,23 +0,0 @@
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Interfaces;
using Speckle.Connectors.DUI.WebView;
namespace Speckle.Connectors.Autocad.Plugin;
public class AutocadPlugin : IAutocadPlugin
{
private readonly AutocadIdleManager _idleManager;
private readonly DUI3ControlWebView _panel;
private readonly AutocadSettings _settings;
public AutocadPlugin(DUI3ControlWebView panel, AutocadSettings settings, AutocadIdleManager idleManager)
{
_panel = panel;
_settings = settings;
_idleManager = idleManager;
}
public void Initialise() { }
public void Shutdown() { }
}
@@ -0,0 +1,223 @@
using System.IO;
using System.Reflection;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using Autodesk.Windows;
using Speckle.Sdk;
namespace Speckle.Connectors.Autocad.Plugin;
public class AutocadRibbon
{
private RibbonControl? _ribbon;
private readonly AutocadCommand _command;
public AutocadRibbon(AutocadCommand command)
{
_command = command;
}
public bool CreateRibbon()
{
_ribbon = ComponentManager.Ribbon;
try
{
if (_ribbon != null) //the assembly was loaded using netload
{
Create();
}
else
{
// load the custom ribbon on startup, but wait for ribbon control to be created
ComponentManager.ItemInitialized += new System.EventHandler<RibbonItemEventArgs>(
ComponentManager_ItemInitialized
);
Application.SystemVariableChanged += TrapWSCurrentChange;
}
}
catch (System.Exception ex) when (!ex.IsFatal())
{
return false;
// todo: report error
}
return true;
}
private void Create()
{
RibbonTab tab = FindOrMakeTab("Add-ins");
RibbonPanelSource source = new() { Title = "Speckle 2 (New Beta)" };
RibbonPanel panel = new() { Source = source };
tab.Panels.Add(panel);
RibbonToolTip speckleToolTip =
new()
{
Title = "Speckle 2 (New Beta)",
Content = "Speckle Connector for " + AppUtils.App.Name,
IsHelpEnabled = true // Without this "Press F1 for help" does not appear in the tooltip
};
_ = CreateSpeckleButton("Connector " + AppUtils.App.Name + " (New)", source, null, speckleToolTip, "logo");
}
private void ComponentManager_ItemInitialized(object? sender, RibbonItemEventArgs e)
{
// one Ribbon item is initialized, check for Ribbon control
_ribbon = ComponentManager.Ribbon;
if (_ribbon != null)
{
Create();
// remove the event handler
ComponentManager.ItemInitialized -= new System.EventHandler<RibbonItemEventArgs>(
ComponentManager_ItemInitialized
);
}
}
// solving workspace changing
private void TrapWSCurrentChange(object sender, Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs e)
{
if (e.Name.Equals("WSCURRENT"))
{
Create();
}
}
private RibbonTab FindOrMakeTab(string name)
{
if (_ribbon is null)
{
throw new InvalidOperationException($"Ribbon control was null, could not create tab {name}");
}
RibbonTab? tab = _ribbon.Tabs.FirstOrDefault(o => o.Title.Equals(name)); // check to see if tab exists
if (tab is null) // if not, create a new one
{
tab = new RibbonTab { Title = name, Id = name };
_ribbon.Tabs.Add(tab);
}
return tab;
}
private RibbonButton CreateSpeckleButton(
string name,
RibbonPanelSource? sourcePanel = null,
RibbonSplitButton? sourceButton = null,
RibbonToolTip? tooltip = null,
string imageName = ""
)
{
var button = new RibbonButton
{
// ribbon panel source info assignment
Text = name,
Id = name,
ShowImage = true,
ShowText = true,
ToolTip = tooltip,
HelpSource = new System.Uri("https://speckle.guide/user/autocadcivil.html"),
Size = RibbonItemSize.Large
};
if (TryLoadPngImgSource(imageName + "16.png", out ImageSource? imageSource))
{
button.Image = imageSource;
}
if (TryLoadPngImgSource(imageName + "32.png", out ImageSource? largeImageSource))
{
button.LargeImage = largeImageSource;
}
// add ribbon button panel to the ribbon panel source
if (sourcePanel != null)
{
button.Orientation = System.Windows.Controls.Orientation.Vertical;
button.CommandParameter = AutocadCommand.COMMAND_STRING;
button.CommandHandler = new SpeckleButtonCommandHandler(_command);
sourcePanel.Items.Add(button);
}
else if (sourceButton != null)
{
button.Orientation = System.Windows.Controls.Orientation.Horizontal;
button.CommandParameter = AutocadCommand.COMMAND_STRING;
button.CommandHandler = new SpeckleButtonCommandHandler(_command);
sourceButton.Items.Add(button);
}
return button;
}
/// <summary>
/// Retrieve the png image source
/// </summary>
/// <param name="sourceName"></param>
/// <returns></returns>
private bool TryLoadPngImgSource(string sourceName, out System.Windows.Media.ImageSource? source)
{
source = null;
if (string.IsNullOrEmpty(sourceName) || !sourceName.ToLower().EndsWith(".png"))
{
return false;
}
Assembly assembly = Assembly.GetExecutingAssembly();
string[] assemblyResources = GetType().Assembly.GetManifestResourceNames();
string? resource = assemblyResources.Where(o => o.EndsWith(sourceName)).FirstOrDefault();
if (string.IsNullOrEmpty(resource))
{
return false;
}
Stream? stream = null;
try
{
stream = assembly.GetManifestResourceStream(resource);
}
catch (FileLoadException) { }
catch (FileNotFoundException) { }
catch (NotImplementedException) { }
if (stream is null)
{
return false;
}
PngBitmapDecoder decoder = new(stream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default);
if (decoder.Frames.Count == 0)
{
return false;
}
source = decoder.Frames[0];
return true;
}
}
public class SpeckleButtonCommandHandler : System.Windows.Input.ICommand
{
private readonly AutocadCommand _autocadCommand;
public SpeckleButtonCommandHandler(AutocadCommand autocadCommand)
{
_autocadCommand = autocadCommand;
}
#pragma warning disable 67
// Disabling warning for `event never used` since this is required by autocad
public event System.EventHandler? CanExecuteChanged;
#pragma warning restore 67
public void Execute(object? parameter)
{
if (parameter is RibbonButton)
{
_autocadCommand.Command();
}
}
public bool CanExecute(object? parameter) => true;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

@@ -13,33 +13,42 @@
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadReceiveBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadSendBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadBasicConnectorBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\SharedConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\AutocadSendBaseBinding.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\SharedRegistration.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\AutocadConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\Civil3dConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Filters\AutocadSelectionFilter.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadInstanceObjectManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadColorBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadColorUnpacker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadGroupBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadGroupUnpacker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadInstanceBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadInstanceUnpacker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadLayerBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadLayerUnpacker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadMaterialBaker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadContext.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadDocumentManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadDocumentModelStore.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadIdleManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadLayerManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadSettings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\AcadUnitsExtension.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\AutocadMaterialUnpacker.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\DatabaseExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\DocumentExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\EditorExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\EntityExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\Extensions\SpeckleApplicationIdExtensions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HostApp\TransactionContext.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Receive\AutocadHostObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\AutocadRootObject.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\AutocadRootObjectBaseBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\AutocadRootObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Plugin\AutocadRibbon.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Plugin\AutocadExtensionApplication.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Plugin\AutocadPlugin.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Interfaces\IAutocadPlugin.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Plugin\AutocadCommand.cs" />
<Compile Include="$(MSBuildThisFileDirectory)GlobalUsings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Plugin\AppUtils.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Interfaces\" />
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\s2logo16.png" />
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\s2logo32.png" />
</ItemGroup>
</Project>
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<Civil3DVersion>2022</Civil3DVersion>
<DefineConstants>$(DefineConstants);CIVIL3D;CIVIL3D2022;CIVIL3D2022_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" />
<PackageReference Include="Speckle.Civil3D.API" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2022\Speckle.Converters.Civil3d2022.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
</Project>
@@ -0,0 +1,389 @@
{
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2022.0.2, )",
"resolved": "2022.0.2",
"contentHash": "NFHXnlkBjzM8Bau52d6eF6m0+etHddGx7qlWN8YyrfTtGyz+AmPvF8fgxcLgyjAcB3W4Wim11JeYuEoTNH1X0w=="
},
"Speckle.Civil3D.API": {
"type": "Direct",
"requested": "[2022.0.2, )",
"resolved": "2022.0.2",
"contentHash": "H36v9rA2Ynh4gDCzpBeUcWs4BQwWi3MwgTAnClM22vNbQXZlxjK85iO8i/mJsX57hh8VfqLB8EA7CUw94gBddw==",
"dependencies": {
"Speckle.AutoCAD.API": "2022.0.2"
}
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0",
"GraphQL.Client.Abstractions.Websocket": "6.0.0",
"System.Net.WebSockets.Client.Managed": "1.0.22",
"System.Reactive": "5.0.0"
}
},
"GraphQL.Client.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==",
"dependencies": {
"GraphQL.Primitives": "6.0.0"
}
},
"GraphQL.Client.Abstractions.Websocket": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0"
}
},
"GraphQL.Primitives": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
},
"Microsoft.Data.Sqlite": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==",
"dependencies": {
"Microsoft.Data.Sqlite.Core": "7.0.5",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==",
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.4",
"SQLitePCLRaw.provider.dynamic_cdecl": "2.1.4"
}
},
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"SQLitePCLRaw.provider.dynamic_cdecl": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "ZsaKKhgYF9B1fvcnOGKl3EycNAwd9CRWX7v0rEfuPWhQQ5Jjpvf2VEHahiLIGHio3hxi3EIKFJw9KvyowWOUAw==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
"type": "Transitive",
"resolved": "1.0.22",
"contentHash": "WqEOxPlXjuZrIjUtXNE9NxEfU/n5E35iV2PtoZdJSUC4tlrqwHnTee+wvMIM4OUaJWmwrymeqcgYrE0IkGAgLA==",
"dependencies": {
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"dependencies": {
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.civil3d2022": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2022.0.2, )",
"Speckle.Civil3D.API": "[2022.0.2, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
}
}
}
@@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<Civil3DVersion>2023</Civil3DVersion>
<DefineConstants>$(DefineConstants);CIVIL3D;CIVIL3D2023;CIVIL3D2022_OR_GREATER;CIVIL3D2023_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2023.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2023.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2023\Speckle.Converters.Civil3d2023.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
</Project>
@@ -2,6 +2,15 @@
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
@@ -24,11 +33,20 @@
"resolved": "2023.0.0",
"contentHash": "aNfiNw9zRW8pCl8AAQK7afEJuea4bJ4sFNsGVSDrdq1egaonZrwALU01dSyFNCE8tne86eVjlprpOGG6r0+G/A=="
},
"Speckle.Civil3D.API": {
"type": "Direct",
"requested": "[2023.0.0, )",
"resolved": "2023.0.0",
"contentHash": "URb0wfrxm4jcAApRxZ15a1dmxWDRry8WAuGmUwC7saP5+ltkJOVSOYb6WeJKYhDiJbO3UlVCesTFNnsNjMFd5A==",
"dependencies": {
"Speckle.AutoCAD.API": "2022.0.2"
}
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
@@ -97,119 +115,68 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Polly": {
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "7.2.3",
"contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"Polly.Extensions.Http": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==",
"dependencies": {
"Polly": "7.1.0"
}
},
"Sentry": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "8vbD2o6IR2wrRrkSiRbnodWGWUOqIlwYtzpjvPNOb5raJdOf+zxMwfS8f6nx9bmrTTfDj7KrCB8C/5OuicAc8A==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Text.Json": "5.0.2"
}
},
"Sentry.Serilog": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "V8BU7QGWg2qLYfNPqtuTBhC1opysny5l+Ifp6J6PhOeAxU0FssR7nYfbJVetrnLIoh2rd3DlJ6hHYYQosQYcUQ==",
"dependencies": {
"Sentry": "3.33.0",
"Serilog": "2.7.1"
}
},
"Serilog": {
"type": "Transitive",
"resolved": "2.12.0",
"contentHash": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg=="
},
"Serilog.Enrichers.ClientInfo": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "mTc7PM+wC9Hr7LWSwqt5mmnlAr7RJs+eTb3PGPRhwdOackk95MkhUZognuxXEdlW19HAFNmEBTSBY5DfLwM8jQ==",
"dependencies": {
"Serilog": "2.4.0"
}
},
"Serilog.Exceptions": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Formatting.Compact": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Sinks.Console": {
"type": "Transitive",
"resolved": "4.1.0",
"contentHash": "K6N5q+5fetjnJPvCmkWOpJ/V8IEIoMIB1s86OzBrbxwTyHxdx3pmz4H+8+O/Dc/ftUX12DM1aynx/dDowkwzqg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.File": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.PeriodicBatching": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "NDWR7m3PalVlGEq3rzoktrXikjFMLmpwF0HI4sowo8YDdU+gqPlTHlDQiOGxHfB0sTfjPA9JjA7ctKG9zqjGkw==",
"dependencies": {
"Serilog": "2.0.0"
}
},
"Serilog.Sinks.Seq": {
"type": "Transitive",
"resolved": "5.2.2",
"contentHash": "1Csmo5ua7NKUe0yXUx+zsRefjAniPWcXFhUXxXG8pwo0iMiw2gjn9SOkgYnnxbgWqmlGv236w0N/dHc2v5XwMg==",
"dependencies": {
"Serilog": "2.12.0",
"Serilog.Formatting.Compact": "1.1.0",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.PeriodicBatching": "3.1.0"
}
},
"SerilogTimings": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "Zs28eTgszAMwpIrbBnWHBI50yuxL50p/dmAUWmy75+axdZYK/Sjm5/5m1N/CisR8acJUhTVcjPZrsB1P5iv0Uw==",
"dependencies": {
"Serilog": "2.10.0"
}
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
@@ -248,33 +215,22 @@
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.Collections.Immutable": {
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"dependencies": {
"System.Memory": "4.5.4"
}
},
"System.DoubleNumerics": {
"type": "Transitive",
"resolved": "3.1.3",
"contentHash": "KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
"dependencies": {
"NETStandard.Library": "1.6.1"
}
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
@@ -288,8 +244,8 @@
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
@@ -299,47 +255,10 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"dependencies": {
"System.Collections.Immutable": "5.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA=="
},
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "KmJ+CJXizDofbq6mpqDoRRLcxgOd2z9X3XoFNULSbvbqVRZkFX3istvr+MUjL6Zw1RT+RNdoI4GYidIINtgvqQ==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encodings.Web": "5.0.1",
"System.Threading.Tasks.Extensions": "4.5.4",
"System.ValueTuple": "4.5.0"
}
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
@@ -349,66 +268,121 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"speckle.autofac": {
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )"
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.civil3d2023": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2023.0.0, )",
"Speckle.Civil3D.API": "[2023.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5"
}
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Speckle.Core": {
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "RzQPVIGFFkKvG56YLr8ACtiwdWJE6IJ9vCQ4qHa0PIsUEpfzAIAi59jnzqtByOFC0FiFrFPow9bkfzylaZorAA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "z38LGryMvh7iU1uBW+4uo5DwsB3CwRgLt2uFexWFx3mPSid+A0l5XcJzOgLwgFhNl6B42Ryz4ezBsddTp1Uc/g==",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.14"
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
}
}
@@ -1,25 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>Speckle.Connectors.Civil3d</RootNamespace>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<Civil3DVersion>2024</Civil3DVersion>
<DefineConstants>$(DefineConstants);CIVIL3D;CIVIL3D2024;CIVIL3D2022_OR_GREATER;CIVIL3D2023_OR_GREATER;CIVIL3D2024_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD 2024\acad.exe</StartProgram>
<DefineConstants>$(DefineConstants);CIVIL3D2024;CIVIL3D;</DefineConstants>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2024.0.0" />
<PackageReference Include="Speckle.Civil3D.API" VersionOverride="2024.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Autocad\2024\Speckle.Converters.Autocad2024.DependencyInjection\Speckle.Converters.Autocad2024.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2024\Speckle.Converters.Civil3d2024.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Autofac\Speckle.Autofac.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Connectors.Utils\Speckle.Connectors.Utils.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common.DependencyInjection\Speckle.Converters.Common.DependencyInjection.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Speckle.Civil3D.API" />
</ItemGroup>
<Import Project="..\..\Autocad\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
<Import Project="..\..\Autocad\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
</Project>
@@ -2,14 +2,13 @@
"version": 2,
"dependencies": {
".NETFramework,Version=v4.8": {
"Microsoft.Extensions.Logging.Abstractions": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "kmn78+LPVMOWeITUjIlfxUPDsI0R6G0RkeAMBmQxAJ7vBJn4q2dTva7pWi65ceN5vPGjJ9q/Uae2WKgvfktJAw==",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.5"
"Microsoft.NETFramework.ReferenceAssemblies.net48": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
@@ -28,6 +27,12 @@
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2024.0.0, )",
"resolved": "2024.0.0",
"contentHash": "pZZ5uI+NXhZaQnsqRkgp/rywqBAjDObDJ9XNFGJvemT5k2OthDpHzlK/mKxz8QDCYie7uImQ8dv3uWj2QUFDPw=="
},
"Speckle.Civil3D.API": {
"type": "Direct",
"requested": "[2024.0.0, )",
@@ -39,9 +44,9 @@
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.5, )",
"resolved": "0.9.5",
"contentHash": "oU/L7pN1R7q8KkbrpQ3WJnHirPHqn+9DEA7asOcUiggV5dzVg1A/VYs7GOSusD24njxXh03tE3a2oTLOjt3cVg=="
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
@@ -77,8 +82,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "3aeMZ1N0lJoSyzqiP03hqemtb1BijhsJADdobn/4nsMJ8V1H+CrpuduUe4hlRdx+ikBQju1VGjMD1GJ3Sk05Eg==",
"resolved": "5.0.0",
"contentHash": "W8DPQjkMScOMTtJbPwmPyj9c3zYSFGawDW3jwlBOOsnY+EzZFLgNQ/UMkK35JmkNOVPdCyPr2Tw7Vv9N+KA3ZQ==",
"dependencies": {
"System.Threading.Tasks.Extensions": "4.5.4"
}
@@ -110,170 +115,68 @@
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.DependencyInjection": {
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "elNeOmkeX3eDVG6pYVeV82p29hr+UKDaBhrZyWvWLw/EVZSYEkZlQdkp0V39k/Xehs2Qa0mvoCvkVj3eQxNQ1Q==",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "h3j/QfmFN4S0w4C2A6X7arXij/M/OVw3uQHSOFxnND4DyAzO1F9eMX7Eti7lU/OkSthEE0WzRsfT/Dmx86jzCw==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.Extensions.Logging": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "Nw2muoNrOG5U5qa2ZekXwudUn2BJcD41e65zwmDHb1fQegTX66UokLWZkJRpqSSHXDOWZ5V0iqhbxOEky91atA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "7.0.0",
"Microsoft.Extensions.DependencyInjection": "7.0.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Logging.Abstractions": "7.0.0",
"Microsoft.Extensions.Options": "7.0.0",
"System.Diagnostics.DiagnosticSource": "7.0.0",
"System.ValueTuple": "4.5.0"
}
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "lP1yBnTTU42cKpMozuafbvNtQ7QcBjr/CcK3bYOGEMH55Fjt+iecXjT6chR7vbgCMqy3PG3aNQSZgo/EuY/9qQ==",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "7.0.0",
"Microsoft.Extensions.Primitives": "7.0.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net48": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "zMk4D+9zyiEWByyQ7oPImPN/Jhpj166Ky0Nlla4eXlNL8hI/BtSJsgR8Inldd4NNpIAH3oh8yym0W2DrhXdSLQ=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Polly": {
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "7.2.3",
"contentHash": "DeCY0OFbNdNxsjntr1gTXHJ5pKUwYzp04Er2LLeN3g6pWhffsGuKVfMBLe1lw7x76HrPkLxKEFxBlpRxS2nDEQ=="
},
"Polly.Contrib.WaitAndRetry": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "1MUQLiSo4KDkQe6nzQRhIU05lm9jlexX5BVsbuw0SL82ynZ+GzAHQxJVDPVBboxV37Po3SG077aX8DuSy8TkaA=="
},
"Polly.Extensions.Http": {
"type": "Transitive",
"resolved": "3.0.0",
"contentHash": "drrG+hB3pYFY7w1c3BD+lSGYvH2oIclH8GRSehgfyP5kjnFnHKQuuBhuHLv+PWyFuaTDyk/vfRpnxOzd11+J8g==",
"dependencies": {
"Polly": "7.1.0"
}
},
"Sentry": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "8vbD2o6IR2wrRrkSiRbnodWGWUOqIlwYtzpjvPNOb5raJdOf+zxMwfS8f6nx9bmrTTfDj7KrCB8C/5OuicAc8A==",
"dependencies": {
"System.Reflection.Metadata": "5.0.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0",
"System.Text.Json": "5.0.2"
}
},
"Sentry.Serilog": {
"type": "Transitive",
"resolved": "3.33.0",
"contentHash": "V8BU7QGWg2qLYfNPqtuTBhC1opysny5l+Ifp6J6PhOeAxU0FssR7nYfbJVetrnLIoh2rd3DlJ6hHYYQosQYcUQ==",
"dependencies": {
"Sentry": "3.33.0",
"Serilog": "2.7.1"
}
},
"Serilog": {
"type": "Transitive",
"resolved": "2.12.0",
"contentHash": "xaiJLIdu6rYMKfQMYUZgTy8YK7SMZjB4Yk50C/u//Z4OsvxkUfSPJy4nknfvwAC34yr13q7kcyh4grbwhSxyZg=="
},
"Serilog.Enrichers.ClientInfo": {
"type": "Transitive",
"resolved": "1.3.0",
"contentHash": "mTc7PM+wC9Hr7LWSwqt5mmnlAr7RJs+eTb3PGPRhwdOackk95MkhUZognuxXEdlW19HAFNmEBTSBY5DfLwM8jQ==",
"dependencies": {
"Serilog": "2.4.0"
}
},
"Serilog.Exceptions": {
"type": "Transitive",
"resolved": "8.4.0",
"contentHash": "nc/+hUw3lsdo0zCj0KMIybAu7perMx79vu72w0za9Nsi6mWyNkGXxYxakAjWB7nEmYL6zdmhEQRB4oJ2ALUeug==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Formatting.Compact": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "pNroKVjo+rDqlxNG5PXkRLpfSCuDOBY0ri6jp9PLe505ljqwhwZz8ospy2vWhQlFu5GkIesh3FcDs4n7sWZODA==",
"dependencies": {
"Serilog": "2.8.0"
}
},
"Serilog.Sinks.Console": {
"type": "Transitive",
"resolved": "4.1.0",
"contentHash": "K6N5q+5fetjnJPvCmkWOpJ/V8IEIoMIB1s86OzBrbxwTyHxdx3pmz4H+8+O/Dc/ftUX12DM1aynx/dDowkwzqg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.File": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": {
"Serilog": "2.10.0"
}
},
"Serilog.Sinks.PeriodicBatching": {
"type": "Transitive",
"resolved": "3.1.0",
"contentHash": "NDWR7m3PalVlGEq3rzoktrXikjFMLmpwF0HI4sowo8YDdU+gqPlTHlDQiOGxHfB0sTfjPA9JjA7ctKG9zqjGkw==",
"dependencies": {
"Serilog": "2.0.0"
}
},
"Serilog.Sinks.Seq": {
"type": "Transitive",
"resolved": "5.2.2",
"contentHash": "1Csmo5ua7NKUe0yXUx+zsRefjAniPWcXFhUXxXG8pwo0iMiw2gjn9SOkgYnnxbgWqmlGv236w0N/dHc2v5XwMg==",
"dependencies": {
"Serilog": "2.12.0",
"Serilog.Formatting.Compact": "1.1.0",
"Serilog.Sinks.File": "5.0.0",
"Serilog.Sinks.PeriodicBatching": "3.1.0"
}
},
"SerilogTimings": {
"type": "Transitive",
"resolved": "3.0.1",
"contentHash": "Zs28eTgszAMwpIrbBnWHBI50yuxL50p/dmAUWmy75+axdZYK/Sjm5/5m1N/CisR8acJUhTVcjPZrsB1P5iv0Uw==",
"dependencies": {
"Serilog": "2.10.0"
}
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
@@ -312,42 +215,22 @@
},
"System.Buffers": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg=="
"resolved": "4.4.0",
"contentHash": "AwarXzzoDwX6BgrhjoJsk6tUezZEozOT5Y9QKF94Gl4JK91I4PIIBkBco9068Y9/Dra8Dkbie99kXB8+1BaYKw=="
},
"System.Collections.Immutable": {
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "FXkLXiK0sVVewcso0imKQoOxjoPAj42R8HtjjbSjVPAzwDfzoyoznWxgA3c38LDbN9SJux1xXoXYAhz98j7r2g==",
"dependencies": {
"System.Memory": "4.5.4"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "7.0.0",
"contentHash": "9W0ewWDuAyDqS2PigdTxk6jDKonfgscY/hP8hm7VpxYhNHZHKvZTdRckberlFk3VnCmr3xBUyMBut12Q+T2aOw==",
"dependencies": {
"System.Memory": "4.5.5",
"System.Runtime.CompilerServices.Unsafe": "6.0.0"
}
},
"System.DoubleNumerics": {
"type": "Transitive",
"resolved": "3.1.3",
"contentHash": "KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
"dependencies": {
"NETStandard.Library": "1.6.1"
}
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
"System.Buffers": "4.4.0",
"System.Numerics.Vectors": "4.4.0",
"System.Runtime.CompilerServices.Unsafe": "4.5.2"
}
},
"System.Net.WebSockets.Client.Managed": {
@@ -361,8 +244,8 @@
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
"resolved": "4.4.0",
"contentHash": "UiLzLW+Lw6HLed1Hcg+8jSRttrbuXv7DANVj0DkL9g6EnnzbL75EB7EWsw5uRbhxd/4YdG8li5XizGWepmG3PQ=="
},
"System.Reactive": {
"type": "Transitive",
@@ -372,47 +255,10 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"System.Reflection.Metadata": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "5NecZgXktdGg34rh1OenY1rFNDCI8xSjFr+Z4OU4cU06AQHUdRnIIEeWENu3Wl4YowbzkymAIMvi3WyK9U53pQ==",
"dependencies": {
"System.Collections.Immutable": "5.0.0"
}
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
},
"System.Runtime.InteropServices.RuntimeInformation": {
"type": "Transitive",
"resolved": "4.3.0",
"contentHash": "cbz4YJMqRDR7oLeMRbdYv7mYzc++17lNhScCX0goO2XpGWdvAt60CGN+FHdePUEHCe/Jy9jUlvNAiNdM+7jsOw=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "KmJ+CJXizDofbq6mpqDoRRLcxgOd2z9X3XoFNULSbvbqVRZkFX3istvr+MUjL6Zw1RT+RNdoI4GYidIINtgvqQ==",
"dependencies": {
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4"
}
},
"System.Text.Json": {
"type": "Transitive",
"resolved": "5.0.2",
"contentHash": "I47dVIGiV6SfAyppphxqupertT/5oZkYLDCX6vC3HpOI4ZLjyoKAreUoem2ie6G0RbRuFrlqz/PcTQjfb2DOfQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"System.Buffers": "4.5.1",
"System.Memory": "4.5.4",
"System.Numerics.Vectors": "4.5.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Text.Encodings.Web": "5.0.1",
"System.Threading.Tasks.Extensions": "4.5.4",
"System.ValueTuple": "4.5.0"
}
"resolved": "4.5.3",
"contentHash": "3TIsJhD1EiiT0w2CcDMN/iSSwnNnsrnbzeVHSKkaEgV85txMprmuO+Yq2AdSbeVGcg28pdNDTPK87tJhX7VFHw=="
},
"System.Threading.Tasks.Extensions": {
"type": "Transitive",
@@ -422,135 +268,116 @@
"System.Runtime.CompilerServices.Unsafe": "4.5.3"
}
},
"System.ValueTuple": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
},
"speckle.autofac": {
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )"
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Connectors.Utils": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )",
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1823.32, )",
"Speckle.Connectors.DUI": "[2.0.999-local, )"
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.utils": {
"type": "Project",
"dependencies": {
"Serilog.Extensions.Logging": "[7.0.0, )",
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Core": "[3.0.1-alpha.14, )"
}
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.autocad2024": {
"speckle.converters.civil3d2024": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2024.0.0, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"speckle.converters.autocad2024.dependencyinjection": {
"type": "Project",
"dependencies": {
"Autofac": "[5.2.0, )",
"Speckle.Converters.Autocad2024": "[2.0.999-local, )",
"Speckle.Converters.Common.DependencyInjection": "[2.0.999-local, )"
"Speckle.Civil3D.API": "[2024.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Objects": "[3.0.1-alpha.14, )"
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"speckle.converters.common.dependencyinjection": {
"type": "Project",
"dependencies": {
"Speckle.Autofac": "[2.0.999-local, )",
"Speckle.Converters.Common": "[2.0.999-local, )"
}
},
"Autofac": {
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[5.2.0, )",
"resolved": "5.2.0",
"contentHash": "V8dBH0dsv75uDzl7Sw+HkhKDPUw2eXnlMjcSVMH+tLo2s67MpTKGyDj1pDcpR+IF2u4YRs0s3/x7R88YJzIWvg==",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "1.1.0"
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1823.32, )",
"resolved": "1.0.1823.32",
"contentHash": "ppRcWBUNggFIqyJp7PfgS4Oe8/7yli/mHcTNDOaqo3ZzJWnv9AOr0WE9ceEP5SPs1M7CQ3QvdGMR7KNz0v09EA=="
},
"Serilog.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[7.0.0, )",
"resolved": "7.0.0",
"contentHash": "9faU0zNQqU7I6soVhLUMYaGNpgWv6cKlKb2S5AnS8gXxzW/em5Ladm/6FMrWTnX41cdbdGPOWNAo6adi4WaJ6A==",
"dependencies": {
"Microsoft.Extensions.Logging": "7.0.0",
"Serilog": "2.12.0"
}
},
"Speckle.AutoCAD.API": {
"type": "CentralTransitive",
"requested": "[2023.0.0, )",
"resolved": "2024.0.0",
"contentHash": "pZZ5uI+NXhZaQnsqRkgp/rywqBAjDObDJ9XNFGJvemT5k2OthDpHzlK/mKxz8QDCYie7uImQ8dv3uWj2QUFDPw=="
},
"Speckle.Core": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "RzQPVIGFFkKvG56YLr8ACtiwdWJE6IJ9vCQ4qHa0PIsUEpfzAIAi59jnzqtByOFC0FiFrFPow9bkfzylaZorAA==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Polly": "7.2.3",
"Polly.Contrib.WaitAndRetry": "1.1.1",
"Polly.Extensions.Http": "3.0.0",
"Sentry": "3.33.0",
"Sentry.Serilog": "3.33.0",
"Serilog": "2.12.0",
"Serilog.Enrichers.ClientInfo": "1.3.0",
"Serilog.Exceptions": "8.4.0",
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
}
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.0.1-alpha.14, )",
"resolved": "3.0.1-alpha.14",
"contentHash": "z38LGryMvh7iU1uBW+4uo5DwsB3CwRgLt2uFexWFx3mPSid+A0l5XcJzOgLwgFhNl6B42Ryz4ezBsddTp1Uc/g==",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Core": "3.0.1-alpha.14"
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.Bcl.AsyncInterfaces": "5.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
<UseWpf>true</UseWpf>
<Civil3DVersion>2025</Civil3DVersion>
<DefineConstants>$(DefineConstants);CIVIL3D2025;CIVIL3D;CIVIL3D2022_OR_GREATER;CIVIL3D2023_OR_GREATER;CIVIL3D2024_OR_GREATER;CIVIL3D2025_OR_GREATER</DefineConstants>
<Configurations>Debug;Release;Local</Configurations>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<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 -->
<StartAction>Program</StartAction>
<StartProgram>$(ProgramW6432)\Autodesk\AutoCAD $(Civil3DVersion)\acad.exe</StartProgram>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Speckle.AutoCAD.API" VersionOverride="2025.0.0" />
<PackageReference Include="Speckle.Civil3d.API" VersionOverride="2025.0.0" />
<FrameworkReference Include="Microsoft.WindowsDesktop.App" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Converters\Civil3d\Speckle.Converters.Civil3d2025\Speckle.Converters.Civil3d2025.csproj" />
<ProjectReference Include="..\..\..\DUI3\Speckle.Connectors.DUI.WebView\Speckle.Connectors.DUI.WebView.csproj" />
<ProjectReference Include="..\..\..\Sdk\Speckle.Converters.Common\Speckle.Converters.Common.csproj" />
</ItemGroup>
<Import Project="..\Speckle.Connectors.Civil3dShared\Speckle.Connectors.Civil3dShared.projitems" Label="Shared" />
<Import Project="..\Speckle.Connectors.AutocadShared\Speckle.Connectors.AutocadShared.projitems" Label="Shared" />
</Project>
@@ -0,0 +1,358 @@
{
"version": 2,
"dependencies": {
"net8.0-windows7.0": {
"Microsoft.NETFramework.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.0.3, )",
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net461": "1.0.3"
}
},
"Microsoft.SourceLink.GitHub": {
"type": "Direct",
"requested": "[8.0.0, )",
"resolved": "8.0.0",
"contentHash": "G5q7OqtwIyGTkeIOAc3u2ZuV/kicQaec5EaRnc0pIeSnh9LUjj+PYQrJYBURvDt7twGl2PKA7nSN0kz1Zw5bnQ==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "8.0.0",
"Microsoft.SourceLink.Common": "8.0.0"
}
},
"PolySharp": {
"type": "Direct",
"requested": "[1.14.1, )",
"resolved": "1.14.1",
"contentHash": "mOOmFYwad3MIOL14VCjj02LljyF1GNw1wP0YVlxtcPvqdxjGGMNdNJJxHptlry3MOd8b40Flm8RPOM8JOlN2sQ=="
},
"Speckle.AutoCAD.API": {
"type": "Direct",
"requested": "[2025.0.0, )",
"resolved": "2025.0.0",
"contentHash": "dqEgZ+bTqAG0tx0WwdnTZcbNKH2igzhOr3SMXtRYai7yIqXiz5btZ4Mf2bmfxbmxLucww3GKVpdZoI+PSZlMuQ=="
},
"Speckle.Civil3D.API": {
"type": "Direct",
"requested": "[2025.0.0, )",
"resolved": "2025.0.0",
"contentHash": "zWxdzk7M2JE1+PgIpGrCycDUwbmTqJ+YCNMaJPbjUgVKoAiI5w7Ou9ynbFgmQkRuYrkTflbL+s799Fw62PJixQ==",
"dependencies": {
"Speckle.AutoCAD.API": "2025.0.0"
}
},
"Speckle.InterfaceGenerator": {
"type": "Direct",
"requested": "[0.9.6, )",
"resolved": "0.9.6",
"contentHash": "HKH7tYrYYlCK1ct483hgxERAdVdMtl7gUKW9ijWXxA1UsYR4Z+TrRHYmzZ9qmpu1NnTycSrp005NYM78GDKV1w=="
},
"GraphQL.Client": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "8yPNBbuVBpTptivyAlak4GZvbwbUcjeQTL4vN1HKHRuOykZ4r7l5fcLS6vpyPyLn0x8FsL31xbOIKyxbmR9rbA==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0",
"GraphQL.Client.Abstractions.Websocket": "6.0.0",
"System.Reactive": "5.0.0"
}
},
"GraphQL.Client.Abstractions": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "h7uzWFORHZ+CCjwr/ThAyXMr0DPpzEANDa4Uo54wqCQ+j7qUKwqYTgOrb1W40sqbvNaZm9v/X7It31SUw0maHA==",
"dependencies": {
"GraphQL.Primitives": "6.0.0"
}
},
"GraphQL.Client.Abstractions.Websocket": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "Nr9bPf8gIOvLuXpqEpqr9z9jslYFJOvd0feHth3/kPqeR3uMbjF5pjiwh4jxyMcxHdr8Pb6QiXkV3hsSyt0v7A==",
"dependencies": {
"GraphQL.Client.Abstractions": "6.0.0"
}
},
"GraphQL.Primitives": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "yg72rrYDapfsIUrul7aF6wwNnTJBOFvuA9VdDTQpPa8AlAriHbufeXYLBcodKjfUdkCnaiggX1U/nEP08Zb5GA=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "bZKfSIKJRXLTuSzLudMFte/8CempWjVamNUR5eHJizsy+iuOuO/k2gnh7W0dHJmYY0tBf+gUErfluCv5mySAOQ=="
},
"Microsoft.CSharp": {
"type": "Transitive",
"resolved": "4.7.0",
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
},
"Microsoft.Data.Sqlite": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "KGxbPeWsQMnmQy43DSBxAFtHz3l2JX8EWBSGUCvT3CuZ8KsuzbkqMIJMDOxWtG8eZSoCDI04aiVQjWuuV8HmSw==",
"dependencies": {
"Microsoft.Data.Sqlite.Core": "7.0.5",
"SQLitePCLRaw.bundle_e_sqlite3": "2.1.4"
}
},
"Microsoft.Data.Sqlite.Core": {
"type": "Transitive",
"resolved": "7.0.5",
"contentHash": "FTerRmQPqHrCrnoUzhBu+E+1DNGwyrAMLqHkAqOOOu5pGfyMOj8qQUBxI/gDtWtG11p49UxSfWmBzRNlwZqfUg==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"Microsoft.Extensions.Configuration": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "nOP8R1mVb/6mZtm2qgAJXn/LFm/2kMjHDAg/QJLFG6CuWYJtaD3p1BwQhufBVvRzL9ceJ/xF0SQ0qsI2GkDQAA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "65MrmXCziWaQFrI0UHkQbesrX5wTwf9XPjY5yFm/VkgJKFJ5gqvXRoXjIZcf2wLi5ZlwGz/oMYfyURVCWbM5iw==",
"dependencies": {
"Microsoft.Extensions.Primitives": "2.2.0"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "vJ9xvOZCnUAIHcGC3SU35r3HKmHTVIeHzo6u/qzlHAqD8m6xv92MLin4oJntTvkpKxVX3vI1GFFkIQtU3AdlsQ==",
"dependencies": {
"Microsoft.Extensions.Configuration": "2.2.0"
}
},
"Microsoft.Extensions.DependencyInjection.Abstractions": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "f9hstgjVmr6rmrfGSpfsVOl2irKAgr1QjrSi3FgnS7kulxband50f2brRLwySAQTADPZeTdow0mpSMcoAdadCw=="
},
"Microsoft.Extensions.Options": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "UpZLNLBpIZ0GTebShui7xXYh6DmBHjWM8NxGxZbdQh/bPZ5e6YswqI+bru6BnEL5eWiOdodsXtEz3FROcgi/qg==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Primitives": "2.2.0",
"System.ComponentModel.Annotations": "4.5.0"
}
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
"resolved": "2.2.0",
"contentHash": "azyQtqbm4fSaDzZHD/J+V6oWMFaf2tWP4WEGIYePLCMw3+b2RQdj9ybgbQyjCshcitQKQ4lEDOZjmSlTTrHxUg==",
"dependencies": {
"System.Memory": "4.5.1",
"System.Runtime.CompilerServices.Unsafe": "4.5.1"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net461": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "AmOJZwCqnOCNp6PPcf9joyogScWLtwy0M1WkqfEQ0M9nYwyDD7EX9ZjscKS5iYnyvteX7kzSKFCKt9I9dXA6mA=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "8.0.0",
"contentHash": "dk9JPxTCIevS75HyEQ0E4OVAFhB2N+V9ShCXf8Q6FkUQZDkgLI12y679Nym1YqsiSysuQskT7Z+6nUf3yab6Vw=="
},
"Speckle.DoubleNumerics": {
"type": "Transitive",
"resolved": "4.0.1",
"contentHash": "MzEQ1Im0zTja+tEsdRIk/WlPiKqb22NmTOJcR1ZKm/mz46pezyyID3/wRz6vJUELMpSLnG7LhsxBL+nxbr7V0w=="
},
"Speckle.Newtonsoft.Json": {
"type": "Transitive",
"resolved": "13.0.2",
"contentHash": "g1BejUZwax5PRfL6xHgLEK23sqHWOgOj9hE7RvfRRlN00AGt8GnPYt8HedSK7UB3HiRW8zCA9Pn0iiYxCK24BA=="
},
"SQLitePCLRaw.bundle_e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "EWI1olKDjFEBMJu0+3wuxwziIAdWDVMYLhuZ3Qs84rrz+DHwD00RzWPZCa+bLnHCf3oJwuFZIRsHT5p236QXww==",
"dependencies": {
"SQLitePCLRaw.lib.e_sqlite3": "2.1.4",
"SQLitePCLRaw.provider.e_sqlite3": "2.1.4"
}
},
"SQLitePCLRaw.core": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "inBjvSHo9UDKneGNzfUfDjK08JzlcIhn1+SP5Y3m6cgXpCxXKCJDy6Mka7LpgSV+UZmKSnC8rTwB0SQ0xKu5pA==",
"dependencies": {
"System.Memory": "4.5.3"
}
},
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"SQLitePCLRaw.provider.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "CSlb5dUp1FMIkez9Iv5EXzpeq7rHryVNqwJMWnpq87j9zWZexaEMdisDktMsnnrzKM6ahNrsTkjqNodTBPBxtQ==",
"dependencies": {
"SQLitePCLRaw.core": "2.1.4"
}
},
"System.ComponentModel.Annotations": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg=="
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "3oDzvc/zzetpTKWMShs1AADwZjQ/36HnsufHRPcOjyRAAMLDlu2iD33MBI2opxnezcVUtXyqDXXjoFMOU9c7SA=="
},
"System.Reactive": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "erBZjkQHWL9jpasCE/0qKAryzVBJFxGHVBAvgRN1bzM0q2s1S4oYREEEL0Vb+1kA/6BKb5FjUZMp5VXmy+gzkQ=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "4.5.1",
"contentHash": "Zh8t8oqolRaFa9vmOZfdQm/qKejdqz0J9kr7o2Fu0vPeoH3BL1EOXipKWwkWtLT1JPzjByrF19fGuFlNbmPpiw=="
},
"speckle.connectors.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.DependencyInjection": "[2.2.0, )",
"Speckle.Connectors.Logging": "[1.0.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )"
}
},
"speckle.connectors.dui": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Connectors.Common": "[1.0.0, )",
"Speckle.Sdk": "[3.1.0-dev.219, )",
"Speckle.Sdk.Dependencies": "[3.1.0-dev.219, )",
"System.Threading.Tasks.Dataflow": "[6.0.0, )"
}
},
"speckle.connectors.dui.webview": {
"type": "Project",
"dependencies": {
"Microsoft.Web.WebView2": "[1.0.1938.49, )",
"Speckle.Connectors.DUI": "[1.0.0, )"
}
},
"speckle.connectors.logging": {
"type": "Project"
},
"speckle.converters.civil3d2025": {
"type": "Project",
"dependencies": {
"Speckle.AutoCAD.API": "[2025.0.0, )",
"Speckle.Civil3d.API": "[2025.0.0, )",
"Speckle.Connectors.DUI.WebView": "[1.0.0, )",
"Speckle.Converters.Common": "[1.0.0, )"
}
},
"speckle.converters.common": {
"type": "Project",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "[2.2.0, )",
"Speckle.Objects": "[3.1.0-dev.219, )"
}
},
"Microsoft.Extensions.DependencyInjection": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "MZtBIwfDFork5vfjpJdG5g8wuJFt7d/y3LOSVVtDK/76wlbtz6cjltfKHqLx2TKVqTj5/c41t77m1+h20zqtPA==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0"
}
},
"Microsoft.Extensions.Logging": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "Nxqhadc9FCmFHzU+fz3oc8sFlE6IadViYg8dfUdGzJZ2JUxnCsRghBhhOWdM4B2zSZqEc+0BjliBh/oNdRZuig==",
"dependencies": {
"Microsoft.Extensions.Configuration.Binder": "2.2.0",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging.Abstractions": "2.2.0",
"Microsoft.Extensions.Options": "2.2.0"
}
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "CentralTransitive",
"requested": "[2.2.0, )",
"resolved": "2.2.0",
"contentHash": "B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
},
"Speckle.Objects": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "2thsMUDkRr7lR0PXZJ8k3KWZLWjz/aBY0KaO2SuXM0lIKyJw1APMJ7lXJ89e6JAjBzEbK8yLHBb0qtfcc4bNRw==",
"dependencies": {
"Speckle.Sdk": "3.1.0-dev.219"
}
},
"Speckle.Sdk": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "UTgz9UgkMFGqRLmCq1HPo74MngvKbSZOFWaMRzASHrrnsBtzZatBXjoJBlvVoeBCoiea5Jj+BgZg6RvlV2m3sg==",
"dependencies": {
"GraphQL.Client": "6.0.0",
"Microsoft.CSharp": "4.7.0",
"Microsoft.Data.Sqlite": "7.0.5",
"Microsoft.Extensions.DependencyInjection.Abstractions": "2.2.0",
"Microsoft.Extensions.Logging": "2.2.0",
"Speckle.DoubleNumerics": "4.0.1",
"Speckle.Newtonsoft.Json": "13.0.2",
"Speckle.Sdk.Dependencies": "3.1.0-dev.219"
}
},
"Speckle.Sdk.Dependencies": {
"type": "CentralTransitive",
"requested": "[3.1.0-dev.219, )",
"resolved": "3.1.0-dev.219",
"contentHash": "5hqBd9whAs5cC8S/6YUgKFOivjntAkVutKhz06XD/f3Kj6xScT3hwcUaWBxiwK3Mw7FLtiVuU1uG777pjn0PKQ=="
},
"System.Threading.Tasks.Dataflow": {
"type": "CentralTransitive",
"requested": "[6.0.0, )",
"resolved": "6.0.0",
"contentHash": "+tyDCU3/B1lDdOOAJywHQoFwyXIUghIaP2BxG79uvhfTnO+D9qIgjVlL/JV2NTliYbMHpd6eKDmHp2VHpij7MA=="
}
},
"net8.0-windows7.0/win-x64": {
"SQLitePCLRaw.lib.e_sqlite3": {
"type": "Transitive",
"resolved": "2.1.4",
"contentHash": "2C9Q9eX7CPLveJA0rIhf9RXAvu+7nWZu1A2MdG6SD/NOu26TakGgL1nsbc0JAspGijFOo3HoN79xrx8a368fBg=="
},
"Microsoft.Web.WebView2": {
"type": "CentralTransitive",
"requested": "[1.0.1938.49, )",
"resolved": "1.0.1938.49",
"contentHash": "z8KnFnaTYzhA/ZnyRX0qGfS1NU5ZBJeClAH64F0fVDvdDJTvME7xl6zTJ0Jlfe1BtL3C0NH9xTy64shg2baKdw=="
}
}
}
}
@@ -0,0 +1,66 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.Bindings;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Cancellation;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Connectors.DUI.Bridge;
using Speckle.Connectors.DUI.Models;
using Speckle.Connectors.DUI.Models.Card.SendFilter;
using Speckle.Converters.Autocad;
using Speckle.Converters.Civil3dShared;
using Speckle.Converters.Common;
using Speckle.Sdk;
namespace Speckle.Connectors.Civil3dShared.Bindings;
public sealed class Civil3dSendBinding : AutocadSendBaseBinding
{
private readonly ICivil3dConversionSettingsFactory _civil3dConversionSettingsFactory;
private readonly IAutocadConversionSettingsFactory _autocadConversionSettingsFactory;
public Civil3dSendBinding(
DocumentModelStore store,
IAutocadIdleManager idleManager,
IBrowserBridge parent,
IEnumerable<ISendFilter> sendFilters,
CancellationManager cancellationManager,
IServiceProvider serviceProvider,
ISendConversionCache sendConversionCache,
IOperationProgressManager operationProgressManager,
ILogger<AutocadSendBinding> logger,
ICivil3dConversionSettingsFactory civil3dConversionSettingsFactory,
IAutocadConversionSettingsFactory autocadConversionSettingsFactory,
ISpeckleApplication speckleApplication
)
: base(
store,
idleManager,
parent,
sendFilters,
cancellationManager,
serviceProvider,
sendConversionCache,
operationProgressManager,
logger,
speckleApplication
)
{
_civil3dConversionSettingsFactory = civil3dConversionSettingsFactory;
_autocadConversionSettingsFactory = autocadConversionSettingsFactory;
}
// POC: we're registering the conversion settings for autocad here because we need the autocad conversion settings to be able to use the autocad typed converters.
// POC: We need a separate send binding for civil3d due to using a different unit converter (needed for conversion settings construction)
protected override void InitializeSettings(IServiceProvider serviceProvider)
{
serviceProvider
.GetRequiredService<IConverterSettingsStore<Civil3dConversionSettings>>()
.Initialize(_civil3dConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
serviceProvider
.GetRequiredService<IConverterSettingsStore<AutocadConversionSettings>>()
.Initialize(_autocadConversionSettingsFactory.Create(Application.DocumentManager.CurrentDocument));
}
}
@@ -0,0 +1,34 @@
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
using Speckle.Connectors.Autocad.DependencyInjection;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Civil3dShared.Bindings;
using Speckle.Connectors.Civil3dShared.Operations.Send;
using Speckle.Connectors.Common.Builders;
using Speckle.Connectors.DUI.Bindings;
using Speckle.Converters.Civil3dShared.Helpers;
using Speckle.Converters.Civil3dShared.ToSpeckle;
using Speckle.Sdk;
namespace Speckle.Connectors.Civil3dShared.DependencyInjection;
public static class Civil3dConnectorModule
{
public static void AddCivil3d(this IServiceCollection serviceCollection)
{
serviceCollection.AddAutocadBase();
serviceCollection.LoadSend();
// register civil specific send classes
serviceCollection.AddScoped<IRootObjectBuilder<AutocadRootObject>, Civil3dRootObjectBuilder>();
serviceCollection.AddSingleton<IBinding, Civil3dSendBinding>();
// automatically detects the Class:IClass interface pattern to register all generated interfaces
serviceCollection.AddMatchingInterfacesAsTransient(Assembly.GetExecutingAssembly());
// additional classes
serviceCollection.AddScoped<PropertySetDefinitionHandler>();
serviceCollection.AddScoped<CatchmentGroupHandler>();
serviceCollection.AddScoped<PipeNetworkHandler>();
}
}
@@ -0,0 +1,67 @@
using Autodesk.AutoCAD.DatabaseServices;
using Microsoft.Extensions.Logging;
using Speckle.Connectors.Autocad.HostApp;
using Speckle.Connectors.Autocad.Operations.Send;
using Speckle.Connectors.Common.Caching;
using Speckle.Connectors.Common.Operations;
using Speckle.Converters.Civil3dShared.Helpers;
using Speckle.Converters.Civil3dShared.ToSpeckle;
using Speckle.Converters.Common;
using Speckle.Sdk.Logging;
using Speckle.Sdk.Models.Collections;
namespace Speckle.Connectors.Civil3dShared.Operations.Send;
public sealed class Civil3dRootObjectBuilder : AutocadRootObjectBaseBuilder
{
private readonly AutocadLayerUnpacker _layerUnpacker;
private readonly PropertySetDefinitionHandler _propertySetDefinitionHandler;
private readonly CatchmentGroupHandler _catchmentGroupHandler;
private readonly PipeNetworkHandler _pipeNetworkHandler;
public Civil3dRootObjectBuilder(
AutocadLayerUnpacker layerUnpacker,
PropertySetDefinitionHandler propertySetDefinitionHandler,
CatchmentGroupHandler catchmentGroupHandler,
PipeNetworkHandler pipeNetworkHandler,
IRootToSpeckleConverter converter,
ISendConversionCache sendConversionCache,
AutocadInstanceUnpacker instanceObjectManager,
AutocadMaterialUnpacker materialUnpacker,
AutocadColorUnpacker colorUnpacker,
AutocadGroupUnpacker groupUnpacker,
ILogger<AutocadRootObjectBuilder> logger,
ISdkActivityFactory activityFactory
)
: base(
converter,
sendConversionCache,
instanceObjectManager,
materialUnpacker,
colorUnpacker,
groupUnpacker,
logger,
activityFactory
)
{
_layerUnpacker = layerUnpacker;
_propertySetDefinitionHandler = propertySetDefinitionHandler;
_catchmentGroupHandler = catchmentGroupHandler;
_pipeNetworkHandler = pipeNetworkHandler;
}
public override (Collection, LayerTableRecord?) CreateObjectCollection(Entity entity, Transaction tr)
{
Layer layer = _layerUnpacker.GetOrCreateSpeckleLayer(entity, tr, out LayerTableRecord? autocadLayer);
return (layer, autocadLayer);
}
// POC: probably will need to add Network proxies as well
public override void AddAdditionalProxiesToRoot(Collection rootObject)
{
rootObject[ProxyKeys.PROPERTYSET_DEFINITIONS] = _propertySetDefinitionHandler.Definitions;
rootObject["catchmentGroupProxies"] = _catchmentGroupHandler.CatchmentGroupProxiesCache.Values.ToList();
rootObject["pipeNetworkProxies"] = _pipeNetworkHandler.PipeNetworkProxiesCache.Values.ToList();
}
}
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>55E65D72-2FE8-4E61-891C-16A4D551CCF7</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>Speckle.Connectors.Civil3dShared</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)DependencyInjection\Civil3dConnectorModule.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Operations\Send\Civil3dRootObjectBuilder.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bindings\Civil3dSendBinding.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)DependencyInjection\" />
<Folder Include="$(MSBuildThisFileDirectory)Bindings\" />
<Folder Include="$(MSBuildThisFileDirectory)Operations\Send\" />
</ItemGroup>
</Project>

Some files were not shown because too many files have changed in this diff Show More