How to?: Ensure code only operates on model reference with specified name?


As the title says I am wondering how in code I can target a specific model reference (ignoring all other model references in a designfile).An existing Macro I am trying to modify uses this:

Set oDgnFile = OpenDesignFileForProgram(oFile.Path, False)
For modelCount = 1 To oDgnFile.Models.Count
                    If oDgnFile.Models(modelCount).Type = msdModelTypeSheet Then
                        myModel = oDgnFile.Models(modelCount).Name
                    ElseIf oDgnFile.Models(modelCount).Type = msdModelTypeNormal Then
                        myModel = oDgnFile.Models(modelCount).Name
                    End If
Set oEnumerator = oDgnFile.Models(myModel).Scan(oScanCriteria)

What I am wanting is for my oEnumerator to only scan on a modelreference called Sheet. I know of the .Name property and its probably very easy to do but I can think how to put it all together.

Any help is appreciated.

Parents Reply Children
No Data