home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 May
/
W2KPRK.iso
/
apps
/
smartsketch_le
/
Samples
/
FG_MathCadSamples
/
Mathcad
/
Ditch
/
MathCAD.bas
< prev
Wrap
BASIC Source File
|
1999-11-02
|
813b
|
33 lines
Function GetC(D, BW, TW, SideLength)
varareal = D
varbreal = BW
varcreal = TW
vardreal = SideLength
varaimag = 0
varbimag = 0
varcimag = 0
vardimag = 0
flowimag = 0
' 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", varareal, 0)
Call objmathcad.SetComplex("in1", varbreal, 0)
Call objmathcad.SetComplex("in2", varcreal, 0)
Call objmathcad.SetComplex("in3", vardreal, 0)
Call objmathcad.Recalculate
Call objmathcad.GetComplex("out0", flowreal, flowimag)
GetC = flowreal
End Function