Inventor losing reference to default VBA project

Inventor losing reference to default VBA project

j_steenbergen
Enthusiast Enthusiast
996 Views
2 Replies
Message 1 of 3

Inventor losing reference to default VBA project

j_steenbergen
Enthusiast
Enthusiast

As one of the engineers in my team I created some tools in VBA that are frequently used by my colleagues. The default VBA project of their PC's is set to a specific location on the server, they all use the same VBA poject file.

 

However, sometimes it takes somehow a few seconds for the PC's to get access to the server disks once booted, this resulting in Inventor resetting it's default VBA project file location to the standard location. This is quite frustrating as I have to walk to their office and set it up again. It makes it also look like as if the tools are not reliable (to the average user).

 

As there a solution to this? Can I somehow lock the default VBA project file location?

0 Likes
Accepted solutions (2)
997 Views
2 Replies
Replies (2)
Message 2 of 3

yan.gauthier
Advocate
Advocate
Accepted solution

What we do at my job is we have a batch file doing xcopies from our server location to the standard Inventor location, replacing the Default.IVB. In a SQL database, we compare a hardcoded date value with a value from the database. When we make an update to the VBA project, we update the date value and our main macros calls for this check to force user to close Inventor and then Update their VBA.

 

The batch file is located on the server. User have a shortcut to it on their desktop.

 

this way we can also include the DWG.ini setting file, some .png for icons and other files if required.

Message 3 of 3

JelteDeJong
Mentor
Mentor
Accepted solution

We have the vba-file (and all other setting files for Inventor) in the vault and we get it from there. There for users have it always local.

But if you want to keep the file on the network you could create a external iLogic rule. with the following code.

ThisApplication.FileOptions.DefaultVBAProjectFileFullFilename = "%PUBLICDOCUMENTS%\Autodesk\Inventor %RELEASE%\Macros\Default.ivb"

(change the path to you prefred location) If settings of user are reset then you just ask him to run this rule.

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com