ActiveX - Drawing a Daisy Chart


One of the typical applications for Daisy working in conjunction with another program is to draw a Daisy Chart of a user selected or generated database.


Consider say a telephone switch or exchange that needs to have Daisy Charts drawn of its performance every day :-


In this and many applications of Daisy, the procedure is in three stages :-

  1. Select and load the database into the program.
  2. Select and load the template.
  3. Draw the Daisy Chart.


This can be performed directly by just two calls to Daisy after creating the 'Daisy' object.

  Dim wrkError as String
  Dim wrkPath as String
  Dim wrkTemplate as String
  ...
  wrkPath = ...
  if (Daisy.LoadDatabaseCSV(wrkPath, wrkError) = False) Then
      Daisy.MessageError wrkError
      Exit Sub
  End If
  wrkTemplate = ...
  If (Daisy.LoadTemplate(wrkTemplate, True, wrkError) = False) Then
      Daisy.MessageError wrkError
      Exit Sub
  End If
  ...

Note :-

  1. The database path, wrkPath, and the template path, wrkTemplate, must be set in some way.

  2. LoadDatabaseCSV has lots of extra arguments to cope with different file formats. The default is assumed here.

    See Opening Databases for more details.

  3. MessageError is used to display an error message in a Daisy style and format.

  4. LoadTemplate is used to load the template and because the second argument is set to 'True', draw the chart.


Another way is to use the various Menu ... methods.

    ...
    Daisy.DirectoryDatabase = ...
    Daisy.MenuOpenCSV
    if (Daisy.TestDatabaseOpen = False) Then
        Daisy.MessageInfo "No database opened!"
        Exit Sub
    End If
    MenuGetTemplate
    ...

Note :-

  1. DirectoryDatabase is set in the program, so that it knows where databases are stored.

  2. MenuOpenCSV opens the database and TestDatabaseOpen tests whether one has been opened.

    See Opening Databases for more details.

  3. MenuGetTemplate gets a template and then draws a Daisy Chart.


ActiveX   Daisy   Index