- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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 ![]()
Both your examples work, they're just doing different things.
Jhoel Forshav
Download my free Inventor Addin - Hole Projector
LinkedIn | Ideas | Contributions | Blog posts | Website