C# AddIn Registration

C# AddIn Registration

Anonymous
Not applicable
427 Views
1 Reply
Message 1 of 2

C# AddIn Registration

Anonymous
Not applicable
Right now I'm struggling to write an AddIn that will load. I have written a few very simple addins in C# based on the SDK samples. I basically removed all functionality and left the ApplicationAddInServer concrete class intact, only to display a message box in Activate().

For some reason, the AddIns will not load. My suspicion is that I've done something wrong with the registration. I changed the GUID for my assembly and also for my concrete ApplicationAddInServer implementation. I selected the option to make the assembly COM-visible and built the assembly. I also tried using regasm to register the assembly, but it made no difference.

So I'm wondering - I'm just going through the registration motions without a real concept of what is actually being accomplished. Could someone explain to me, in plain English, exactly what Inventor requires of an AddIn (wrt registration specifically).

Another anomaly that I've seen in my attempts to make an AddIn functional is that I create my .dll, register it, and open up Inventor. My AddIn will show up in the list of AddIns, but it simply will not load. I can check and uncheck the boxes all day, but I have not once seen my message box display (the one I am showing in ApplicationAddInServer.Activate()). This indicates to me that the AddIn is not actually being loaded, and not calling the Activate() method.

This brings up my final question, which regards Interop.Inventor.dll. Every time I build my project, it also updates that .dll in my project folder. Could that be the reason why the AddIn will not load in Inventor (while showing up on the list of AddIns)? If so, how can I access the Inventor object library without including that .dll in the build? Or what is another workaround?

Thanks in advance for helping me out. I'm sure I'll appreciate it.

-Tobe
0 Likes
428 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Did you use /codebase argument when using registering the assembly using
regasm.exe? (i.e. regasm /codebase "assembly.dll"). This is required unless
your assembly is put in the GAC, otherwise the assembly will not be found by
Inventor.

The registry settings needed are described in the "Programming Help ->
Overviews -> Creating Inventor Add-Ins ->Add-In Registration" section. The
same registry settings are required for an addin created using a .net
language. You can check in the registry to see if these settings have been
added after registering using regasm.exe. To me it seems like your addin is
not being found or some error in the addin activate code that is preventing
the addin from being loaded.

Maybe if you can post your addin sample, it will be easier to figure out the
problem.

The Interop.Inventor.dll is required for the addin to work and I don't think
that is the source of your problem.

-Venkatesh.

wrote in message news:5742800@discussion.autodesk.com...
Right now I'm struggling to write an AddIn that will load. I have written a
few very simple addins in C# based on the SDK samples. I basically removed
all functionality and left the ApplicationAddInServer concrete class intact,
only to display a message box in Activate().

For some reason, the AddIns will not load. My suspicion is that I've done
something wrong with the registration. I changed the GUID for my assembly
and also for my concrete ApplicationAddInServer implementation. I selected
the option to make the assembly COM-visible and built the assembly. I also
tried using regasm to register the assembly, but it made no difference.

So I'm wondering - I'm just going through the registration motions without a
real concept of what is actually being accomplished. Could someone explain
to me, in plain English, exactly what Inventor requires of an AddIn (wrt
registration specifically).

Another anomaly that I've seen in my attempts to make an AddIn functional is
that I create my .dll, register it, and open up Inventor. My AddIn will
show up in the list of AddIns, but it simply will not load. I can check and
uncheck the boxes all day, but I have not once seen my message box display
(the one I am showing in ApplicationAddInServer.Activate()). This indicates
to me that the AddIn is not actually being loaded, and not calling the
Activate() method.

This brings up my final question, which regards Interop.Inventor.dll. Every
time I build my project, it also updates that .dll in my project folder.
Could that be the reason why the AddIn will not load in Inventor (while
showing up on the list of AddIns)? If so, how can I access the Inventor
object library without including that .dll in the build? Or what is another
workaround?

Thanks in advance for helping me out. I'm sure I'll appreciate it.

-Tobe
0 Likes