Hello,
I am experiencing this same problem. Everything was working at one point. I am not really sure what I did that caused it to stop working. I think the last thing I did was change the one and only Command Name to something different. I have done everything mentioned in this Message thread. I just started my project, so it doesn't really have much to it. It must be loading the DLL, because access is denied to me when I try to rebuild it. I am just using NETLOAD to load it. I put in code to catch an exception during the class constructor and for the extension class initialize, but no exception is thrown. I am not really doing anything during the initialize. I just ouput a message to the Auto Desk editor. Does anyone have an idea why this is happening? I have tried creating a new project from scratch using the same and/or slightly different name and it still does not work.
Thank you,
Rich
I had the same problem it was I accidently put a command method in a different file in the assembly.
When I say file a mean .vs or .cs file
I copied and pasted a command method similiar to what I needed and modified it and forgot to erase the command Atribute
So when netloaded Autocad only recongnized that one command Attribute and none of the other commands were recognized and the intiaialize and terminate never ran.
I see, so you had 2 different commands with the same name? Are you talking about this attribute?
[CommandMethod("<ACAD_CMD_NAME>", CommandFlags.Session)]
public void AcadCmdNameCommand()
{
I think I figured out why the initialize was not getting hit for my Extended Application form. It is because I added a parameter to the Extension Application Form Constructor and the Class did not have a Constructor that took 0 parameters. I guess it is good to have a Constructor that takes 0 parameters anyways. I am surprised that I didn't get a warning or anything about that during the build. Seems like a dumb mistake on my part (User Error). haha
Thank you,
Rich
If you're implmementing IExtensionApplication on a Form, that's a no-no.
AutoCAD creates the instance of the class, and you don't want it to
create an instance of your form.
You shouldn't implement IExtensionApplication on any class that you
will create instances of manually.