Signature (Visual Basic / VBA)
Public Function LoadMultipleLines( _
ByVal vLines As Variant _
, ByVal vInteractive As Boolean _
) As String
Code Examples
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)
estConvertAddBuiltIn
estConvertAddFiles "ESunits.Dat"
estConvertAddFiles "Custom*.Dat"
estConvertAddUnit "turn", "", 2, "pi*rad", "plane angle"
estConvertAddPrefix "m", "mega", 1000000
estConvertAddReplacement "pound", "lb", 1
Return Value
Function returns an empty string upon success, and it returns the error message as a string when errors occur.
Notes & Version History
| 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: 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: estConvertAddUnit adds a new unit definition into memory. The command must be in the form of a call to the estConvertAddUnit function. Example: estConvertAddPrefix adds a new prefix definition into memory. The command must be in the form of a call to the estConvertAddPrefix function. Example: 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: 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. |