There's more to experience when you log in!
Set Map Window 3129 Zoom Entire Selection
Dim nWin, nFrame, nWID, nMID As Integer
If SelectionInfo(SEL_INFO_NROWS) = 0 Then
Note "Please select a record to zoom to!"
Print "Number of Windows: '" & NumWindows() & "'"
For nWin = 1 To NumWindows()
nWID = WindowID(nWin)
Print "Testing " & WindowInfo(nWID, WIN_INFO_NAME)
If WindowInfo(nWID, WIN_INFO_TYPE) = WIN_LAYOUT_DESIGNER Then
Print " Found a Layout (Designer) window!"
Print " Number of Frames: " & LayoutInfo(nWID, LAYOUT_INFO_NUM_ITEMS)
For nFrame = 1 To LayoutInfo(nWID, LAYOUT_INFO_NUM_ITEMS)
nMID = LayoutItemInfo(nWID, nFrame, LAYOUT_ITEM_INFO_WIN)
If nMID <> 0 Then
Print " Frame " & nFrame & " contains a window"
If WindowInfo(nMID, WIN_INFO_TYPE) = WIN_MAPPER Then
Print " Window is a map '" & WindowInfo(nWID, WIN_INFO_NAME) & "'"
Set Map Window nMID Zoom Entire Selection
Thank you very much. I definitely already see some things I had wrong or missing.