Altium Designer SDK Quick Start Guide

The Altium Designer SDK lets you build custom extensions that integrate directly into Altium Designer – adding commands, automating workflows, and accessing design data through a managed .NET API.

This guide walks you through installing the development tools, creating an extension project, adding a command, and running it inside Altium Designer.

Prerequisites

Step 1: Install the Altium Developer Extension

The Altium Developer extension adds project templates and SDK tooling directly into Altium Designer.

  1. In Altium Designer, go to Extensions and Updates → Available.

  2. In the Software Extensions section, search for Altium Developer.

  3. Install the extension, then restart Altium Designer when prompted.

Step 2: Create a New Extension Project

  1. In Altium Designer, go to File → New → Other → Extension.

    • Extension ID: ShowNetsExtension

    • Extension Kind: Altium Designer Server

    • Development Language: C#

    • IDE Version: latest

    • SDK Versionlatest

  2. Once the extension is created, Altium Designer displays its details. Note the Source Location — open the .csproj file from that path in your IDE.

Step 3: Add Your First Command

Open Source Code\Commands.cs and add the following methods to the Commands class:

    /// <summary>
    /// Determines the enabled/visible state for the "Show Nets" command in Altium Designer.
    /// </summary>
    /// <param name="argContext">The current server document view context.</param>
    /// <param name="argParameters">Command parameters (unused).</param>
    /// <param name="argEnabled">Set to true if the command should be enabled.</param>
    /// <param name="argChecked">Set to true if the command should appear checked (unused).</param>
    /// <param name="argVisible">Set to true if the command should be visible (unused).</param>
    /// <param name="argCaption">Command caption (unused).</param>
    /// <param name="argImageFile">Command image file (unused).</param>
    public static void GetState_ShowNets(IServerDocumentView argContext, ref string argParameters, ref bool argEnabled,
        ref bool argChecked, ref bool argVisible, ref string argCaption, ref string argImageFile)
    {
        // Retrieve the currently focused project from Altium Designer's workspace.
        var project = DXP.GlobalVars.DXPWorkSpace.DM_FocusedProject() as IProject;

        // If the project needs to be compiled (e.g., netlist out of date), compile it.
        if (project?.DM_NeedsCompile() == true)
            project.DM_Compile();

        // Enable the command only if a valid project is focused and it's not the "Free Documents" project.
        argEnabled = project != null && !IsFreeDocumentsProject(project);
    }

    /// <summary>
    /// Command handler to display all net names in the current schematic document or project.
    /// </summary>
    /// <param name="view">The current server document view.</param>
    /// <param name="parameters">Command parameters (unused).</param>
    public static void Command_ShowNets(IServerDocumentView view, ref string parameters)
    {
        // Get the currently focused project from Altium Designer.
        var project = DXP.GlobalVars.DXPWorkSpace.DM_FocusedProject() as IProject;
        if (project == null || IsFreeDocumentsProject(project))
            return;

        string documentName;
        // Get the currently focused document (e.g., schematic sheet).
        var document = DXP.GlobalVars.DXPWorkSpace.DM_FocusedDocument() as IDocument;
        if (document == null)
        {
            // If no document is focused, ensure the project is compiled and use the flattened project document.
            if (project.DM_NeedsCompile()) project.DM_Compile();
            document = project.DM_DocumentFlattened();
            documentName = "Project";
        }
        else
        {
            // Only proceed if the focused document is a schematic (DocKindSch).
            if (document.DM_DocumentKind() != EDPConstant.DocKindSch) return;
            documentName = document.DM_FileName();
        }

        // Enumerate all nets in the document, retrieve their full names, and sort them alphabetically.
        var netNames = Enumerable.Range(0, document.DM_NetCount())
            .Select(document.DM_Nets)
            .Select(net => net.DM_FullNetName())
            .OrderBy(name => name);

        // Display the list of net names in an information dialog within Altium Designer.
        DXP.Utils.ShowInfo(string.Join(Environment.NewLine, netNames), $"Nets [{documentName}]");
    }

    /// <summary>
    /// Checks if the given project is the special "Free Documents" project in Altium Designer.
    /// </summary>
    /// <param name="project">The project to check.</param>
    /// <returns>True if the project is the Free Documents project; otherwise, false.</returns>
    private static bool IsFreeDocumentsProject(IProject project)
    {
        return project == DXP.GlobalVars.DXPWorkSpace.DM_FreeDocumentsProject();
    }

Open Source Code\Main.cs and register the command in the PluginServerModule class:

protected override void InitializeCommands()
{
    ((CommandLauncher)CommandLauncher).RegisterCommand("ShowNets", Commands.Command_ShowNets, Commands.GetState_ShowNets);
}

Build the project to install the extension.

Step 4: Run Your Command in Altium Designer

  1. Start Altium Designer.

  2. Right-click any toolbar and select Customize…

  3. Under Commands, click New… and configure the following:

    • Process: ShowNetsExtension:ShowNets

    • Caption: ShowNets

  4. Drag the new command onto a toolbar.

  5. Click the command – a dialog with list of nets should appear.

Next Steps

  • Browse the Altium Designer SDK documentation for interfaces covering schematics, PCB layout, components, and more.

  • Explore example extensions and demos in the AltiumDeveloper GitHub organization.

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Content