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?
@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!
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
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
(Not an Autodesk Employee)
Can't find what you're looking for? Ask the community or share your knowledge.