How to save VBA and/or VB.NET programs to different locations or projects?

How to save VBA and/or VB.NET programs to different locations or projects?

Anonymous
Not applicable
876 Views
2 Replies
Message 1 of 3

How to save VBA and/or VB.NET programs to different locations or projects?

Anonymous
Not applicable

I'm anticipating writing code for Inventor 2011 Pro and/or Inventor 2012 Pro using either Inventor VBA or VB.NET.  I wish to save programming files under the following circumstances:

 

1) Saving code to a particular Inventor 2011 Pro or Inventor 2012 Pro file so that the code only runs or is associated with the specific file

 

2) Saving code to a particular PROJECT so that all files within that project can use the code

 

3) Saving code to be used by a particular file TYPE such as an .ipt or sheetmetal .ipt or .idw file

 

4) Saving code GLOBALLY, so that all Inventor files regardless of project or location or file type can use the code

 

I've looked through Inventor 2012 Help files, but couldn't find what I was looking for.

 

Any tips, suggestions or errata on this subject would be appreciated!

0 Likes
877 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

I think there are two kind of location that you can choose for your VBA code

1. In the specific file, e.g. ipt, idw, ipn....etc

2. For all files and project, we can set this by choosing Application Option-->File-->Default VBA Project.

 

About VB.NET, you can run it from VB.NET or you can put in into an Add-In in Inventor

0 Likes
Message 3 of 3

Anonymous
Not applicable

You could also use internal and external iLogic which is a subset of VB.NET and the Inventor API.

It can link to VB.NET dlls

 

But there too as the Toan man says you only have two options.

 

In any case you could write your programs such that they detected different Inventor Projects and ran different code base on the Inventor Project.  Seems like an ugly scenario though.

0 Likes