Hi Benjamin,
[quote user="BFrancis"]Am I doing something wrong?[/quote]
I have MicroStation installed only, not AECOsim Building Designer, so I cannot test your code, but it sounds weird. If you call Scan method without ElementScanCriteria, it returns all elements from active model: Both graphic and not graphic elements and in even empty design file there have to be several non graphic elements.
Can you try this simple code with some nearly empty design file?
Public Sub TestElementEnumerator() Dim oEnumerator As ElementEnumerator Set oEnumerator = ActiveModelReference.Scan() Do While oEnumerator.MoveNext MsgBox "Type: " & oEnumerator.Current.Type Loop End Sub
My another advice (not related directly to the discussed issue) is to always start a code with Option Explicit to ensure VBA will require to declare all variables explicitly, which decrease a thread of unwanted type or another mistake in the variable names.
With regards,
Jan