Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.


@eric.frissell26WKQ wrote:

My question is when starting a project, what is the difference between ApplicationProject, DocumentProject, UserProject, and when would you use each one?


 

ApplicationProject is the one to use.  DocumentProject embeds the code in the Inventor file.  It is rarely (if ever) used now, since that functionality is mostly replaced by iLogic rules.  There may be special exceptions, but mostly, if you find yourself thinking about using DocumentProject you should probably be writing that code in iLogic instead of VBA.

 

Are we just supposed to create new modules under ApplicationProject and each module is designed to be treated as a separate macro rather than each macro having it's own file?

 

Correct, which actually greatly simplifies the answer to your last question.

 


Secondly I write a lot of code that gets shared amongst the users.  At the minute I haven't seen a good way of sharing VBA.  The process in SW was simply save the .swb to the vault and then it's immediately visible to all users and can be attached to the ribbon as a button.  Is there a way to do something similar with Inventor to easily share macros amongst users?


 

Since all the modules are stored in a single .ivb file, it is very easy to distribute your macros to other users.  Just give them a copy of the .ivb file (along with the image files for custom icons, if you make any), and change their Application Options to reference your file instead of the default one.  There is no need to save out individual macros to share them.