.. highlightlang:: us .. index:: FE_SetFormulaDirectory .. _fe_setformuladirectory: FE_SetFormulaDirectory ====================== .. us.tag FE_SetFormulaDirectory New411 ENGLISH formula The function :ref:`FE_SetFormulaDirectory` sets the formula directory. The function unloads the old formulas and loads the new formulas.The function can be invoked in :ref:`OnFormulaStartEval`. .. function:: svOldDir = FE_SetFormulaDirectory(svDir) .. us.return **Return Value** *svOldDir* is a string vector containing the old formula directory. .. us.params **Parameters** .. uparam:: svDir *svDir* is a string vector with the new Formula directory. The function concatenates the vector elements by adding a semicolon (;). .. us.example **Example** The function :ref:`OnFormulaStartEval` is invoked when the user starts a formula evaluation, e.g. by pressing the :kbd:`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; } .. seealso:: :ref:`formula-interpreter`, :ref:`onformulastarteval`, :ref:`FE_GetFormulaDirectory` :sub:`id-1555923`