Programming Plugins

Home Forums Knowledge Base Edit Pro Programming Plugins

  • This topic has 0 replies, 1 voice, and was last updated 19 years ago by Rob.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1561
    Rob
    Member

    Programming Plugins

    Last edited: December 15, 2003 08:14 AM

    This document will describe the requirments for writting and implementing a plugin module into Manager. It is assumed that the reader understands programming, and can grasp the principles that are talked about.
    Rules

    Before Manager will recognize a plugin, and make it available to the user:

      1. A Directory must exist on the same drive that Manager was found, named Plugins. If Manager is found on C: then the path would be C:Plugins.
      2. The Plugin module (an .EXE) must reside in this directory.
      3. A Plugin Definition file with the same name, and .PID for an extension must reside in this directory (eg VoidRep.PID). It’s format is described below.
      4. The Primary Version number in this .PID file must match that of Manager. This is to ensure file compatability.

    The .EXE module is expected to conform to the following rules:

      1. It Must not change working directories -without- returning to the same directory before termination.
      2. The Report it creates must be stored in an .RP file called Report.RP in the REPORTS subdirectory. See below for details about this file.
      3. If the report requires starting and ending Journal dates, they will be obtained from the command line. When the report is run, any selected dates are passed by: /Date=YYMMDD-YYMMDD
      4. It may utilize settings found in the Report Options dialog, by reading DATAManager.CFG.
      5. It May perform any screen I/O if additional questions need to be asked, and to notify the progress of report generation.
      6. The ‘File/Configure’ menu item in Manager will launch the module with the ‘/Configure’ command line switch to allow for a custom configuration screen.

    PID File Format

    The .PID file is a text file that may be created with DOS Edit or any other text editor. It contains settings that Manager will use. Below are a list of possible settings and their meanings.

    The file may also contain remarks. A REM indicates that the line is a remark, and will be ignored. Blank lines will also be ignored. A remark may be placed after a setting, on the same line if it is preceeded by a ;symbol.

    The following are sample settings, with remarks about each:

      Version=5 ;This required line informs manager
                            ;  what version of TouchNet/TouchPRO
                            ;  the report is compatable with.
      Name=A Plugin Report ;This is the name that the user will see
      Wide=136 ;This is the report width (80 and 136 are common)
      UseJournal=yes ;This report will not be launched without the user
      ;Selecting dates first. Without this
                            ;  line, the /Date=YYMMDD-YYMMDD command
                            ;  line will not be passed.
      Configure=yes ;Allows this report to appear in the
                            ;  ‘File-Configure Extra reports’ list.
    RP File format

    The plugin module only needs to create it’s report in an .RP file in the correct location. When the module finishes, Manager will present the user with the options of Viewing/Printing/Faxing or Creating a text file from this .RP file.

    The .RP File must be in Reports (a child of the operational directory), and must be named ‘Report.RP’. It’s format is raw text, without carriage returns and line feeds. If the report is 80 columns wide and 10 lines tall, the .RP file would be 800 bytes long. Extra spaces must be padded out.

    If the report is 136 columns and 25 lines tall, the file would be 3400 bytes in size.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.