Working with inventor pro 2012, whenever I try to run a macro, the program freezes. It happens when I press the tools/macros button and it can take 30 sec or more before the macros dialog release and active or I can try to run windows job list which seems to release the jam too. It also happens when I try to run my macro with shortcut key or customized button. It freezes before the macro even loads and it is very frustrating. If I open the macros editor and run the macro from there (run sub) then there is no delay at all!
Does anybody else have the same and if so do you have a solution?
Autodesk Inventor 2012 SP1 64-bit, win 7
I have the same problem with one specific macro.
It is better since i placed all my macro in specific modules. I used to have: Module1 with Macro1, Macro 2, ... Macro 10.
Now I have Module_Macro1 with only Macro 1, Module_Macro2 with only Macro 2,..., Module_Macro10 with only Macro 10.
The difference between the macro that is slow and the others is that it has public declarations. I believe that this triggers the problem, but I'm not sure.
Hope this helps!
Thanks for your answer. I've also put several macros in one default location.
My problem starts even before the macro runs. It is when the "macros" dialog box (the window where you pick the macro to run) is loaded. The macros dialog appears but the program freezes. I can’t make a selection or even cancel until the dialog window unfreezes (with or without the help of windows job list). Once it comes to life again, there is no delay running the macro, regardless of public statements….
In my case it was linked to one specific macro that caused to slow all down (you also get this problem if you call the macro using a short cut and not the macro menu). So maybe start with duplicating your .VBA file. Load the new version (restart Inventor) and delete all macro except one very simple macro:
Sub test() MsgBox "test" End Sub
If the problem is gone you can start to add macro's. I would advise to copy paste them in different modules, as this helped me also allot.
Normally after a certain point the hanging reoccurs, and then you now which macro gives the problem.
If it is not a macro that's gives the problem then you should start looking to other possible causes.
I’ve actually done that and more.
I’ve erased all macros from all modules. Right now there is not a single thing written in the vba default. I’ve tried to run the macro dialog with no file open (to prevent any relations to any project ipj) and it still happens. In other words, a clean new inventor session with no vba to work with and all I do is press the tools-macros button – and it freezes!
There is nothing to load for god sake. The only way to intervene is to launch job list!
It is really frustrating because my macros kick **** but if inventor freezes before loading or running them, then what’s the point.
I would really appreciate some clever Autodesk wiz to spring in action now.
Is the VBA project located on the same hard drive that Inventor is loaded on? I'm a bit curious.
I have had this type of problem with a few of my larger macros. Mine dont fully freeze though.
Some of them start moving when ever the mouse is moved. Trick is to keep shaking it until it is done.
The other problem occurs when a select loop is run. I have to change to another program then switch back to inventor for the prompt to come up down the bottom left corner which specifies which point or edge to select.
Haven't actually tried to track down the problem yet as I haven't had the time and I have also switched over to using VB.net.
Thanks for your answer.
My problem occurs regardless of macro size or location. It happens when the macro dialog box pops up and before I can select a macro from the list. See my earlier post.
I am just wondering if the problem occurs when you ran the macro first time, or any times.
If first time only, I think this is a normal behavior becasue it is similar to loading the VBA IDE. Inventor is demand-loading. So it will load relevant modules when it loads some module first time (such as VBA).
Access a broad range of knowledge to help get the most out of your products and services.
Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.
Upgrading to a 2015 product? Make sure to check these out 1st!