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: 

Add-in

4 REPLIES 4
Reply
Message 1 of 5
melanie2012
1767 Views, 4 Replies

Add-in

I am new to the Visual Basic.Net circuit.  I have worked with VBA in Access and Inventor and Inventor's ilogic in the past.  I have ilogic code that opens .dwgs for all compontents - assemblies, parts, anything that does not have "skel" in the name.  A second piece of code then saves all the parts, prints the .pdfs of the drawings and closes all referenced files.  It workes great, but my manager asked me to create an add-in for this.  So, over the course of the last two weeks I have did multiple tutorials learning to program in VB.Net.  I was went through the plug-in tutorials present on one of the posts.  I successfully got a plug-in to work.

 

My next step was to try to get an add-in working correctly.  I have hit some snags though.  I found the "Inventor Add-in" for VBA and installed it on my computer.  I am using VB 2010 Express, so I had to go through the alternate steps.  After doing a build I have a .dll file, but no Add-in Definition File and no Manifest file either.  How do I get this set up so it will installed corrrectly on the ribbon?  The file types created in the bin folder were XML Document - No Name.  A .dll with the project name, .pdb with the project name and .tlb with the project name.

 

 How to Register/Unregister
 =======================

 1) Build Project;

 2) Copy add-in dll file to one of following locations:
  a) Anywhere, then *.addin file <Assembly> setting should be updated to the full path including the dll name
  b) Inventor <InstallPath>\bin\ folder, then *.addin file <Assembly> setting should be the dll name only: <AddInName>.dll
  c) Inventor <InstallPath>\bin\XX folder, then *.addin file <Assembly> setting shoule be a relative path: XX\<AddInName>.dll

 3) Copy.addin manifest file to one of following locations:
  a) Inventor Version Dependent
  Windows XP:
   C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor 2012\Addins\
  Windows7/Vista:
   C:\ProgramData\Autodesk\Inventor 2012\Addins\

  b) Inventor Version Independent
  Windows XP:
   C:\Documents and Settings\All Users\Application Data\Autodesk\Inventor Addins\
  Windows7/Vista:
   C:\ProgramData\Autodesk\Inventor Addins\

  c) Per User Override
  Windows XP:
   C:\Documents and Settings\<user>\Application Data\Autodesk\Inventor 2012\Addins\
  Windows7/Vista:
   C:\Users\<user>\AppData\Roaming\Autodesk\Inventor 2012\Addins\

 4) Startup Inventor, the AddIn should be loaded

 

 To unregister the AddIn, remove the Autodesk.<AddInName>.Inventor.addin from above mentioned .addin manifest file locations directly.  I would be most grateful if anyone can point me in a good direction.

4 REPLIES 4
Message 2 of 5
wayne.brill
in reply to: melanie2012

Hello,

 

I would try using the Inventor AddIn wizard. It creates the .AddIn file for the project. There are instructions for getting the wizard working for Visual Studio Express in Lesson seven in the "My First Plug-in" training.


http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=17329549

 

(The wizard does not install by default to the express versions).

 

Thanks,

Wayne Brill

Autodesk Developer Network



Wayne Brill
Developer Technical Services
Autodesk Developer Network

Message 3 of 5
melanie2012
in reply to: melanie2012

Thanks for the response Wayne.  I did use the add-in in VB Express 2010.  It showed up as an add-in inventor, but as "Unloaded".  I could not seccussfully get it to load. 

 

That is when I began to do some invesigating on the Internet.  And found some steps that another user did.  The how to "Register/Unregister" Steps.  I described earlier. 

 

After much research, I found a post from another user stating that Express was great for plug-ins, but that the full blown version was required to properly set up an add-in, because you have to imbed the maifest into the .dll  with an after build command and that is not a selection in express.  I even found some code that "said" it could do the imbed mt by running code in the command prompt.  It was a regedit command I think.  It was either the wrong code or that method cannot be employed, as it gave me an error.

 

I appreciate your reply.

Message 4 of 5
jdkriek
in reply to: melanie2012

This should help you

 

http://modthemachine.typepad.com/my_weblog/add-in-creation/

Jonathan D. Kriek
MFG Solutions Engineer
KETIV Technologies, Inc.


Message 5 of 5
YuhanZhang
in reply to: melanie2012

Yes, a manifest will be embeded into the binary for registry-free addin, this needs the mt.exe to do this in the post-events. With VB Express, you may not be able to edit the post-events but it will surely run if the build success, so you should have mt.exe in your machine. You can find a notice about this in the Readme.txt in the \SDK\DeveloperTools\Tools\Wizards\ folder:

 

"If you just use Visual Studio Express(VB/VC# .Net) version to create Inventor addin with this wizard, please make sure that you have the Windows SDK installed, eitherwise you may receive an alert when you compile the addin project."

 

So you can just install Windows SDK to solve this problem.

 

And if you don't install Windows SDK but get the mt.exe from anywhere, you can also manually embed the manifest into the binary with mt.exe.

 

Hope this helps.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

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

Post to forums  

Autodesk Design & Make Report