Inventor 2009 .NET API Wizard Vista x64

Inventor 2009 .NET API Wizard Vista x64

rhesusminus
Mentor Mentor
750 Views
7 Replies
Message 1 of 8

Inventor 2009 .NET API Wizard Vista x64

rhesusminus
Mentor
Mentor
Hi.

I'm running VS VB.NET 2005, and today I installed the wizards til VS.NET.
I'm also running Vista Ultimate x64.
The wizard appeared like it's supposed to in the "new project" dialog in
VS.NET.

However.. When building and running Inventor, the newly created add-in
didn't appear.

Had to do this to fix it:

1. The wizard used the wrong GUID in the registry. Had to change it to
"{E357129A-DB40-11D2-B783-0060B0F159EF}" in the code.
2. It now wrote to HKCR\Wow6432Node\CLSID etc... But,.. I had to manually
register it to HKCR\CLSID before it showed up in Inventor.

Can anyone shed some light on this? Do I have to do this? Can I change the
template so that the GUID is correct?

THL

Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
751 Views
7 Replies
Replies (7)
Message 2 of 8

rhesusminus
Mentor
Mentor
Hm... Experimented a little more.

Did'nt have to change the GUID (Wich was
{39AD2B5C-7A29-11D6-8E0A-0010B541CAA8} by default) Just saw that it differed
from the API helpfile.
I must however register it manually in the registry.

THL

"RhesusMinus" wrote in message news:5917808@discussion.autodesk.com...
> Hi.
>
> I'm running VS VB.NET 2005, and today I installed the wizards til VS.NET.
> I'm also running Vista Ultimate x64.
> The wizard appeared like it's supposed to in the "new project" dialog in
> VS.NET.
>
> However.. When building and running Inventor, the newly created add-in
> didn't appear.
>
> Had to do this to fix it:
>
> 1. The wizard used the wrong GUID in the registry. Had to change it to
> "{E357129A-DB40-11D2-B783-0060B0F159EF}" in the code.
> 2. It now wrote to HKCR\Wow6432Node\CLSID etc... But,.. I had to
> manually
> register it to HKCR\CLSID before it showed up in Inventor.
>
> Can anyone shed some light on this? Do I have to do this? Can I change the
> template so that the GUID is correct?
>
> THL

Trond Hasse Lie
EPLAN Expert and ex-AutoCAD Electrical user.
Ctrl Alt El
Please select "Accept Solution" if this post answers your question. 'Likes' won't hurt either. 😉
0 Likes
Message 3 of 8

Anonymous
Not applicable
Would be REAL nice if we could get a "whitepaper" or tutorial
(and wizards) from AutoDesk now on properly supporting 32 AND
64 bit addins, which covered ALL aspects of the needed details,
such as registration, compilation targets, is MSIL bit independant,
using 3rd party dll's (must they be 64bit, what about MSIL?).

Bob S.

RhesusMinus wrote:
> Hm... Experimented a little more.
>
> Did'nt have to change the GUID (Wich was
> {39AD2B5C-7A29-11D6-8E0A-0010B541CAA8} by default) Just saw that it differed
> from the API helpfile.
> I must however register it manually in the registry.
>
0 Likes
Message 4 of 8

Anonymous
Not applicable
I agree that it would be real nice. The 64 bit world is a new environment
we've all been thrown into and we're all trying to figure out what the new
issues and solutions are. So it's not that we've got all of the answers and
are just keeping them to ourselves. When any of you find out things
interesting related to working in a 64 bit environment please feel free to
post it here for everyone to see what you've learned.
--
Brian Ekins
Autodesk Inventor API
0 Likes
Message 5 of 8

Anonymous
Not applicable
I reevaluated what I have been doing by removing all of my registry entries manually, and then running the process I noted above. It does not show up in inventor's addin manager. So an earlier try using a program to generate the registry entries must have gotten that far, but it's kind of a black box that I am slowly learning what it is doing. does anyone have a manual command entry list that will get this dll registered?

again as a side note I am using vb2008 express, i believe it will compile "ANY CPU" on default. So the dll I have created should be compatible with 64bit....

Kurt
0 Likes
Message 6 of 8

Anonymous
Not applicable
I think you're making it harder than you need to. I assume you used the
wizard to create the add-in. If so, all of the registration that needs to
happen is already defined by your add-in. Some of it will happen
automatically because your dll is a COM component and some more will happen
because of the Register and Unregister functions in your add-in. To get
this registration to happen you just need to call regasm with the /codebase
argument. On 64 bit machine there are two areas in the registry where this
infomration can be written, one for 32 bit and one for 64 bit. Where the
registration will depends on which regasm you call. If you call the one in

C:\WINDOWS\Microsoft.NET\Framework

it will create the registry entries in the 32 bit portion of the registry
(Wow6432Node). If you call the one in

C:\WINDOWS\Microsoft.NET\Framework64 it will go in the standard area, which
is for 64 bit on a 64 bit OS.

Here is the content of a .bat file I have that works to install an add-in on
a 64 bit machine.

@echo off
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase
Facet_Enabler.dll
PAUSE

This should work for you to just by modifying the name of the dll. Here's
the contents from a corresponding .bat file to unregister the add-in.

@echo off
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /unregister
Facet_Enabler.dll
PAUSE

--
Brian Ekins
Autodesk Inventor API
0 Likes
Message 7 of 8

Anonymous
Not applicable
no i didn't use the wizard to create the addin, I used an inventor ~2008 example file and modified it. Then with this 64bit change I migrated the project to visual basic express 2008 and rebuilt it. I here people talking about the api wizard, but fail to see where to start it...

but in summary I have been doing the
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase c:\EventWatcher.dll

so is it likely that I have something wrong with the dll itself?
Kurt
0 Likes
Message 8 of 8

Anonymous
Not applicable
I just looked at the simple add-in example in the SDK and it was created
using the add-in wizard. I compiled it on my 32 bit machine and created two
.bat files. The first installs it:

@echo off
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase
SimpleAddIn.dll
PAUSE

and this one uninstalls it:

@echo off
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /unregister
SimpleAddIn.dll
PAUSE

I copied the SimpleAddIn.dll and the .bat files to my 64 bit computer and
ran the installer .bat, started Inventor, and the Add-In was available. I'm
not sure what's different on your side.
--
Brian Ekins
Autodesk Inventor API


wrote in message news:5991336@discussion.autodesk.com...
no i didn't use the wizard to create the addin, I used an inventor ~2008
example file and modified it. Then with this 64bit change I migrated the
project to visual basic express 2008 and rebuilt it. I here people talking
about the api wizard, but fail to see where to start it...

but in summary I have been doing the
C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\RegAsm.exe /codebase
c:\EventWatcher.dll

so is it likely that I have something wrong with the dll itself?
Kurt
0 Likes