Tools->Macros behaviour changed for some reason (for the worse, if course)

Tools->Macros behaviour changed for some reason (for the worse, if course)

rschader
Advocate Advocate
703 Views
11 Replies
Message 1 of 12

Tools->Macros behaviour changed for some reason (for the worse, if course)

rschader
Advocate
Advocate

Not sure what happened, or how to fix this. Tried searchiing the boards here to no avail.

 

It used to be that when I would go to Tools->Macros to run a VBA macro, all the macros in my ApplicationProject (default.ivb) file would already be populated in the list of macros. Now, for some reason, whenever I goto the Macros diaload, there are no macros displayed from my default.ivb file until I select the dropdown option for either All Projects or ApplicationProject. It appears to be defaulting to DocumentProject all the time. Where can I change that? Inventor 2015 x64. TIA!

 

P.S. I have custom ribbon buttons that access macros in my default.ivb file with no problems. Just a PITA having to select the applicationproject from the drop down everyti,e I want to run a macro that I don't have a ribbon button for!

0 Likes
Accepted solutions (1)
704 Views
11 Replies
Replies (11)
Message 2 of 12

rossano_praderi
Collaborator
Collaborator

Hi,

did you checked this option?

 

Cattura.JPG

 

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes
Message 3 of 12

rschader
Advocate
Advocate

Yes. Whenever I run the Macro command, that window pops up, but the field you highlighted is always blank (didn't used to be that way), so I have to manually click the drop down and select either ApplicationProject or All Projects. There is one instance where it will default to the ApplicationProject, and that is if I have no files open, so it doesn't do me much good in that case either!

0 Likes
Message 4 of 12

rossano_praderi
Collaborator
Collaborator

Did you check this option in the applicaiton settings?

 

Cattura.JPG



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes
Message 5 of 12

rschader
Advocate
Advocate

If you are talking about the location of the default.ivb file, yes, that option is checked. I believe that if it wasn't, none of the buttons I have assigned to macros in that file would function at all? Those still work fine, It's just that if I have a document open, I have to click the drop down to select the "ApplicationProject", which BTW, is the default.ivb file referenced in that application option you asked about if I had set or not

0 Likes
Message 6 of 12

rschader
Advocate
Advocate
As an aside update, this behavior MAY have started when I noticed my old default.ivb file was getting kind of large, so I exported all the code and created a new default.ivb file and then imported my code back in. All the macros still work, but could doing that have caused some sort of issue, I wonder?
0 Likes
Message 7 of 12

rossano_praderi
Collaborator
Collaborator

I've tried to export and import a module and nothing happened to me.

 

You can try the follow steps:

  1. go to your .IVB project folder (Es. "C:\Users\Public\Documents\Autodesk\Inventor 2015")
  2. find and rename the "Default.ivb" in to "Default.ivb.txt"
  3. open inventor (it will create a new blank .IVB)
  4. close inventor
  5. delete the "Default.ivb" created by inventor
  6. rename back the "Default.ivb.txt" in to "Default.ivb"
  7. reopen inventor and check if this help

Just give it a try, I don't know what you have done in the export/import process but I don't think you did something wrong.

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes
Message 8 of 12

rschader
Advocate
Advocate

I will give that a try first thing tomorrow when I get to work! Thanks! Hope it works!

0 Likes
Message 9 of 12

rschader
Advocate
Advocate
Dshortway, I followed your steps and I have the following changes now: Instead of the Project dropdown defaulting to blank, it now defaults to DocumentProject. It will only default to ApplicationProject if I have no files open. I have NO VBA code in any of my documents, so this still doesn't help, as I still have to select the drop down and pick ApplicationProject!
0 Likes
Message 10 of 12

rossano_praderi
Collaborator
Collaborator

I'm sorry, I haven't found any information about this issue and I think this has to be the correct way.


May be someone else could give you a different solution.


The unique idea I can have is to make a simple piece of code to control the dialog box on opening.

 

Bregs

Rossano Praderi



--------------------------------------
If my post answers your question, please click the "Accept as Solution"
button. This helps everyone find answers more quickly!
---------------
0 Likes
Message 11 of 12

rschader
Advocate
Advocate

Thought I would try something else. I happened to still have my old default.ivb file from before I exported everything to make a new one. I renamed that to see what happened in Inventor when I execute Tools->Macros. Lo and behold, the dropdown now defaults to the default.ivb file and shows all my macros in the listbox ready to click on! For some reason it is being referred to as "NewDefault" instead of ApplicationProject (That happens to be the Project name I set for it in the VBA editor.

 

Perhaps I will try renaming the newer default.ivb file properties so it ius named NewDefault also, and see what happens? I would just stick with the older ivb file, but I have written several new macros and modified others since then.

 

I suppose the other solution would just be to make command buttons for all my macros 😉

0 Likes
Message 12 of 12

rschader
Advocate
Advocate
Accepted solution
Well, looks like I fixed it! Put the new default.ivb file back, changed the project's name to NewDefault, and now it is preloading again without having to select it! Not sure why this worked though? Maybe Inventor only "preloads" the macros in the listbox if the project name is NOT "ApplicationProject"? Kudos to me anyway! 😉
0 Likes