Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi @SometimesInventorMakesMeAngry 

In your first example you're simply changing which string your variable stores, while in the second example you're changing the value of a property in an object.

 

Consider your variable oDoc for example:

Dim oDoc As Inventor.Document = ThisApplication.ActiveDocument

 

If you'd change that to another document object like oDoc = someotherdocument it would not change which document is active in Inventor. It would only change which document is stored in your variable oDoc.

In other words, that does not change the property ActiveDocument in the application object.

Same thing :slightly_smiling_face:

 

Both your examples work, they're just doing different things.