Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

C# plugin example

razvanpopov
Participant

C# plugin example

razvanpopov
Participant
Participant

Hi guys,

I'm a C# developer who likes to play with Fusion 360 as a hobby. One of the things that I find that could be better in Fusion is the parameters management.

So I thought I'd try and see if I can create a plugin to add advanced management for the parameters. I looked up possibilities for creating such plugin in C#, and it appears that there is some SDK for .NET.

The problem it that I have not found any example for how to tell Fusion 360 to load the plugin.

I do have downloaded on my computer ObjectARX_for_AutoCAD_2020_Win_64_bit, and referenced the core assemblies from there (AcCore.dll, AcDbMgd.dll, AcMgd.dll), and I created a small sample plugin:

namespace Sample
{
        class MyCommand : IExtensionApplication
        {
              [CommandMethod("sample")]
              public void Command()
              {
                    Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
                    ed.WriteMessage("this is a test");
               }

              public void Initialize() { }

              public void Terminate() { }
         }
}

I just wanted to see my "sample" command appearing in the "Design Shortcuts" list.

I have failed miserably to determine what do I need to do after the DLL compiles successfully. I did saw a number of examples but they seem to be for AutoCAD, and the paths do not match. Trying to guess the path lead me nowhere.

So my question for you guys is:

   Can someone tell me how to setup a C# plugin for Fusion 360?

0 Likes
Reply
2,461 Views
3 Replies
Replies (3)

BrianEkins
Mentor
Mentor

I don't know what you found that led you to believe there was a .NET compatible API, but currently Fusion 360 only supports write scripts and add-ins using C++ and Python.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes

razvanpopov
Participant
Participant

First, thank you for the super quick response (at first I thought the notification was about my message getting posted, not actually getting a response :-)).

I saw some examples for AutoCAD, and I saw this (https://modthemachine.typepad.com/my_weblog/2016/02/fusion-add-in-with-net-c-clr.html), talking about .NET example.

So I was more hoping than assuming that it is possible to write addins with C#.

 

I guess I'll file all my ideas  under maybe when I retire or never... and move on.

0 Likes

BrianEkins
Mentor
Mentor

I hadn't see that blot post before but it's not using C# but is instead demonstrating some capabilities of C++.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes