@WCrihfield, @JhoelForshav Thanks for replies.
After extensive googling I figure out that Interfaces (what Inventor.ObjectsEnumerator is) are like definition of set of neccessary {Properties, Functions, Subs, Events, Interfaces, Classes, Structures} which must this a Class implements.
"ObjectsEnumerator Type Class" must have implemented {Count As Integer, Item as Object, Type as ObjectsTypeEnum} properties (but how you get these values is up to you).
Is not allowed to create a new "interface object" like
Dim oOE As New ObjectsEnumerator
You get 'New' cannot be used on an interface Error. But you can create a new instance of a Class which implements Inventor.Enumerator.
Sub Main
Dim oOE As ObjectsEnumerator
End Sub
Class myObjectsEnumerator
Implements Inventor.ObjectsEnumerator
End Class
But here I ends getting this Compile Errors:
Error on Line X : Class - myObjectsEnumerator must implement member Function GetEnumerator() As IEnumerator for interface System.Collections.IEnumerable.
Error on Line X : Class - myObjectsEnumerator must implement member Function GetEnumerator() As System.Collections.IEnumerator for interface Inventor.ObjectsEnumerator.
Error on Line X : Class - myObjectsEnumerator must implement member ReadOnly Default Property Item(Index As Integer) As Object for interface Inventor.ObjectsEnumerator. Implementing property must have matching ReadOnly/WriteOnly specifiers.
Error on Line X : Class - myObjectsEnumerator must implement ReadOnly Property Count As Integer for interface Inventor.ObjectsEnumerator. Implementing property must have matching ReadOnly/WriteOnly specifiers.
Error on Line X : Class - myObjectsEnumerator must implement member ReadOnly Property Type As ObjectTypeEnum for interface Inventor.ObjectsEnumerator. Implementing property must have matching ReadOnly/WriteOnly specifiers.
It's obvious, because interface only defines what must be provided, but nothing about code for these functions/properties. But now this is above my knowledge level.
Inventor 2022, Windows 10 Pro
Sorry for bad English.