Skip to content

About

Sample Connector using DataExchange SDK

Topics

Resources

Stars

13 stars

Watchers

5 watching

Forks

Latest commit

 

History

129 Commits

Folders and files

Repository files navigation

Autodesk Data Exchange Connector UI Sample

oAuth2 .NET Platform SDK Version Level

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.

Table of Contents

Overview

This sample application demonstrates the integration of the Autodesk Data Exchange SDK with a Windows desktop application using WPF. It showcases how to:

  • Embed the Data Exchange Connector UI within your application
  • Implement PKCE OAuth2 authentication with Autodesk Platform Services
  • Create and manage data exchanges programmatically
  • Handle multiple 3D file formats (STEP, IFC, OBJ, USD, Mesh API)
  • Provide real-time progress feedback and notifications
  • Implement custom read/write models for exchange operations

Target Audience: Developers building Windows desktop applications that need to integrate with Autodesk's construction and design workflows.

Features

Connector UI Integration

  • Integrate Data Exchange Connector UI within your WPF or WinForm application
  • Real-time notifications and progress tracking
  • Integrated 3D model preview for exchange selection

Authentication & Security

  • PKCE OAuth2 implementation with APS (Autodesk Platform Services)

Exchange Management

  • Create new exchanges with custom metadata
  • Update existing exchanges with new revisions
  • Download and cache exchange data locally
  • Search and filter exchanges with advanced criteria

Screenshots

Home Screen with Exchange Creation

The Connector UI provides a comprehensive workflow with four distinct screens:

  • Home Screen: Entry point with project and exchange navigation
  • Tooltip Notifications: Real-time feedback and status updates
  • Create Exchange: Interactive creation workflow
  • Exchange Management: Browse and manage existing exchanges
Home Getting Started View Create Exchange View

Exchange Details Extended Panel

The Exchange panel provides comprehensive information about the exchange, including metadata and associated data, while supporting all key actions for managing and interacting with exchanges.

Exchange Details Panel

Unified 3D Load Preview

View and inspect 3D models directly within the Connector UI using the APS Viewer, without leaving the application interface.

3D Model Preview

Search and Selection Tools

Familiar search and selection interface that mirrors the user experience from Autodesk's hero applications like Revit, providing intuitive navigation and filtering capabilities.

Search and Selection Interface

Prerequisites

Development Environment

  • Visual Studio 2022 or later
  • .NET Framework 4.8 — this sample targets .NET Framework 4.8. The SDK itself also supports .NET 8 and .NET 10; see Installing the SDK
  • Windows 10 or later, x64

Autodesk Platform Services

  1. APS Developer Account: Register here

  2. Application Registration: Create an app with the following scopes:

    • Data Management API
    • Data Exchange API
  3. Account Access: Add your application's client ID to your BIM 360 or Forma account so the sample can reach your projects.

  4. Forma (formerly Autodesk Construction Cloud): an active account to store created exchanges in, or to load exchanges from

Required Credentials

  • Client ID: From your APS application
  • Callback URL: Default: http://127.0.0.1:63212/

Installation

1. Clone the Repository

git clone https://github.com/autodesk-platform-services/aps-dataexchange-connector.git
cd aps-dataexchange-connector

2. Restore NuGet Packages

The SDK ships as two packages on nuget.org, Autodesk.DataExchange and Autodesk.DataExchange.UI, and both are already declared in src/SampleConnector.csproj. No additional package source is required — a restore pulls them and their transitive dependencies.

  1. Open src/SampleConnector.sln
  2. Right-click on the solution → Restore NuGet Packages
  3. Confirm the solution platform is set to x64. The SDK and its support libraries are 64-bit, and Visual Studio defaults new C# projects to Any CPU, which leads to unstable runtime behavior rather than a clean build failure.
  4. Build the solution (Ctrl+Shift+B)

To restore and build from the command line instead:

