GetVBScriptRules

Returns the rules that have been loaded into an application. The rules are returned as an array of bytes.

Caution!

This method returns the contents of the rules file (.RLE file) that has been loaded into an application. If the rules file was changed after the file was loaded, the updated file’s contents are not returned by GetVBScriptRules.

Syntax

<HsvCalculate>.GetVBScriptRules pvarabRules, pbRulesExist

Argument

Description

pvarabRules

Variant array. Returns the application’s rules. The array is returned as a Byte subtype.

pbRulesExist

Boolean. Returns TRUE if a rules file has been loaded into the application, FALSE if no rules file has been loaded.

Example

The following example outputs an application’s rules to a text file. The array of bytes returned by GetVBScriptRules is converted to a String and inserted into a file with various Visual Basic methods.

Dim cCalc As HsvCalculate, vaRules As Variant
Dim bRulesExist As Boolean, iFile As Integer
Set cCalc = m_cHsvSession.Calculate
cCalc.GetVBScriptRules vaRules, bRulesExist
If bRulesExist = True Then
  iFile = FreeFile
  Open "c:\temp\appRules.rle" For Output As #iFile
  Print #iFile, StrConv(CStr(vaRules), 64)
  Close #iFile
End If