<-- Previous || Up || Next -->

Load Multiple Lines Function
Units Class

Public Function LoadMultipleLines( _
      ByVal vLines As Variant _
    , ByVal vInteractive As Boolean _
    ) As String

Loads the unit definitions, prefix definitions, global text definitions, and data files specified by the argument.

Remarks: Interprets the Lines of the string argument as commands to load data files, unit definitions, prefix definitions, and/or text replacement definitions.
Arguments: vLine is a string consisting of one or more commands. Each command is in the form of a Visual Basic function call; each command must appear on a separate CR-NL-separated line.
The following commands are recognized:
estConvertAddBuiltIn loads the built-in unit, prefix, and global text replacement definitions into memory. These definitions are loaded by default when the first measurement conversion related function is called, but they can be cleared by calling ClearAll then setting estConvertInitializeDone to True. Example:
       estConvertAddBuiltIn
estConvertAddFiles loads the unit, prefix, and global text replacement definitions from one or more text files. The definitions must be in the form of calls to the estConvertAddUnit, estConvertAddPrefix, and estConvertAddReplacement functions. Example:
       estConvertAddFiles "ESunits.Dat"
       estConvertAddFiles "Custom*.Dat"
estConvertAddUnit adds a new unit definition into memory. The command must be in the form of a call to the estConvertAddUnit function. Example:
       estConvertAddUnit "turn", "", 2, "pi*rad", "plane angle"
estConvertAddPrefix adds a new prefix definition into memory. The command must be in the form of a call to the estConvertAddPrefix function. Example:
       estConvertAddPrefix "m", "mega", 1000000
estConvertAddReplacement adds a new global text replacement definition into memory. The command must be in the form of a call to the estConvertAddReplacement function. Examples:
       estConvertAddReplacement "pound", "lb", 1
Other lines which do not begin with one of these commands are silently ignored.
When vInteractive is True, any errors are displayed to the user in a message box, then the user has the choice of whether they want to continue or stop the operation. When vInteractive is False, any errors cause processing to stop and the error message is returned in a string.
Return Value: Function returns an empty string upon success, and it returns the error message as a string when errors occur.
Example:
    Dim strCrLf As String
    strCrLf = Chr$(13) + Chr$(10)
    Dim strProg As String
    strProg = strProg + "estConvertAddBuiltIn" + strCrLf
    strProg = strProg + "estConvertLoadFiles ""ESUnits*.Dat""" + strCrLf
    Debug.Print estConvertLoadMultipleLines(strProg)
See Also:
    estConvertAddUnit Function
    estConvertAddPrefix Function
    estConvertAddReplacement Function

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.