- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Apologies if this is a duplicative question, but I found it difficult to search for, and get good results, with inputs I could think of.
I feel like Inventor's object collections are not always consistent on whether they're 0-base or 1-base collections (meaning the first item is index-1 or index-0)
Is there an underlying 'rule' or 'guideline' being followed that I'm ignorant of?
Is there a way, when the collection has no indexes on the collection itself to query, I can discern what the item indexes are, without just attempting an item(0) on it and seeing if it errors?
What I normally do is: Debug.Print(objcol.item(0).Name) '//or whatever string property or .toString//
Just be nice if this was something I could just 'know' without doing that.
Example:
https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=ThemeManager
Methods: GetComponentThemeColor
Properties: ActiveTheme, Application, Themes, Type, Accessed From
The linked 'sample' gives me a clue, because it uses an "i=0" followed by a For Loop, so I kind of "infer" it is 1-base. But not all examples are even that explicit (or have an example)
Solved! Go to Solution.