Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to create Inventor Add-ins in Visual Studio Express

12 REPLIES 12
Reply
Message 1 of 13
fsdolphin
1357 Views, 12 Replies

Is it possible to create Inventor Add-ins in Visual Studio Express

Hi, 

 

I have been experimenting with iLogic inside Inventor which was not a problem, it is really easy. I also tried creating a plugin following the popular (the only one) My First Inventor Plugin tutorial and it also went fine, the issues I had was creating Add-ins. The first issue was getting the Autodesk Inventor AddIn template to work, the second and the one that is bothering me rightnow is the fact that when I create a new project using the Autodesk Inventor Template I get an error that says... 

 

A project with an output type of class library cannot be started directly. "In order to debug this project, add an executable project to this solution which references the library project.  Set the executable project as the startup project."

 

Description:

Error 1 Cannot register assembly "C:\Users\UserName\Documents\Visual Studio 2013\Projects\myFirstAddin\myFirstAddin\bin\myFirstAddin.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\myFirstAddin.StandardAddInServer' is denied. myFirstAddin

 

After some research I found the following thread which describes the solution but I don't know how to do what it recommends to do.

http://forums.autodesk.com/t5/inventor-customization/error-a-project-with-an-output-type-of-class-li...

 

In further research I was reading the Autodesk Inventor 2013 API Help directly from Inventor 2013 and I found something that got me thinking about the issue I'm having. This statment says that with Visula Basic Express you have limitations and the professional version is recomended for Addin.

 

It's possible to create add-ins using the free Express editions but with some severe limitations. For example, debugging is not possible in Visual Basic Express 2010. Because of this the professional version is recommended. The Express editions are adequate for developing standalone executable and are an excellent choice for getting started with Inventor's API. But for add-in development you should plan on Visual Studio Professional.

 

Is there anyone out there developing Add-in using Visual Studio Express or the above statement is correct and you cannot with the express version?

 

FYI-  I'm using Autodesk Inventor Professional 2013 and Visual Studio Express 2013.

 

Thanks a lot 

 

 

 

12 REPLIES 12
Message 2 of 13
bretrick30
in reply to: fsdolphin

You can create Add-Ins with the Express version, but it is true, you can't debug with it.  

Message 3 of 13
fsdolphin
in reply to: bretrick30

Thanks a lot for the clearification. Do you know what do I need to do to be able to compile?

Message 4 of 13
bretrick30
in reply to: fsdolphin

You should be able to just go to Build > Build Solution.  

 

There is a Readme.txt file in the template that shows where you need to put the files in order for Inventor to recognize the Addin.  Once the files are in that location it will then load when you start Inventor.  

 

I haven't actually used the template that ships with Inventor, I've just looked at it.  I have used a different template I found online that you can download and install with the link below.  It sets more things up, including adding a button to the ribbon.  

 

http://www.spiderinnet2.typepad.com/blog/2012/06/a-wizard-for-inventor-net-addin.html%20

 

 

 

 

Message 5 of 13
fsdolphin
in reply to: bretrick30

Thanks a lot for following alone here. 

 

 

You should be able to just go to Build > Build Solution.  

 

When I build it, I get the following error...

 

Error 1 Cannot register assembly "C:\Users\UserName\Documents\Visual Studio 2013\Projects\MyFirstAddin\MyFirstAddin\bin\MyFirstAddin.dll" - access denied. Please make sure you're running the application as administrator. Access to the registry key 'HKEY_CLASSES_ROOT\MyFirstAddin.StandardAddInServer' is denied. MyFirstAddin

 

 

 

 

I have used a different template I found online that you can download and install with the link below.  It sets more things up, including adding a button to the ribbon.  

 

http://www.spiderinnet2.typepad.com/blog/2012/06/a-wizard-for-inventor-net-addin.html%20

 

I'm probably doing something wrong because I downloaded this template but I don't see any new template in Visual Studio Express.

 

This is what I did...

