Hello, thanks for coming on over,

The Autodesk Northern Europe Manufacturing Blog has now moved to a new home. Please come over and join us at.....

This blog will not be updated.

Thursday, 8 October 2009

Visual Basic for Inventor and Performance

I picked this article up from Brian Ekins and found it particularly useful as I have noticed that a lot of customers are using embedded Visual Basic projects in there Inventor documents to automate certain tasks.

Brian Ekins gives advice how you should automate certain tasks so you don’t get performance issues but have maximum flexibility.

The problem is a resource issue with VBA. People were creating document projects that used automatic macros and were using these Inventor documents that contained these projects as their templates. That meant that every file they created had a VBA document project. When a large assembly is loaded all of the referenced documents are also loaded, and in the case of these documents also meant loading the embedded VBA projects. It turns out that VBA has a limit to the number of VBA projects that can be loaded.

There is also another problem that recently came up with document projects and 64 bit Inventor. His advice is: DO NOT USE document projects. The one exception to this is if you're writing a program that is very specific to a single document. For example if you have a part and write a specific program to work with only that part. In this case it's convenient to package the program with the document rather than worry about passing an additional file with it.

For the full article and advice how to program and automate Inventor go tp Brian's blog.