ricaun.AutoCAD.UI 0.4.1

Prefix Reserved
dotnet add package ricaun.AutoCAD.UI --version 0.4.1
                    
NuGet\Install-Package ricaun.AutoCAD.UI -Version 0.4.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ricaun.AutoCAD.UI" Version="0.4.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ricaun.AutoCAD.UI" Version="0.4.1" />
                    
Directory.Packages.props
<PackageReference Include="ricaun.AutoCAD.UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ricaun.AutoCAD.UI --version 0.4.1
                    
#r "nuget: ricaun.AutoCAD.UI, 0.4.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ricaun.AutoCAD.UI@0.4.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ricaun.AutoCAD.UI&version=0.4.1
                    
Install as a Cake Addin
#tool nuget:?package=ricaun.AutoCAD.UI&version=0.4.1
                    
Install as a Cake Tool

ricaun.AutoCAD.UI

AutoCAD 2019 Visual Studio 2022 Nuke License MIT Build Release

ricaun AutoCAD UI

ricaun.AutoCAD.UI provides a set of UI controls and utilities for AutoCAD .NET applications, built on top of the AutoCAD.NET library. It is designed to simplify the development of ribbon user interfaces in AutoCAD plugins.

Features

ExtensionApplication

The ExtensionApplication class provides a base implementation for AutoCAD .NET applications to start and shutdown, managing the ribbon control lifecycle.

using ricaun.AutoCAD.UI;
using Autodesk.AutoCAD.Runtime;

[assembly: ExtensionApplication(MyExtensionApp)]

public class MyExtensionApp : ExtensionApplication
{
    public override void OnStartup(RibbonControl ribbonControl)
    {
        ribbonControl.CreatePanel("MyPanel");
    }

    public override void OnShutdown(RibbonControl ribbonControl)
    {
        ribbonControl.RemovePanel("MyPanel");
    }
}

RibbonExtension

The RibbonExtension class offers extension methods to create and manage ribbon panels, buttons, and other UI elements in AutoCAD.

using ricaun.AutoCAD.UI;
using Autodesk.AutoCAD.Runtime;

[assembly: ExtensionApplication(MyExtensionApp)]

public class MyExtensionApp : ExtensionApplication
{
    public override void OnStartup(RibbonControl ribbonControl)
    {
        var ribbonPanel = ribbonControl.CreatePanel("MyPanel");

        ribbonPanel.CreateButton("MyButton")
            .SetText("Click Me")
            .SetDescription("This is a button description")
            .SetToolTip("This is a button tooltip")
            .SetImage("Resources/image16-light.png")
            .SetLargeImage("Resources/image32-light.png")
            .SetCommand(() => 
            {
                // Button click logic here
            });
    }

    public override void OnShutdown(RibbonControl ribbonControl)
    {
        ribbonControl.RemovePanel("MyPanel");
    }
}

Ribbon Image - Theme Change Support

The SetImage and SetLargeImage methods automatically handle theme changes based in the key name light and dark in the image file names.

ribbonPanel.CreateButton("MyButton")
    .SetImage("Resources/image16-light.png") // If the theme is dark, it will use "Resources/image16-dark.png" internally
    .SetLargeImage("Resources/image32-light.png"); // If the theme is dark, it will use "Resources/image32-dark.png" internally

When the AutoCAD theme changes, the ribbon button images will automatically update to match the current theme.

Release

License

This project is licensed under the MIT License.


Do you like this project? Please star this project on GitHub!

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.1 161 11/1/2025
0.4.0 159 7/19/2025
0.3.0 185 7/17/2025
0.2.0 138 7/4/2025
0.1.0 189 7/2/2025