Get/Set the LabTalk formula and optional Before Formula Script for Column and MatrixObject
Formula
import PyOrigin wks=PyOrigin.ActiveLayer() colA=wks.Columns(0) colA.SetFormula("5*(i-1)") colA.ExecuteFormula() colB = wks.Columns(1) strExpression = "cos(Amp*x*pi/180)" strBeforeScript = "double Amp=4.5;" + "\r\n" + "range x=col(A);" strFormula = strExpression + ";\r\n#" + strBeforeScript colB.Formula=strFormula colB.ExecuteFormula()
GetFormula SetFormula