Macros Question

nfelixCXUGM
Enthusiast

Macros Question

nfelixCXUGM
Enthusiast
Enthusiast

We have a set of Macros that we use constantly. It was set up by someone that has left the company. It worked fine and still work for Inventor 2022.

 

We are testing it on Inventor 2024, but since the Level of Details go away now certain buttons won't work and gives us error: 

Error in: VBA_Macro_Function_or_Subroutine: Somewhere in function/sub Invalid procedure call or argument Error Code: 5

 

Any idea what i can replace the LevelOfDetail with to make it work?

 

@JelteDeJong

0 Likes
Reply
379 Views
4 Replies
Replies (4)

CGBenner
Community Manager
Community Manager

@nfelixCXUGM 

Welcome to the forums.  I've moved your post here where most of the programming experts hang out.  Good luck!


Chris Benner
Industry Community Manager – Design & Manufacturing


If a response answers your question, please use  ACCEPT SOLUTION  to assist other users later.


Also be generous with Likes!  Thank you and enjoy!


Become an Autodesk Fusion Insider
Inventor/Beta Feedback Project
0 Likes

nfelixCXUGM
Enthusiast
Enthusiast
Will do, thank you.
0 Likes

^_^clovis^_^
Advocate
Advocate

Hello

I didn't notice that the "Level of details" were removed in IN2024.

I guess you could look for "ModelStates" in document->ComponentDefinition->ModelStates. Then update your macro.

 

gr

 

0 Likes

WCrihfield
Mentor
Mentor

Just posting link here to your other current forum post with similar problem being asked about.

https://forums.autodesk.com/t5/inventor-programming-ilogic/code-question/m-p/12653350 

I posted something there that may be helpful for other folks finding this post, but not the other one, such as the following links:

DrawingView.ActiveModelState (ReadOnly property to check which one it is set to (if any)

DrawingView.SetActiveModelState (method to set its value)

Wesley Crihfield

EESignature

(Not an Autodesk Employee)