FE_SetFormulaDirectoryΒΆ
The function FE_SetFormulaDirectory sets the formula directory. The function unloads the old formulas and loads the new formulas.The function can be invoked in OnFormulaStartEval.
- svOldDir = FE_SetFormulaDirectory(svDir)
Return Value
svOldDir is a string vector containing the old formula directory.
Parameters
- svDir
svDir is a string vector with the new Formula directory. The function concatenates the vector elements by adding a semicolon (;).
Example
The function OnFormulaStartEval is invoked when the user starts a formula evaluation, e.g. by pressing the F9 key. In the following example the directory is set depending of the value of ssCreator in the NC file.
def OnFormulaStartEval(ncid) { if (nc_attinq_datatype(ncid, NC_GLOBAL, "Creator") == NC_CHAR) { ssCreator = nc_attget(ncid, NC_GLOBAL, "Creator"); if (strmatch("*Pasy*", ssCreator)) { FE_SetFormulaDirectory("c:/formel1_pasy; C:/formel2_pasy"); return TRUE; } else { ssPath = GetProfileString("Formula", ssCreator, "c:/myformula.ini") if (ssPath != "") { FE_SetFormulaDirectory(ssPath); } } } return TRUE; }
id-1555923