Sometimes it is usefull to do specific tasks (i.e. add an overwrite, move an annotative text) in a particular sheet/viewframe. However there is no built-in function in the API to bring back a sheet/viewframe by name.

The following VB.NET snippet brings back a specific sheet by name:

[code]

Private Function BringSheet(ByRef Name As String) As LDX.LDXSheet
For Each ldSheet As LDX.LDXSheet In Me.m_ldDoc.Sheets
If ldSheet.ZB_DESC = Name Then
BringSheet = ldSheet
Return BringSheet
End If
Next
BringSheet = Nothing
Return BringSheet
End Function

[/code]

The following VB.NET snippet brings back a specific viewframe on a specific sheet by name:

 

Private Function BringViewFrame(ByRef SheetName As String, ByRef ViewFrameName As String) As LDX.LDXSheetFrame
For Each ldSheet As LDX.LDXSheet In Me.m_ldDoc.Sheets
If ldSheet.ZB_DESC = SheetName Then
For Each ldSheetFrame As LDX.LDXSheetFrame In ldSheet
If ldSheetFrame.DeveloperName = ViewFrameName Then
BringViewFrame = ldSheetFrame
Return BringViewFrame
End If
Next
End If
Next
BringViewFrame = Nothing
Return BringViewFrame
End Function