PdcInfo.CreateLogEntry: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == CreateLogEntry(Text as string, EntryType as integer, CalcNo as string) as boolean == Description == Creates a log entry in de PdC logfile. == Notes == The ..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 6: Line 6:


== Notes ==
== Notes ==
The createlogentry method has the following parameters:
The createlogentry method has the following parameters:<br>
1. Text: The text of the log entry.
1. Text: The text of the log entry.<br>
2. EntryType: The type of the log entry with the values 0 to 4.
2. EntryType: The type of the log entry with the values 0 to 4.<br>
   0 = Error
   0 = Error
   1 = Info
   1 = Info
Line 14: Line 14:
   3 = Delete
   3 = Delete
   4 = None
   4 = None
3. CalcNo: Apply the calculation number only if needed.
3. CalcNo: The calculation number (not required).<br>


== Code example ==
== Code example ==
<source lang="vb">
<source lang="vb">
   if pdc.Info.CreateLogEntry("Text to add to the logfile", 4, "") then
   if pdc.Info.CreateLogEntry("Text to add to the logfile", 4, "") then

Latest revision as of 08:38, 1 May 2014

Declaration

CreateLogEntry(Text as string, EntryType as integer, CalcNo as string) as boolean

Description

Creates a log entry in de PdC logfile.

Notes

The createlogentry method has the following parameters:
1. Text: The text of the log entry.
2. EntryType: The type of the log entry with the values 0 to 4.

  0 = Error
  1 = Info
  2 = Warning
  3 = Delete
  4 = None

3. CalcNo: The calculation number (not required).

Code example

  if pdc.Info.CreateLogEntry("Text to add to the logfile", 4, "") then
    msgbox "The message is created."
  else
    msgbox pdc.LastError
  end if

Availability

Available since Mai 2014 (from version 4.3)