MicroStation PowerDraft CONNECT Edition Help

Managing Exception Logs via the ManageExceptionLogs.vbs Script

The script ManageExceptionLogs.vbs is written in Visual Basic Script so it can be easily customized to be site specific. ManageExceptionLogs.vbs performs the following steps:

  1. Deletes "$(MS_TMP)ExceptionHistory-20" (or whatever "g_maxLogsToKeep" is set in the script).
  2. Shifts any existing subdirectories to the next higher value. For example:
    Move from Move to
    $(MS_TMP)ExceptionHistory-19 $(MS_TMP)ExceptionHistory-20
    $(MS_TMP)ExceptionHistory-18 $(MS_TMP)ExceptionHistory-19
    $(MS_TMP)ExceptionHistory-1 $(MS_TMP)ExceptionHistory-2
  3. Creates $(MS_TMP)ExceptionHistory-1\.
  4. Moves the most recently created Exception.log and MiniDump.dmp into $(MS_TMP)ExceptionHistory-1\.
  5. Optionally, sends e-mail to the CAD manager with the name of the computer where the exception occurred. This can be particularly useful for initial deployment of pre-release editions of MicroStation PowerDraft. The script variables "g_emailHostName", "g_emailCADAdministrator", and "g_emailUserDomain" must be populated with company or site specific values.
  6. Implements or invokes any other user specific processing near the end of the "Sub Main" routine of the script.
MicroStation PowerDraft's exception processing can be completely replaced with user specific processing if needed. After recording the exception information, MicroStation PowerDraft examines the variable $(MS_ProcessExceptionLog) and parses both a "window display control" (see SW_xxxx constants in the Microsoft Windows API documentation of "ShowWindow") value and an executable with optional arguments. For example, the default MicroStation PowerDraft processing configuration sets, in msfiles.cfg:
MS_ProcessExceptionLog 0 "$(windir)\system32\wscript.exe""$(MSDIR)manageExceptionLogs.vbs"

This indicates that wscript should run manageExceptionLogs.vbs in a hidden window.