Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
BrianEkins
in reply to: J-Camper

The Set statement isn't used in all assignments, but only when assigning an object to a variable.

 

But I want to take a step back and let you know that you're just heading towards a lot of disappointment with the program you're trying to write.  A VBA macro is not the right architecture to be building automatic save functionality on.  When you run a VBA macro, it takes over the Inventor user-interfaces.  Like all user-interfaces that I'm aware of, it is single threaded so there's only one thing going on at a time.  In your code you're trying to work around this by using the DoEvents statement.  What's happening here is that your macro has control over the UI and in the DoEvents statement is temporarily turning control back to Inventor so it can handle any pending events, and then control goes back to your macro.  This is very inefficient and I suspect there will be other problems.  I would suggest looking for something else as your introduction to learning the API.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com