msbuild -t:restore src/SampleConnector.sln
msbuild src/SampleConnector.sln -p:Configuration=Debug -p:Platform=x64

Adding the SDK to your own project

To install the SDK into your own connector rather than running this sample:

dotnet add package Autodesk.DataExchange
dotnet add package Autodesk.DataExchange.UI

These are the only two Data Exchange packages available to third-party connectors, and Autodesk.DataExchange.UI is optional if you are not using the Connector UI. See Installing the SDK.

Configuration

1. Application Configuration

Edit src/App.Debug.config (for Debug builds) or src/App.Release.config (for Release builds):

<configuration>
    <appSettings>
        <add key="AuthClientId" value="YOUR_CLIENT_ID" />
        <add key="AuthCallback" value="http://127.0.0.1:63212/" />
        <add key="ConnectorName" value="Your Connector Name" />
        <add key="ConnectorVersion" value="1.0.0" />
        <add key="HostApplicationName" value="Your Host App" />
        <add key="HostApplicationVersion" value="1.0.0" />
        <add key="LogLevel" value="Info" />
    </appSettings>
</configuration>

2. Configuration Parameters

Parameter Description Required
AuthClientId APS application Client ID Yes
AuthCallback OAuth2 redirect URI Yes
ConnectorName Display name for your connector Yes
ConnectorVersion Version of your connector Yes
HostApplicationName Name of your host application Yes
HostApplicationVersion Version of your host app Yes
LogLevel Debug, Info, Warning, Error No

Usage

1. Launch the Application

  1. Build and run the solution from Visual Studio
  2. The application opens a web browser for APS authentication
  3. Sign in with your Autodesk credentials
  4. The Connector UI appears within the sample application

2. Create an Exchange

  1. Click Create Exchange in the UI
  2. Programmatically add metadata and properties (in your custom exchange model)
  3. Publish to Forma

3. Manage Exchanges

  • View Exchanges: Browse existing exchanges from your Forma projects
  • Update Exchanges: Add new revisions to existing exchanges
  • Download: Retrieve exchange data in various formats
  • Preview: View 3D models directly in the UI

Key Components

CustomReadWriteModel

Purpose: Core implementation of exchange operations

  • Inherits from BaseReadWriteExchangeModel
  • Manages local exchange cache
  • Handles progress notifications
  • Implements geometry download/upload
  • Programmatically retrieve and add data to exchange data model

CreateExchangeHelper

Purpose: Utility for creating sample geometry and exchanges

  • Supports multiple geometry formats
  • Generates test exchanges with varied content
  • Demonstrates best practices for element creation

SampleHostWindow

Purpose: Main WPF window and application coordinator

  • Initializes the Data Exchange SDK
  • Configures authentication
  • Hosts the Connector UI via IInteropBridge
  • Manages application lifecycle

Manual Testing Scenarios

  1. Authentication Flow: Test OAuth2 login/logout
  2. Exchange Operations: Create, update, and load exchanges
  3. UI Responsiveness: Verify progress indicators and notifications

API Reference

Primary SDK Classes Used

Class Namespace Purpose
IInteropBridge Autodesk.DataExchange.UI.Core.Interfaces Main UI integration point
ElementDataModel Autodesk.DataExchange.DataModels Geometry and metadata container
IClient Autodesk.DataExchange.Interface Core SDK client
DataExchange Autodesk.DataExchange.Core.Models Exchange data structure
SDKOptionsDefaultSetup Autodesk.DataExchange Configuration setup

Further Reading

Official Documentation

Related Samples

Community Resources

License

This sample code is provided for use with the Autodesk Data Exchange .NET SDK and is subject to the Autodesk Platform Services Terms.

Support

For technical support and questions:

  • SDK Issues: Contact Autodesk Developer Support
  • Sample Issues: Create an issue in this repository
  • General Questions: Use the APS Developer Forum

About

Sample Connector using DataExchange SDK

Topics

Resources

Stars

13 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages