Use dbUpdateUtilAllEnt.pkg
Use cWsProgressBar.pkg
Use cDescription.pkg

Object oApplication is a cApplication
    Set psAutoOpenWorkspace to ""
End_Object

Object oDescripeMain is a BasicPanel
  Set Label to "Databasedescription v7.3"
  Set Size to 36 339
  Set Location to 8 13
  Set locate_mode to CENTER_ON_SCREEN
  Set Maximize_Icon to False
  Set Minimize_Icon to False
  Set Border_Style to Border_Dialog
    Set peNeighborhood to nhPublic

  Object cnt3DBox is a Container3d

    Set Size to 34 337
    Set Location to 1 1

    Object frmToGetFocus is a Form
      Set Size to 1 1
      Set Location to -10 -10
    End_Object

    Object pStatus is a cWsProgressbar
      Set Size to 13 273
      Set Location to 9 59
      Set piMaximum to 250
      Set piAdvanceBy to 1
        Set pbSmooth to True
    End_Object    // pStatus

    Object Textbox1 is a Textbox
      Set Label to "Descriped:"
      Set TypeFace to "MS Sans Serif"
      Set FontSize to 4 0
      Set Size to 10 35
      Set Location to 11 23
    End_Object    // Textbox1

  End_Object    // cnt3DBox

  Object oDescription is a cDescription

    Procedure OnSetProgressMax Integer iMaxPos
        Set piMaximum of pStatus to iMaxPos
    End_Procedure

    Procedure OnSetProgressPosition Integer iCurPos
        Set piPosition of pStatus to iCurPos
    End_Procedure

  End_Object

    Procedure DoRun
        String sWorkspaceFile sDescriptionFiles sTestfile sDataPath sFilelist sError
        String sQuiet
        Handle hoCommandLine hoWorkspace
        Integer iRetVal
        Send Activate   
        Get phoCommandLine of oApplication to hoCommandLine
        Get Argument of hoCommandLine 1 to sWorkspaceFile
        Get Argument of hoCommandLine 2 to sDescriptionFiles
        Get Argument of hoCommandLine 3 to sQuiet
        Get phoWorkspace of ghoApplication to hoWorkspace
        Send DoClearPaths of hoWorkspace
        Get OpenWorkspaceFile of hoWorkspace sWorkspaceFile to iRetVal
        If (iRetVal = wsWorkspaceOpened) Begin
            Get psDataPath of hoWorkspace to sDataPath
            Set psDataPath of oDescription to sDataPath
            Get psFilelist of hoWorkspace to sFilelist
            Set psFilelist of oDescription to sFilelist
            If (sQuiet = "quiet") Begin
                Set pbQuiet of oDescription to True
            End
            Set psDescriptionDir of oDescription to sDescriptionFiles
            Send DoDescribeDatabase of oDescription
        End
        Else Begin
            Get OpenWorkspaceErrorMessage of hoWorkspace iRetVal to sError
            Send Stop_Box sError "Auto description"
        End
    End_Procedure

End_Object    

Send DoRun of oDescripeMain
