This article guides you through adding the SDK Connector to your Windows application, from setting up your Visual Studio project to implementing the AppInterface, the code that connects the Connector to your model.
💡 Tip: New to the SDK Connector? Read SDK Connector with full GUI: overview and requirements first.
Before you begin
Make sure you have:
The SDK Connector package, with the files unblocked. See Requirements.
Visual Studio with a C# Windows Forms project for .NET Framework 4.8.
A BIMcollab user account on the Playground.
The generic developer token for testing on the Playground:
460C8E9C-20E4-4188-BCA2-8E34F464C026.
Overview of the steps
Step | What you do |
1. Prepare your project | Change a build setting and add the AppInterface project. |
2. Add the user control to a form | Place the BCF Manager interface in a window of your application. |
3. Set your vendor-specific values | Add your app token and other values to the AppInterface. |
4. Initialize and save on exit | Start the user control, and let users save their changes when the application closes. |
5. Implement the AppInterface | Connect the user control to your model. |
6. Copy the redistributable files and run | Build and test your application. |
7. Add the installation path to the registry | Allow BIMcollab update installers to find the Connector files. |
Prepare your project
Open the properties of your project.
Go to Build > General and clear the Prefer 32-bit checkbox.
Add the AppInterface project to your solution. You can find it in the Source folder of the package (
AppInterface.csproj).In your project, add a reference to the AppInterface project: References > Add Reference > Projects > Solution > AppInterface.
Build the solution.
Add the user control to a form
Open the form where you want to show the BCF Manager in the form designer.
Add the user control to the toolbox:
Drag the control from the toolbox (General > DlgMain) to your form.
💡 Tip: If the form designer can't find the AppInterface DLL, restart Visual Studio.
Set your vendor-specific values
When you receive your app token, you also receive a document from BIMcollab with values for your application. Add these values to App_Interface.cs:
Value | What it does |
| Your app token. It identifies your application in BIMcollab. |
| A unique prefix. The user control uses it to store the settings of your application in the Windows registry. |
| Identifies your application as the client that created an issue. |
Example:
public static string developersToken = "<your-app-token>";
public static string developersRegValPrefix = "<your-registry-prefix>";
public static string developersClientID = "<your-client-id>";
During development, use the generic developer token as developersToken. It only connects to the Playground.
Initialize and save on exit
Initialize the user control
Call the control's Initialize() method to make the user control ready for use. Until you call it, all controls in the user control are disabled.
Save on exit
When your application closes, call the control's SaveOnExit() method. It gives users the chance to save any changes they made in the user control.
If users can cancel the closing of your application, call SaveOnExit with showCancelButton = true. This adds a Cancel button to the message.
Example:
// After the form with the user control is loaded
bcfManagerControl.Initialize();
// When the application closes
bcfManagerControl.SaveOnExit(showCancelButton: true);
Implement the AppInterface
The AppInterface contains properties, which show or hide features in the user control, and methods, which the user control calls to work with your application. Implement most methods to fully integrate the Connector.
Properties: show or hide features
Property | Set to |
| Works with (IFC) models: it can get and set the camera position, change component visibility, and create snapshots. |
| Supports bounding boxes (also called clipping planes or section planes). Shows a button to create a bounding box around the visible part of the model. See |
| Can create several issues at once, for example from clash detection, saved viewpoints, or test results. Shows an Import Issues button. Set the button text with |
| Should show a button that switches the user control between its normal and a minimal layout. |
| Adds visible components to viewpoints. Adds the Visible option to Components in viewpoint in the Add Issue dialog. |
| Adds selected components to viewpoints. Adds the Selected option to Components in viewpoint in the Add Issue dialog. |
| Works with selected components. Enables the Save selection as… option in the Add Issue dialog. |
Methods: information about your application
Method | What it must do |
| Return the name of your application. The user control uses it in messages. |
| Return the handle (HWND) of your application's main window. |
| Return your app token. |
| Return your registry prefix. |
| Return the full path to the folder that contains the |
Methods: views and snapshots
Method | What it must do |
| Save a snapshot of the current view as |
| Return whether the current view can be used for a viewpoint. Set |
| Fill the viewpoint with the information of the current 2D view. |
| Fill the viewpoint with the information of the current 3D view. Return |
| Recreate a 2D view from the viewpoint. |
| Recreate a 3D view from the viewpoint. When |
💡 Tip: For details about viewpoints, cameras, components, and settings, see Working with viewpoints, components and clipping planes in the SDK Connector.
Methods: components
Method | What it must do |
| Add the components of the viewpoint to a cache, to avoid requesting the same component data from your application again. You decide what to cache. Leave it empty if you don't need a cache. |
| Select the component with this IFC GUID in your application. Called when a user selects a component in the Viewpoint info dialog. |
| Return the IFC type of the component with this IFC GUID. Called when a user clicks Check components in the Viewpoint info dialog. |
Methods: optional features
Method | What it must do |
| Create a bounding box around the visible components in the current 3D view. Called when a user clicks Create section box. Needs |
| Create a list of issues to import, for example from a clash check. Called when a user clicks Import Issues. Needs |
Helper functions you can call
The user control also gives you helper functions. Don't change the Set…Delegate() methods in the AppInterface: the user control uses them to connect these functions.
Helper function | What it does |
| Adds a message that explains why your application couldn't fully recreate a view. Call it once per message. |
| Shows the message icon in the user control. Users click it to read the messages. |
| Sends a list of issues to the user control, for example from |
| Returns the values used in the connected BIMcollab project: statuses, types, priorities, labels, assigned users, areas, milestones, visibilities, and custom select fields. Use these values when you create issues. |
| Returns which fields are mandatory in the connected project. |
| Returns which fields are available in the connected project. Availability depends on the BIMcollab subscription. |
Copy the redistributable files and run
Copy all files from the Redistributable folder to the output folder of your project.
Build and run your application.
Sign in with your Playground account, and check that the BCF Manager shows the issues of your Playground project.
Add the installation path to the registry
Your installer must create a registry entry with the full installation path of the Connector files. BIMcollab update installers use it to find and update the files. You find the registry key in the document with your vendor-specific values.
Use the Connector in a modeless dialog
If you show the user control in a modeless dialog, run the dialog in a thread with the single-threaded apartment (STA) state. Otherwise, the user control can't use standard Windows dialogs such as Open, Save, and Select.
Example:
private void button1_Click(object sender, EventArgs e)
{
Thread modelessThread = new Thread(StartBCFManager);
modelessThread.IsBackground = true;
modelessThread.SetApartmentState(ApartmentState.STA);
modelessThread.Start(this);
}
private static void StartBCFManager(object here)
{
Form2 form2 = new Form2();
form2.ShowDialog();
}
Troubleshooting
Problem | Possible cause | Solution |
All controls in the BCF Manager are disabled. |
| Call |
The control isn't available in the toolbox, or the designer shows an error. | Visual Studio didn't load the AppInterface DLL. | Build the solution and restart Visual Studio. |
The application fails when the control loads. | Redistributable files are missing from the output folder, or they are still blocked. | Copy all redistributable files, and unblock them. |
Open or Save dialogs don't work in a modeless dialog. | The thread doesn't use the STA state. | Set the apartment state to STA. See Use the Connector in a modeless dialog. |
Users lose changes when the application closes. |
| Call |





