Inventor Customization

Reply
Active Member
Posts: 7
Registered: ‎10-16-2012
Message 1 of 27 (541 Views)

Inventor freeze when Macros should load or run?

541 Views, 26 Replies
10-16-2012 11:59 PM

Hi all

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?

Thanks

Alon

Autodesk Inventor 2012 SP1 64-bit, win 7 

Valued Contributor
ChrisVandeVoorde
Posts: 52
Registered: ‎01-05-2011
Message 2 of 27 (525 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 12:27 AM in reply to: ravivalon

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!

 

C

Active Member
Posts: 7
Registered: ‎10-16-2012
Message 3 of 27 (519 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 12:46 AM in reply to: ChrisVandeVoorde

Hi Chris

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….

Any ideas?

Alon

Valued Contributor
ChrisVandeVoorde
Posts: 52
Registered: ‎01-05-2011
Message 4 of 27 (514 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 01:57 AM in reply to: ravivalon

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.

Active Member
Posts: 7
Registered: ‎10-16-2012
Message 5 of 27 (510 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 03:06 AM in reply to: ChrisVandeVoorde

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. 

Mentor
MegaJerk
Posts: 249
Registered: ‎01-26-2011
Message 6 of 27 (506 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 05:01 AM in reply to: ravivalon

Is the VBA project located on the same hard drive that Inventor is loaded on? I'm a bit curious. 

--------------------------------------------------------------------------------------

If my solution seems to remedy your problem, please press the Accept Solution button, -
as it increases my power levels and will eventually help to elevate me towards outer space.

Check out my iLogic injection tool here : http://goo.gl/ce1Qg
--------------------------------------------------------------------------------------
Active Member
Posts: 7
Registered: ‎10-16-2012
Message 7 of 27 (502 Views)

Re: Inventor freeze when Macros should load or run?

10-18-2012 07:09 AM in reply to: MegaJerk

Yes, it is all localy but- it happens even with no vba code. see my earlier msg.

Valued Contributor
Posts: 91
Registered: ‎03-04-2007
Message 8 of 27 (481 Views)

Re: Inventor freeze when Macros should load or run?

10-24-2012 03:20 AM in reply to: ravivalon

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.

Dan

Active Member
Posts: 7
Registered: ‎10-16-2012
Message 9 of 27 (478 Views)

Re: Inventor freeze when Macros should load or run?

10-24-2012 04:38 AM in reply to: dano0310

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.

Alon

ADN Support Specialist
xiaodong.liang
Posts: 1,197
Registered: ‎06-12-2011
Message 10 of 27 (454 Views)

Re: Inventor freeze when Macros should load or run?

10-29-2012 01:07 AM in reply to: ravivalon

Hi,

 

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).



Xiaodong Liang
Developer Technical Services
Autodesk Developer Network

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community


Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor

Twitter

Facebook

Blogs

Pinterest

Youtube