Function HaveMapViewer()

   Dim map

   HaveMapViewer = False
   On Error Resume Next
   Set map = CreateObject("Autodesk.MGMap.1")
   HaveMapViewer = IsObject(map)

End Function
Function GetViewerAPI()

   Dim map
   GetViewerAPI = 0
   On Error Resume Next
   Set map = CreateObject("Autodesk.MGMap.1")
   GetViewerAPI = map.getApiVersion()

End Function
