New Member
Posts: 1
Registered: ‎03-21-2006
Message 1 of 2 (122 Views)

How to do an "Add In" in .Net for Autocad

122 Views, 1 Replies
03-21-2006 11:05 AM
I made an Add In in .Net, and the program that start with the Add In is Autocad. But I can´t connect.
In the class Connect.vb i put a break point in Public Sub OnConnection, but the compiler never pass for that. I know that some keys in the Windows Registry are necessary. Please Help..!!!!!!

Active Contributor
Posts: 32
Registered: ‎10-07-2004
Message 2 of 2 (122 Views)

Re: How to do an "Add In" in .Net for Autocad

04-19-2006 03:56 AM in reply to: coberto
You are right, you must load the assembly in AutoCAD.
To do this, you can write netload in autoCAD commandline and then select the dll that represents your addin.

Another option is to write something in the registry. Should be like this:

DESCRIPTION: REG_SZ: User Friendly App Name
LOADER: REG_SZ: pathFileName

For AutoCAD 2006:
releaseNum = R16.2
ACAD-ProductID:LocaleID = ACAD-4003:409

0x01 - Load the application upon detection of proxy object.
0x02 - Load the application upon AutoCAD startup.
0x04 - Load the application upon invocation of a command.
0x08 - Load the application upon request by the user or another application.
0x10 - Do not load the application.
0x20 - Load the application transparently

Usually it is 0x02, but depends on what you need

pathFileName = must include the full path and file name of the module that AutoCAD should load first. The loader module is subsequently responsible for loading any other modules that make up the application.

For example, my addin writes this in the registry (I am giving you the code in C#):

string acadAddinKey = @"Software\Autodesk\AutoCAD\R16.2\ACAD-4003:409\Applications\MPMAcad2006PluginApplication";
RegistryKey addinKey = Registry.LocalMachine.CreateSubKey(acadAddinKey);
addinKey.SetValue("DESCRIPTION", "Matrix MPM AutoCAD Plugin");
addinKey.SetValue("LOADER", "D:\\Program Files\\Autodesk\\MDT 2006\\MM\\MM.Acad2006Plugin.Core.dll");
addinKey.SetValue("LOADCTRLS", 2);
addinKey.SetValue("MANAGED", 1);

I hope this helped you. I suggest you use the ObjectARXDocumentation.

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community