ElementScanCriteria not honoring includes

I have an old mvba that I am testing on V8i; this has been working on all other versions up to xm.
Not the ElementScanCriteria is ignoring text node elements that were added from a cell library placement.
I look at the Weight, LineStyle, and Color and the scan criteria matches the element properties. But when, Add any one of these to the scan criteria; it doesn't find them.

Dim oLevel As Level
Set oLevel = ActiveDesignFile.Levels(65)
Dim oLineStyle As LineStyle
Set oLineStyle = ActiveDesignFile.LineStyles("0")
Dim oScanCriteria As New ElementScanCriteria
'oScanCriteria.IncludeLevel oLevel
'oScanCriteria.IncludeColor 2
'oScanCriteria.IncludeLineStyle oLineStyle
'oScanCriteria.IncludeLineWeight w
oScanCriteria.IncludeType msdElementTypeTextNode

The above will work, but I want to be more efficient as before. If any remarked out include is added back, the text Node won't be found.

What has changed, and why?
Thank you.

  • Hello Mark,

    I have tested these include methods and could not find a problem, all options worked correct with my own example dgn file.

    Possible reasons for problems could be:

    - level: the ID is not the same as the number of the level - "level 1" has possibly another ID than 65

    - weight: the variable w is not defined in your code snippet, correct value would be 1 for your example?

    If possible please upload a small dgn example to allow detailed testing.

    Best regards,