We receive many questions about the ability to change text in a MathScript node dynamically. While we can't yet do it dynamically (i.e. while the VI is running), we now have the ability to do so programmatically. This is possible using VI Scripting available from NI Labs (http://www.ni.com/labs). You will need the full LabVIEW compiler to use this feature (i.e. it will not work in the Run-Time Engine or deployed on an RT target). If your script changes inputs and outputs, it may be easier to script a new VI each time you need to change your MathScript in the MathScript Node. Otherwise, you can change the formula with the "Formula Expression" property of the MathScript Node. Here is a look at some sample code that generates a new VI, creates a MathScript node, sets the script, creates an output variable, creates an output indicator, opens the front panel of the scripted VI, and runs the VI.
It is worth mentioning that VI Scripting is an advanced feature and you will likely need to be very familiar with LabVIEW to be successful. Also note that VI Scripting is an NI Labs product and as such is not supported through the traditional channels. Support at this time is handled through the API community on NI Labs.
Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments