new 2005 wizards

new 2005 wizards

Anonymous
Not applicable
452 Views
8 Replies
Message 1 of 9

new 2005 wizards

Anonymous
Not applicable
I just compiled a vb.net addin using the new wizards kindly provided by
Venkatesh but Inventor is oblivious to it.
The addin really does nothing at this point but put up a msgbox at
startup. I looked through the registry and it appears to have all the
settings it needs as compared to my "hacked" addins. Its not listed at
all in IV's addin manager.
What could prevent IV from seeing a new addin?

On a related note, how do you go about debugging a .net addin?
it obviously different than an old VB6 type thing. If I hit the debug
button in VS, it starts IV but never goes into the addin code (of course
this is probably due to the fact that IV doesnt see the addin anyway).
So do you just set some breakpoints and hit debug?
Thanks
Perry
0 Likes
453 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
This is probably because the .NET framework of the Visual Studio version you
are using is different from the .NET framework that Inventor is using. I'm
guessing you are using Inventor 11 and Visual Studio 2005. The .NET
frameworks used by them are different, hence the problem.

Inventor 11 supports .NET framework v1.1.4322.
Visual Studio 2003 uses NET framework v1.1.4322 (so you should not have any
problems when using Visual Studio 2003).

But, if you try using Visual Studio 2005 with Inventor 11, you will have the
problem because Visual Studio 2005 uses v2.0.50727.

Similarly, Inventor 2008 supports v2.0.50727 (which means you can use Visual
Studio 2005 without problems).

The .NET framework version used by Inventor 11 is specified in the "Inventor
11\Bin\Inventor.exe.config" file which you can view using Notepad. The last
few lines indicate which version of the .NET framework is supported:




You can modify this config file to add the .NET framework that you want to
use, but please note that this is not supported and you would have to do it
at your own risk. For example, if you want to use Visual Studio 2005, you
have to specify that .NET framework v2.0.50727 needs to be used, and you can
add a line in the config file like to specify this:





-Venkatesh Thiyagarajan.

"perry" wrote in message
news:5525188@discussion.autodesk.com...
I just compiled a vb.net addin using the new wizards kindly provided by
Venkatesh but Inventor is oblivious to it.
The addin really does nothing at this point but put up a msgbox at
startup. I looked through the registry and it appears to have all the
settings it needs as compared to my "hacked" addins. Its not listed at
all in IV's addin manager.
What could prevent IV from seeing a new addin?

On a related note, how do you go about debugging a .net addin?
it obviously different than an old VB6 type thing. If I hit the debug
button in VS, it starts IV but never goes into the addin code (of course
this is probably due to the fact that IV doesnt see the addin anyway).
So do you just set some breakpoints and hit debug?
Thanks
Perry
0 Likes
Message 3 of 9

Anonymous
Not applicable
Thanks Venkatesh, but I did that trick long ago.
Thats how I was able to compile/run other (read "hacks")
.net addins under VS2005.
Perry
0 Likes
Message 4 of 9

Anonymous
Not applicable
Ok, can you check the "SupportedSoftwareVersionGreaterThan" value? This is
in the "Register" function under the "COM Registration" region of the
StandardAddInServer.vb file. If you want to use the AddIn with Inventor 11,
the "SupportedSoftwareVersionGreaterThan" value should be "10..''.

"perry" wrote in message
news:5525220@discussion.autodesk.com...
Thanks Venkatesh, but I did that trick long ago.
Thats how I was able to compile/run other (read "hacks")
.net addins under VS2005.
Perry
0 Likes
Message 5 of 9

Anonymous
Not applicable
Venkatesh Thiyagarajan (Autodesk) wrote:
> Ok, can you check the "SupportedSoftwareVersionGreaterThan" value? This is
> in the "Register" function under the "COM Registration" region of the
> StandardAddInServer.vb file. If you want to use the AddIn with Inventor 11,
> the "SupportedSoftwareVersionGreaterThan" value should be "10..''.

The first thing I did was check my registry settings, figured the
problem was there. Everything looked "normal", just like the settings I
had prior to the new wizard. But my conscience told me : Perry, you
better take a closer look at those reg settings : so I did. At a glance
I saw the "11" right where it was supposed to be, or so I thought.
Previously the version number was associated with the key "versions
equal to", but now it was in the key "versions greater than".
BINGO! I could either put it back in the other key or change it to "10"
as you suggested. Everything is working fine now. I hate those little
"gotchas" that can be so easy to overlook but have such a big impact.

Thanks again Venkatesh
Perry
0 Likes
Message 6 of 9

Anonymous
Not applicable
On a related note; when using "regasm" is it necessary to use the
/codebase switch? i.e. have a strongly named assembly?

Is there any reason for adding an addin to the GAC?

Perry
0 Likes
Message 7 of 9

Anonymous
Not applicable
No, adding the addin to the GAC is not needed because the addin in most
cases is only going to be loaded only into Inventor and unlikely to be
shared by other applications. Assemblies are usually installed into the GAC
if they are going to be shared by several applications. For COM Interop
(which is how addins written in .NET languages work with Inventor) to work,
addins need not have to be installed into the GAC.

Yes, you have to use the /codebase switch when using regasm because the
addin is not in the GAC. So, the codebase attribute will be used to find the
path of the addin assembly. For using this, the assembly need not have a
strong name, I think the strong name is something independent of this.
Strong names make sense when installing assemblies into the GAC to avoid
collisions with other assemblies, but if you are not installing the addin
into the GAC, the strong name might not be needed.

(also, when un- registering you can do: "regasm /u /tlb assemblyname.dll"
(the /tlb option removes the typelibrary registry entry)).

-Venkatesh.

"perry" wrote in message
news:5525933@discussion.autodesk.com...
On a related note; when using "regasm" is it necessary to use the
/codebase switch? i.e. have a strongly named assembly?

Is there any reason for adding an addin to the GAC?

Perry
0 Likes
Message 8 of 9

Anonymous
Not applicable
Thanks for clearing that up Venkatesh.
Perry
0 Likes
Message 9 of 9

Anonymous
Not applicable
Perry,
One way to debug an Add-in is to create a tester application to be used. You can write a shared class that is used by both the registered add-in and a "tester" application that basically gets the current instance of inventor already opened. Depending on what you are trying to do with your add-in you can at least trigger code in the shared module and debug it quickly.
Regards,
Jim
0 Likes