Function GetC(L , a1 , PLoad , DLoad) Lreal = L a1real = a1 PLoadreal = PLoad DLoadreal = DLoad ' Get a reference to SmartSketch Set objSmartSketch = GetObject(, "SmartSketch.Application") ' Get a reference to the Mathcad object Set objmathcad = objSmartSketch.ActiveDocument.ActiveSheet.SmartFrames2d(1).object Call objmathcad.SetComplex("in0", Lreal, 0) Call objmathcad.SetComplex("in1", a1real, 0) Call objmathcad.SetComplex("in2", PLoadreal, 0) Call objmathcad.SetComplex("in3", DLoadreal, 0) Call objmathcad.Recalculate Call objmathcad.GetComplex("out0", flowreal, flowimag) GetC = flowreal End Function