Skip to content

Commit 0ae42dc

Browse files
authored
Merge pull request #26 from hariomsharmaadsk/Mgrtn_frm_524_to_62X
Migration from DXSDK 5.2.4 to 6.2.0
2 parents a4a66ac + 250409f commit 0ae42dc

25 files changed

+10777
-811
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,4 +362,5 @@ MigrationBackup/
362362
# Fody - auto-generated XML schema
363363
FodyWeavers.xsd
364364

365-
!*/InputStepFile/*.obj
365+
!*/InputStepFile/*.obj
366+
/MIGRATION_GUIDE.md

README.md

Lines changed: 245 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,258 @@
1+
# Autodesk Data Exchange Connector UI Sample
12

2-
# Sample UI Connector
3+
[![oAuth2](https://img.shields.io/badge/oAuth2-PKCE-green.svg)](http://developer.autodesk.com/)
4+
![.NET](https://img.shields.io/badge/.NET-4.8%20%7C%208.0-blue.svg)
5+
![Platform](https://img.shields.io/badge/Platform-Windows-lightgrey.svg)
6+
![SDK Version](https://img.shields.io/badge/DX%20SDK-6.2.0-blue.svg)
7+
![Level](https://img.shields.io/badge/Level-Intermediate-orange.svg)
38

4-
[![oAuth2](https://img.shields.io/badge/oAuth2-v2-green.svg)](http://developer.autodesk.com/)
5-
![.NET](https://img.shields.io/badge/.NET%20Framework-4.8-blue.svg)
6-
![Intermediary](https://img.shields.io/badge/Level-Intermediary-lightblue.svg)
9+
A comprehensive **WPF-based sample application** demonstrating how to integrate the Autodesk Data Exchange SDK's Connector UI components into a desktop application. This sample provides a complete reference implementation for building Windows applications that create and manage data exchanges.
710

8-
# Description
9-
This application is an example that serves as a reference implemention for a UI-based, Autodesk Data Exchange Connector. The sample code supports creating and updating as well as retrieving an exchange via a desktop-based UI and provides integration points for client-applications.
11+
## Table of Contents
1012

11-
This is recommended for solutions that require integrating the Autodesk Data Exchange service with a Windows desktop based application.
13+
- [Overview](#overview)
14+
- [Features](#features)
15+
- [Architecture](#architecture)
16+
- [Screenshots](#screenshots)
17+
- [Prerequisites](#prerequisites)
18+
- [Installation](#installation)
19+
- [Configuration](#configuration)
20+
- [Usage](#usage)
21+
- [Project Structure](#project-structure)
22+
- [Key Components](#key-components)
23+
- [Sample Data](#sample-data)
24+
- [Testing](#testing)
25+
- [API Reference](#api-reference)
26+
- [Further Reading](#further-reading)
27+
- [License](#license)
1228

13-
For samples that do not use the UI component see https://github.com/autodesk-platform-services/aps-dataexchange-console
29+
## Overview
1430

15-
# Thumbnail
16-
![ThumbnailUI](images/Thumbnail.png)
31+
This sample application demonstrates the integration of the **Autodesk Data Exchange SDK** with a Windows desktop application using WPF. It showcases how to:
1732

18-
# Setup
19-
The **Autodesk Data Exchange SDK** is installed into this project as a package reference. All required packages are a part of packages.config and will be restored automatically on first build.
33+
- Embed the Data Exchange Connector UI within your application
34+
- Implement PKCE OAuth2 authentication with Autodesk Platform Services
35+
- Create and manage data exchanges programmatically
36+
- Handle multiple 3D file formats (STEP, IFC, OBJ, Mesh API)
37+
- Provide real-time progress feedback and notifications
38+
- Implement custom read/write models for exchange operations
39+
40+
**Target Audience**: Developers building Windows desktop applications that need to integrate with Autodesk's construction and design workflows.
41+
42+
## Features
43+
44+
### 🎨 **Connector UI Integration**
45+
46+
- Integrate Data Exchange Connector UI within your WPF or WinForm application
47+
- Real-time notifications and progress tracking
48+
- Integrated 3D model preview for exchange selection
49+
50+
### 🔐 **Authentication & Security**
51+
52+
- PKCE OAuth2 implementation with APS (Autodesk Platform Services)
53+
54+
### 🔄 **Exchange Management**
55+
56+
- Create new exchanges with custom metadata
57+
- Update existing exchanges with new revisions
58+
- Download and cache exchange data locally
59+
- Search and filter exchanges with advanced criteria
60+
61+
## Screenshots
62+
63+
### Home Screen with Exchange Creation
64+
65+
The Connector UI provides a comprehensive workflow with four distinct screens:
66+
67+
- **Home Screen**: Entry point with project and exchange navigation
68+
- **Tooltip Notifications**: Real-time feedback and status updates
69+
- **Create Exchange**: Interactive creation workflow
70+
- **Exchange Management**: Browse and manage existing exchanges
71+
72+
![Exchange Creation Interface](images/home-screen-tooltip-notifications-create-exchange.png)
73+
74+
### Integrated 3D Preview
75+
76+
View and inspect 3D models directly within the Connector UI using the APS Viewer, without leaving the application interface.
77+
78+
![3D Model Preview](images/integrated-exchange-3d-preview.png)
79+
80+
### Search and Selection Tools
81+
82+
Familiar search and selection interface that mirrors the user experience from Autodesk's hero applications like Revit, providing intuitive navigation and filtering capabilities.
83+
84+
![Search and Selection Interface](images/integrated-exchange-search-selection-tools.png)
2085

2186
## Prerequisites
22-
1. [Register an app](https://aps.autodesk.com/myapps/), and select the Data Management and the Data Exchange APIs. Note down the values of **Client ID, Client Secret and Auth callback**. For more information on different types of apps, refer [Application Types](https://aps.autodesk.com/en/docs/oauth/v2/developers_guide/App-types/) page.
23-
2. Verify that you have access to the [Autodesk Construction Cloud](https://acc.autodesk.com/) (ACC).
24-
3. **Visual Studio**.
25-
4. **Dot NET Framework 4.8** with basic knowledge of C#.
26-
27-
## Running locally
28-
1. Clone this repository using *git clone*.
29-
2. Follow [these](https://aps.autodesk.com/en/docs/dx-sdk-beta/v1/developers_guide/installing_the_sdk/#procedure) instructions for installing the Data Exchange .Net SDK NuGet package in Visual Studio.
30-
3. Restore the Data Exchange SDK packages by one of the following approaches:
31-
* Building the solution using Visual Studio IDE, or
32-
* Building the solution using *BuildSolution.bat* [Note:Prior to executing "BuildSolution.bat," follow these steps
33-
34-
Step-1 download and unzip nuget packages with appropriate versions to parent directory of repo.
35-
36-
Step-2 either add the path of msbuild.exe **(VS 2022)** to the environment variables or utilize the developer command prompt **( for VS 2022 only)**.]
37-
4. Add values for Client Id, Client Secret and Auth callback in the App.Debug.config file in the sample connector.
38-
39-
Once you build and run the sample connector, it will open the URL for authentication in a web browser.
40-
You can enter your credentials in the authentication page and on successful authentication, you will see the Connector UI screen as seen in the Thumbnail above.
87+
88+
### Development Environment
89+
90+
- **Visual Studio 2019** or later (recommended: Visual Studio 2022)
91+
- **.NET Framework 4.8** or **.NET 8.0** SDK
92+
- **Windows 10** or later (x64 architecture)
93+
94+
### Autodesk Platform Services
95+
96+
1. **APS Developer Account**: [Register here](https://aps.autodesk.com/myapps/)
97+
98+
2. **Application Registration**: Create an app with the following scopes:
99+
100+
- Data Management API
101+
- Data Exchange API
102+
103+
3. **Autodesk Construction Cloud**: Active ACC account to store created exchange or load exchanges from
104+
105+
### Required Credentials
106+
107+
- **Client ID**: From your APS application
108+
- **Callback URL**: Default: `http://127.0.0.1:63212/`
109+
110+
## Installation
111+
112+
### 1. Clone the Repository
113+
114+
```bash
115+
git clone https://github.com/autodesk-platform-services/aps-dataexchange-connector.git
116+
cd aps-dataexchange-connector
117+
```
118+
119+
### 2. Install Data Exchange SDK
120+
121+
Follow the [official SDK installation guide](https://aps.autodesk.com/en/docs/dx-sdk-beta/v1/developers_guide/installing_the_sdk/#procedure) to add the NuGet package source in Visual Studio.
122+
123+
### 3. Restore NuGet Packages
124+
125+
1. Open `src/SampleConnector.sln`
126+
2. Right-click on the solution → **Restore NuGet Packages**
127+
3. Build the solution (`Ctrl+Shift+B`)
128+
129+
## Configuration
130+
131+
### 1. Application Configuration
132+
133+
Edit `src/App.Debug.config` (for Debug builds) or `src/App.Release.config` (for Release builds):
134+
135+
```xml
136+
<configuration>
137+
<appSettings>
138+
<add key="AuthClientId" value="YOUR_CLIENT_ID" />
139+
<add key="AuthCallback" value="http://127.0.0.1:63212/" />
140+
<add key="ConnectorName" value="Your Connector Name" />
141+
<add key="ConnectorVersion" value="1.0.0" />
142+
<add key="HostApplicationName" value="Your Host App" />
143+
<add key="HostApplicationVersion" value="1.0.0" />
144+
<add key="LogLevel" value="Info" />
145+
</appSettings>
146+
</configuration>
147+
```
148+
149+
### 2. Configuration Parameters
150+
151+
| Parameter | Description | Required |
152+
| ------------------------ | ------------------------------- | -------- |
153+
| `AuthClientId` | APS application Client ID | ✅ Yes |
154+
| `AuthCallback` | OAuth2 redirect URI | ✅ Yes |
155+
| `ConnectorName` | Display name for your connector | ❌ No |
156+
| `ConnectorVersion` | Version of your connector | ❌ No |
157+
| `HostApplicationName` | Name of your host application | ❌ No |
158+
| `HostApplicationVersion` | Version of your host app | ❌ No |
159+
| `LogLevel` | Debug, Info, Warning, Error | ❌ No |
160+
161+
## Usage
162+
163+
### 1. Launch the Application
164+
165+
1. Build and run the solution from Visual Studio
166+
2. The application opens a web browser for APS authentication
167+
3. Sign in with your Autodesk credentials
168+
4. The Connector UI appears within the sample application
169+
170+
### 2. Create an Exchange
171+
172+
1. Click **Create Exchange** in the UI
173+
2. Programmatically add metadata and properties (in your custom exchange model)
174+
3. Publish to Autodesk Construction Cloud
175+
176+
### 3. Manage Exchanges
177+
178+
- **View Exchanges**: Browse existing exchanges from your ACC projects
179+
- **Update Exchanges**: Add new revisions to existing exchanges
180+
- **Download**: Retrieve exchange data in various formats
181+
- **Preview**: View 3D models directly in the UI
182+
183+
## Key Components
184+
185+
### `CustomReadWriteModel`
186+
187+
**Purpose**: Core implementation of exchange operations
188+
189+
- Inherits from `BaseReadWriteExchangeModel`
190+
- Manages local exchange cache
191+
- Handles progress notifications
192+
- Implements geometry download/upload
193+
- Programmatically retrieve and add data to exchange data model
194+
195+
### `CreateExchangeHelper`
196+
197+
**Purpose**: Utility for creating sample geometry and exchanges
198+
199+
- Supports multiple geometry formats
200+
- Generates test exchanges with varied content
201+
- Demonstrates best practices for element creation
202+
203+
### `SampleHostWindow`
204+
205+
**Purpose**: Main WPF window and application coordinator
206+
207+
- Initializes the Data Exchange SDK
208+
- Configures authentication
209+
- Hosts the Connector UI via `IInteropBridge`
210+
- Manages application lifecycle
211+
212+
### Manual Testing Scenarios
213+
214+
1. **Authentication Flow**: Test OAuth2 login/logout
215+
2. **Exchange Operations**: Create, update, and load exchanges
216+
3. **UI Responsiveness**: Verify progress indicators and notifications
217+
218+
## API Reference
219+
220+
### Primary SDK Classes Used
221+
222+
| Class | Namespace | Purpose |
223+
| ------------------------ | ------------------------------------------ | ------------------------------- |
224+
| `IInteropBridge` | `Autodesk.DataExchange.UI.Core.Interfaces` | Main UI integration point |
225+
| `ElementDataModel` | `Autodesk.DataExchange.DataModels` | Geometry and metadata container |
226+
| `IClient` | `Autodesk.DataExchange.Interface` | Core SDK client |
227+
| `DataExchange` | `Autodesk.DataExchange.Core.Models` | Exchange data structure |
228+
| `SDKOptionsDefaultSetup` | `Autodesk.DataExchange` | Configuration setup |
41229

42230
## Further Reading
43-
### Documentation:
44-
* [Autodesk Data Exchange SDK](https://aps.autodesk.com/en/docs/dx-sdk-beta/v1/developers_guide/overview/)
45231

46-
# License
47-
This sample code is part of the Autodesk Data Exchange .NET SDK (Software Development Kit) beta. It is subject to the license in Center Code covering the Autodesk Data Exchange .NET SDK (Software Development Kit) beta.
232+
### Official Documentation
233+
234+
- [Autodesk Data Exchange SDK Documentation](https://aps.autodesk.com/en/docs/dx-sdk-beta/v1/developers_guide/overview/)
235+
- [Autodesk Platform Services Developer Portal](https://aps.autodesk.com/)
236+
- [Data Exchange API Reference](https://aps.autodesk.com/en/docs/dx-sdk-beta/v1/reference/)
237+
238+
### Related Samples
239+
240+
- [Console-based Data Exchange Sample](https://github.com/autodesk-platform-services/aps-dataexchange-console) - For non-UI implementations
241+
- [APS Tutorials](https://tutorials.autodesk.io/) - Additional platform samples
242+
243+
### Community Resources
244+
245+
- [APS Developer Forum](https://forums.autodesk.com/t5/autodesk-platform-services/ct-p/autodesk-platform-services)
246+
- [Autodesk Developer Blog](https://aps.autodesk.com/blog)
247+
248+
## License
249+
250+
This sample code is part of the **Autodesk Data Exchange .NET SDK** beta program and is subject to the license terms covering the SDK. Please refer to the SDK license agreement for complete terms and conditions.
251+
252+
## Support
253+
254+
For technical support and questions:
48255

49-
# Written by
50-
Rinku Thakur, Autodesk
256+
- **SDK Issues**: Contact Autodesk Developer Support
257+
- **Sample Issues**: Create an issue in this repository
258+
- **General Questions**: Use the [APS Developer Forum](https://forums.autodesk.com/t5/autodesk-platform-services/ct-p/autodesk-platform-services)

images/Thumbnail.png

-49.3 KB
Binary file not shown.
118 KB
Loading
198 KB
Loading
106 KB
Loading

0 commit comments

Comments
 (0)