1- Downloaded the .zip file (InventorNetAddinWizard), opened it and ran the .msi but I didn't notice any difference, no new template nothing.

 

2- Downloaded the .zip file (InventorNetAddinWizard) and placed it in the template folder without unziping it (C:\Users\UseName\Documents\Visual Studio 2013\Templates) and again I didn't noticed any difference.

 

Any idea in any of the above cases?

 

Thanks

Message 6 of 13
bretrick30
in reply to: fsdolphin

I'm not sure about that first error.

 

I forgot I needed to move some files in order to get them to work in 2013, sorry about that.  It installs templates for both vb and c# so there are two sets up files you will need to move.  The link below is a video on what files to move and where.  I thought it would be easier than trying to explain it here.  

 

https://drive.google.com/file/d/0B4HAiI1y8s_ZSFgyOUtoSkZvT0U/view?usp=sharing

 

 

 

 

Message 7 of 13
fsdolphin
in reply to: bretrick30

First of all thanks a lot for taking the time and an actully making a video to try to help.

 

For some reason your folder structure and content is different than what's on my machine. First of all no Microsoft Visual Studio 10.0 folder, no VBProjects folder.  See screen shots for more details.

 

FYI - I uninstall the InventoNetAddinWizard and reinstall it but it didnt make a difference.

 

Thanks a lot  for your help.

 

 

Microsoft Visual Studio 11.0.png

Microsoft Visual Studio 12.0.png

Microsoft Visual Studio 12.0 - VB.png

Message 8 of 13
bretrick30
in reply to: fsdolphin

Can you try looking in the Program Files folder instead of the Program Files (x86)?  The structure of my regular Program Files folder looks a lot like your (x86)...

Message 9 of 13
fsdolphin
in reply to: bretrick30

Well my Program File folder doesn't contain the Microsoft Visual Studio folder. thanks a lot for your help

 

 

 

Program Files.png

Message 10 of 13
bretrick30
in reply to: fsdolphin

You can try one more thing.  Make sure you have installed the thing from the website.  I attached a zip file that contains the files that I moved.  Unzip the folder and place the contents in the proper folders in the Visual Studio 12.0 folder.  See if that works.

 

 

Message 11 of 13
fsdolphin
in reply to: bretrick30

This is what I did that didn't work either.

 

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VB\VBProjects\Inventor Addin

INAWVBProjects.vsdir

InventorNetAddin

InventorNetAddin.vsz

 

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VB\VBProjects

INAWVBProjects.vsdir

InventorNetAddin

InventorNetAddin.vsz

 

I also tried...

C:\Program Files (x86)\Microsoft Visual Studio 11.0\VB\VBProjects\Inventor Addin

INAWVBProjects.vsdir

InventorNetAddin

InventorNetAddin.vsz

 

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VB\VBProjects

INAWVBProjects.vsdir

InventorNetAddin

InventorNetAddin.vsz

 

... but didn't work either.

 

It's ok, thanks a lot for trying and following alone with me.

 

 

Message 12 of 13
Jacques.Grobler
in reply to: fsdolphin

My goodness it has been some time that there was a reply...

I am using VS 2008 and I have found that my Project folder is located under:
C:\Users\jgrobler.APC\Documents\Visual Studio 2008\Projects
Message 13 of 13

Hi Bret

The problem is that when I do a build in VS2008 Express I get the following error by using the template project only:

Error 1 The command "call "%VS90COMNTOOLS%vsvars32"
mt.exe -manifest "C:\Users\jgrobler.APC\AppData\Local\Temporary Projects\InventorAddIn1\InventorAddIn1.X.manifest" -outputresource:"C:\Users\jgrobler.APC\AppData\Local\Temporary Projects\InventorAddIn1\bin\Release\InventorAddIn1.dll";#2" exited with code 9009. InventorAddIn1

Somewhere else I have seen that there is a piece of code missing in the StandardAddInServer.vb that refers to the 'COM' build

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report