• CAMAPI
  • API Documentation
Show / Hide Table of Contents
  • Supported programming languages
    • C#
    • Delphi
    • C++
  • Tutorial lessons
    • Lesson 1 - general introduction to the extension ideology using the example of a C# project
    • Lesson 2 - connecting the SDK to a Delphi project using the build system
    • Lesson 3 - connecting the SDK to a C++ project using the build system
    • Lesson 4 - demonstration of methods for unloading an extension during main application is running
    • Lesson 5 - Creating a custom operation
    • Lesson 6 - Creating a C# application to interact with geometry in main application
    • Lesson 7 - Creating a C# application to connect to main application for managing it
    • Lesson 8 - Creating a C# extension to integrate with a PLM system
  • System extensions
    • Extension.Util.Common.Dll
    • Extension.Util.Common.Exe
  • Debugging of extensions
    • Debugging a .NET extension using Visual Studio Code
    • Debugging a Delphi extension using RAD Studio
    • Debugging a C++ extension using Visual Studio
  • Entry points
    • Utilitiy in main form
    • Executor for utility in main form
    • New item to the operation's context menu
  • Machining Tools Import
    • Preparing the environment
    • Working with the tool library
    • Working with cutting tools
      • Milling Tools
      • Turning Tools
      • Custom Axial Shaped Tools
    • Working with the tool holder
  • API Documentation
  • External applications
    • Connecting in a C# application
    • Connecting in a Delphi application
    • Connecting in a C++ application

Creating a C# extension to integrate with a PLM system

Objectives

  • Understand the basic structure of a PLM integration extension;
  • Create an extention in C# or modify an existing example to integrate with a PLM system.

Practical part

To create an extension, you need to:

  • Install the latest version of the NuGet package that provides the base interfaces:
    • EncySoftware.CAMAPI.SDK.
  • Implement two interfaces:
    • IExtension – is a common interface for extensions so the CAM application can load your extension. It includes a single property IExtensionInfo Info which contains basic metadata;
    • IExtensionPLM – provides methods for integration with the PLM system (e.g., connect, send data, fetch data).
  • Start with the required methods:
    • GetParameters – returns an IPLMParameters object. The CAM application uses it to display extension settings to the user;
    • Connect – receives parameter values and can establish a connection with the PLM system;
    • Disconnect – closes the connection and clears any internal state if needed.
  • Then, implement the core item-related methods:
    • Retrieving items:
      • GetChilds – retrieves child items for a given parent ID. If no parent ID is provided, it returns items from the root level;
      • FindItems – searches items by name;
      • GetItem – loads a specific item by ID;
      • GetLinkedItem – returns a related item;
      • GetItemData – loads detailed data for a selected item.
    • Working with items:
      • DownloadItems – downloads selected items (except projects);
      • UploadItem – uploads regular items (except projects);
      • DownloadProject / UploadProject – for project-specific operations.
  • Implement lifecycle methods:
    • Install and Uninstall – methods called when the extension is registered or removed. They can be left empty if you don’t need setup or cleanup logic.
  • These boolean properties let the CAM application know which functions your extension supports: SupportProjectLoad, SupportMachineLoad, SupportPostprocessorLoad, SupportPostprocessorInsideMachineLoad, SupportToolLoad, SupportToolSave, SupportDomainAuth. If a property returns false, related functionality will be disabled in the app UI.

You can find the full method list and descriptions here.

You can clone the example project and either use it as-is or modify it to create your own extension:

  • Open the repository in our GitHub account that contains the example extensions and clone it.
  • Within the repository, find the folder that contains the PLM integration example - this is what you will base your new extension on.
  • Open the project PLMExtension/PLMExtensionNet/project/main/PLMExtensionNet.csproj in your preferred IDE or code editor.
  • Pay attention to:
    • PLMExtension/PLMExtensionNet/.stbuild/build/stbuild.csproj - the version of the build system is specified in this file. Over time, you might need to update it to access new features of the build system;
    • the version of the NuGet package EncySoftware.CAMAPI.SDK.
  • Modify the example for your PLM system. The example already includes a basic working implementation of both interfaces and uses directories to simulate operations of PLM system;

Once your extension is ready:

  • Build the solution;
  • Run ENCY separately;
  • Setup the extension in ENCY and set configuration for PLM connection, further information is available here;
  • Ensure that all functions of the extension operate correctly within ENCY.
In this article
Back to top Generated by DocFX