Tedds Function Reference
Tedds Function Reference
Tedds 2020
Function and Field
Reference
Page 1 of 903
Tedds 2020 - Function and Field Reference
Page 2 of 903
Tedds 2020 - Function and Field Reference
Abs ............................................................................................................................................................................................................ 26
Average ..................................................................................................................................................................................................... 27
Ceiling........................................................................................................................................................................................................ 28
Degrees ..................................................................................................................................................................................................... 29
Extremum.................................................................................................................................................................................................. 30
Exp............................................................................................................................................................................................................. 31
Floor .......................................................................................................................................................................................................... 32
Int .............................................................................................................................................................................................................. 33
InterpLinear............................................................................................................................................................................................... 34
Ln............................................................................................................................................................................................................... 35
Log............................................................................................................................................................................................................. 36
Max ........................................................................................................................................................................................................... 37
Median ...................................................................................................................................................................................................... 38
Min ............................................................................................................................................................................................................ 39
Mod ........................................................................................................................................................................................................... 40
Quotient .................................................................................................................................................................................................... 41
Rand .......................................................................................................................................................................................................... 42
Round ........................................................................................................................................................................................................ 43
RoundUp ................................................................................................................................................................................................... 44
RoundDown .............................................................................................................................................................................................. 45
Sqrt ............................................................................................................................................................................................................ 46
Sum ........................................................................................................................................................................................................... 47
xy ............................................................................................................................................................................................................... 48
Cos............................................................................................................................................................................................................. 51
Tan ............................................................................................................................................................................................................ 52
Cosec ......................................................................................................................................................................................................... 53
Sec ............................................................................................................................................................................................................. 54
Cot ............................................................................................................................................................................................................. 55
Asin ........................................................................................................................................................................................................... 56
Acos ........................................................................................................................................................................................................... 57
Atan ........................................................................................................................................................................................................... 58
Sinh ........................................................................................................................................................................................................... 59
Page 3 of 903
Tedds 2020 - Function and Field Reference
Cosh .......................................................................................................................................................................................................... 60
Tanh .......................................................................................................................................................................................................... 61
Asinh ......................................................................................................................................................................................................... 62
Acosh......................................................................................................................................................................................................... 63
Atanh ......................................................................................................................................................................................................... 64
SolvCreateSolver ....................................................................................................................................................................................... 71
SolvSetActiveSolver ................................................................................................................................................................................... 72
SolvGetActiveSolver .................................................................................................................................................................................. 73
SolvGetSolverCount .................................................................................................................................................................................. 74
SolvAnalyse/SolvAnalyze ........................................................................................................................................................................... 75
SolvAddCoordinateSystem ........................................................................................................................................................................ 76
SolvAddMaterial ........................................................................................................................................................................................ 77
SolvSetMaterial ......................................................................................................................................................................................... 78
SolvAddSection ......................................................................................................................................................................................... 79
SolvSetSection ........................................................................................................................................................................................... 80
SolvAddNode............................................................................................................................................................................................. 81
SolvAddNodes ........................................................................................................................................................................................... 83
SolvSetDefaultNodeFreedom .................................................................................................................................................................... 84
SolvSetDefaultNodeCoordSystem ............................................................................................................................................................. 85
SolvSetNodeLabel ..................................................................................................................................................................................... 86
SolvAddSpringX ......................................................................................................................................................................................... 87
SolvAddSpringZ ......................................................................................................................................................................................... 88
SolvAddRotationalSpring........................................................................................................................................................................... 89
SolvAddElement ........................................................................................................................................................................................ 90
SolvAddElements ...................................................................................................................................................................................... 92
SolvAddSpan ............................................................................................................................................................................................. 93
SolvAddMember ....................................................................................................................................................................................... 94
SolvSetDefaultElementSection .................................................................................................................................................................. 95
SolvSetDefaultElementMaterial ................................................................................................................................................................ 96
SolvSetDefaultElementRotation ................................................................................................................................................................ 97
SolvSetDefaultElementReleases................................................................................................................................................................ 98
SolvSetElementRotation ........................................................................................................................................................................... 99
Page 4 of 903
Tedds 2020 - Function and Field Reference
SolvAddCombination............................................................................................................................................................................... 102
SolvAddElementPointMoment................................................................................................................................................................ 107
SolvAddElementTrapezoidalLoad............................................................................................................................................................ 110
SolvAddElementUniformTemperature.................................................................................................................................................... 111
SolvDrawAttach....................................................................................................................................................................................... 129
SolvDrawLoading..................................................................................................................................................................................... 141
Page 5 of 903
Tedds 2020 - Function and Field Reference
SolvDrawEnvelopes ................................................................................................................................................................................. 148
SolvDrawLegend...................................................................................................................................................................................... 149
SolvSelectMembers................................................................................................................................................................................. 166
SolvSelectResultsPosition........................................................................................................................................................................ 167
SolvGetMaxAxialForceIndex.................................................................................................................................................................... 174
SolvGetMaxAxialForceIndex.................................................................................................................................................................... 178
Page 6 of 903
Tedds 2020 - Function and Field Reference
SolvGetMaxShearIndex ........................................................................................................................................................................... 188
SolvGetMinMoment................................................................................................................................................................................ 193
SolvGetMaxDeflectionIndex.................................................................................................................................................................... 208
SolvGetMaxDeflectionIndex.................................................................................................................................................................... 212
SolvGetMinAxialDeflectionIndex............................................................................................................................................................. 220
Page 7 of 903
Tedds 2020 - Function and Field Reference
SolvGetMaxVerticalDeflection ................................................................................................................................................................ 227
SolvGetMaxVerticalReaction................................................................................................................................................................... 233
SolvGetMinMomentReaction.................................................................................................................................................................. 236
SolvGetCombinationCount...................................................................................................................................................................... 252
Page 8 of 903
Tedds 2020 - Function and Field Reference
SolvGetSectionSource ............................................................................................................................................................................. 268
SolvGetSectionSourceName.................................................................................................................................................................... 271
GetCalcItemStatus................................................................................................................................................................................... 311
GetCalcItemText...................................................................................................................................................................................... 312
Page 9 of 903
Tedds 2020 - Function and Field Reference
SetCalcItemLongName ............................................................................................................................................................................ 320
EvalCalcItemIf.......................................................................................................................................................................................... 347
EvalCalcItemIfExists................................................................................................................................................................................. 348
EvalIf........................................................................................................................................................................................................ 356
Page 10 of 903
Tedds 2020 - Function and Field Reference
DBGetActiveConnection .......................................................................................................................................................................... 369
Page 11 of 903
Tedds 2020 - Function and Field Reference
DListGetPageNumColumns ..................................................................................................................................................................... 408
DListGetVarName.................................................................................................................................................................................... 414
DListNumVars.......................................................................................................................................................................................... 420
DListSetItemFilter.................................................................................................................................................................................... 426
DListSetPage............................................................................................................................................................................................ 427
DrawClipClear.......................................................................................................................................................................................... 451
Page 12 of 903
Tedds 2020 - Function and Field Reference
DrawClipRectangle .................................................................................................................................................................................. 453
DrawDestroyTransform........................................................................................................................................................................... 468
DrawDimensionStringRotate................................................................................................................................................................... 490
DrawEllipse.............................................................................................................................................................................................. 491
Page 13 of 903
Tedds 2020 - Function and Field Reference
DrawFillRectangle ................................................................................................................................................................................... 523
DrawLabelLineCap................................................................................................................................................................................... 542
DrawLineCapAlignment........................................................................................................................................................................... 551
DrawMove............................................................................................................................................................................................... 567
Page 14 of 903
Tedds 2020 - Function and Field Reference
DrawSaveEMF ......................................................................................................................................................................................... 579
Example which ensures when a rotation transformation is used to replicate a shape the text remains horizontal .............................. 589
Pbs_5950:2000........................................................................................................................................................................................ 604
Page 15 of 903
Tedds 2020 - Function and Field Reference
Fy_EC3 ..................................................................................................................................................................................................... 621
Vtmin_5400............................................................................................................................................................................................. 623
Import/Export........................................................................................................................................................ 635
SaveSectionVarsCalcItem ........................................................................................................................................................................ 636
If .............................................................................................................................................................................................................. 650
IfElseIf...................................................................................................................................................................................................... 651
Or ............................................................................................................................................................................................................ 655
Message................................................................................................................................................................. 657
Page 16 of 903
Tedds 2020 - Function and Field Reference
Message .................................................................................................................................................................................................. 658
Miscellaneous........................................................................................................................................................ 660
ClearCalcItemUsage ................................................................................................................................................................................ 661
ProgressText............................................................................................................................................................................................ 668
SectionGetElasticModulusYY................................................................................................................................................................... 704
Page 17 of 903
Tedds 2020 - Function and Field Reference
SectionGetMajorRadiusOfGyration......................................................................................................................................................... 707
SetDimAnal.............................................................................................................................................................................................. 736
SetErrorMode.......................................................................................................................................................................................... 737
SetShowDataTables................................................................................................................................................................................. 743
Page 18 of 903
Tedds 2020 - Function and Field Reference
StrDecode................................................................................................................................................................................................ 750
StrPadLeft................................................................................................................................................................................................ 764
StringListRange........................................................................................................................................................................................ 779
StrListGet................................................................................................................................................................................................. 784
Page 19 of 903
Tedds 2020 - Function and Field Reference
StrListRange ............................................................................................................................................................................................ 786
GetBaseUnits........................................................................................................................................................................................... 804
Page 20 of 903
Tedds 2020 - Function and Field Reference
InitializeVar ............................................................................................................................................................................................. 833
RenameVar.............................................................................................................................................................................................. 840
EvalMetaFileCalcItem.............................................................................................................................................................................. 869
ShowDrawings......................................................................................................................................................................................... 888
Excel....................................................................................................................................................................... 890
Excel_Link ................................................................................................................................................................................................ 891
Message................................................................................................................................................................. 897
Message .................................................................................................................................................................................................. 898
Miscellaneous........................................................................................................................................................ 899
RunMacro................................................................................................................................................................................................ 900
Page 22 of 903
Tedds 2020 - Function and Field Reference
Math functions
Page 23 of 903
Tedds 2020 - Function and Field Reference
General Functions
Page 24 of 903
Tedds 2020 - Function and Field Reference
Returns a positive square root.
Syntax
( number )
Parameters
number is the number for which you want the square root
Remarks
If number is negative throws an error.
Examples
sqrt(16) = 4.000
sqrt(-9) = ?<Error: square root of a negative number>
sqrt(abs(-25)) = 5.000
Page 25 of 903
Tedds 2020 - Function and Field Reference
Abs
Returns the absolute value of a number. The absolute value of a number if the value without its sign.
Syntax
Abs( number )
Parameters
number the number for which you want the absolute value.
Examples
abs(-4) = 4.000
abs(9) = 9.000
Page 26 of 903
Tedds 2020 - Function and Field Reference
Average
Returns the average (arithmetic mean) of a set of values.
Syntax
Average( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to return the average.
Examples
average( 1, 2, 3, 4, 5 ) = 3.000
average( 12, 6, 2, 19 ) = 9.750
Page 27 of 903
Tedds 2020 - Function and Field Reference
Ceiling
Returns a value rounded up to the specified multiple of significance.
Syntax
Ceiling( number, significance )
Parameters
number is the numeric value you want to round.
Examples
ceiling(pi, 1) = 4.000
ceiling(pi, 0.5) = 3.500
ceiling(pi, 0.01) = 3.150
ceiling(1.234 m, 1 cm) = 1.240 m
Page 28 of 903
Tedds 2020 - Function and Field Reference
Degrees
Returns degrees, minutes and seconds in decimal degrees.
Syntax
Degrees( degrees, minutes, seconds )
Parameters
degrees number of degrees.
Examples
degrees( 360, 0, 0 ) = 360.000
degrees( 30, 10, 5 ) = 30.168
Page 29 of 903
Tedds 2020 - Function and Field Reference
Extremum
Returns the number furthest away from zero in a set of values.
Syntax
Extremum( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to find the extremum.
Examples
extremum( -1, 90, -32, 8 ) = 90.000
extremum( -100, 56, -3 ) = -100.000
Page 30 of 903
Tedds 2020 - Function and Field Reference
Exp
Returns the exponential value of a number. That is, the result is e to the power x, where e is the base of the natural
logarithm.
Syntax
Exp( number )
Parameters
number is the exponent applied to the bas e.
Examples
exp(1) = 2.718
exp(2) = 7.389
Page 31 of 903
Tedds 2020 - Function and Field Reference
Floor
Returns a value rounded down to the specified multiple of significance.
Syntax
Floor( number, significance )
Parameters
number is the numeric value you want to round.
Examples
floor(pi, 1) = 3.000
floor(pi, 0.5) = 3.000
floor(pi, 0.01) = 3.140
floor(1.234m, 1cm) = 1.230 m
Page 32 of 903
Tedds 2020 - Function and Field Reference
Int
Returns the integer part of a number.
Syntax
Int( number, units )
Parameters
number is the number for which you want the integer part.
units is the optional name of the units you want to be used for the calculation of the integer part.
Examples
int( 10.6 ) = 10.000
int( 1.1 ) = 1.000
int( -3.9 ) = -3.000
int( 1006mm, “m” ) = 1.000 m
int( 106mm, “in” ) = 4.000 in
int( -3.9in, “mm” ) = -99.000 mm
Page 33 of 903
Tedds 2020 - Function and Field Reference
InterpLinear
For the specified value of x and a list of x,y pairs return the interpolated value for y. x values must be ordered from
lowest to highest.
Syntax
InterpLinear( x, x1, y1, x2, y2, …xn, yn… )
Parameters
x is the value of x for which the interpolated y value should be returned.
Return Value
Returns the linear interpolation of y. If x < x1 then y1 is returned. If x > xn then yn is returned
Example
InterpLinear (5, 0, 0, 20, 20, 40, 20, 50, 70) = 5.000
InterpLinear (20, 0, 0, 20, 20, 40, 20, 50, 70) = 20.000
InterpLinear (40, 0, 0, 20, 20, 40, 20, 50, 70) = 20.000
InterpLinear (45, 0, 0, 20, 20, 40, 20, 50, 70) = 45.000
InterpLinear (48, 0, 0, 20, 20, 40, 20, 50, 70) = 60.000
InterpLinear (50, 0, 0, 20, 20, 40, 20, 50, 70) = 70.000
Page 34 of 903
Tedds 2020 - Function and Field Reference
Ln
Returns the natural logarithm of a number.
Syntax
Ln( number )
Parameters
number is the positive number for which you want the natural logarithm
Remarks
Ln is the inverse of the Exp function.
Examples
ln( 2.718 ) = 1.000
ln( 7.389 ) = 2.000
Page 35 of 903
Tedds 2020 - Function and Field Reference
Log
Returns the logarithm of a number to base 10.
Syntax
Log( number )
Parameters
number is the positive number for which you want the logarithm.
Examples
log(10) = 1.000
log(100) = 2.000
Page 36 of 903
Tedds 2020 - Function and Field Reference
Max
Returns the largest number in a set of values.
Syntax
Max( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to find the maximum.
Examples
max( 1, 90, 32, 8 ) = 90.000
max( -100, -56, -3 ) = -3.000
Page 37 of 903
Tedds 2020 - Function and Field Reference
Median
Returns the median of a set of values. The median is the number in the middle of the set of values.
Syntax
Median( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to return the median.
Examples
median( 1, 2, 3, 4, 5 ) = 3.000
median( 12, 6, 2, 19 ) = 4.000
Page 38 of 903
Tedds 2020 - Function and Field Reference
Min
Returns the smallest number in a set of values.
Syntax
Min( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to find the minimum.
Examples
min( 1, 90, 32, 8 ) = 1.000
min( -100, -56, -3 ) = -100.000
Page 39 of 903
Tedds 2020 - Function and Field Reference
Mod
Returns the remainder after number is divided by divisor.
Syntax
Mod( number, divisor )
Parameters
number is the number for which you want to find the remainder.
Examples
mod( 7, 2 ) = 1.000
mod( 16.5, 3 ) = 1.500
mod( -12, 5 ) = -2.000
Page 40 of 903
Tedds 2020 - Function and Field Reference
Quotient
Returns the integer part of a division. Use this function when you want to discard the remainder of a division.
Syntax
Quotient( numerator, denominator )
Parameters
numerator is the dividend.
Examples
quotient( 7, 2 ) = 3.000
quotient( 16.5, 3 ) = 5.000
quotient( -12, 5 ) = -2.000
Page 41 of 903
Tedds 2020 - Function and Field Reference
Rand
Returns a pseudorandom integer number greater than or equal to 0 and less than or equal to 1000.
Syntax
Rand()
Examples
rand()=648.000
Page 42 of 903
Tedds 2020 - Function and Field Reference
Round
Returns a number rounded to the specified number of digits.
Syntax
Round( number, numDigits, units )
Parameters
number is the number you want to round
Remarks
If numDigits is greater than zero, then number is rounded to the specified number of decimal places.
if numDigits is less than zero, then number is rounded to the left of the decimal point
Examples
round( 2.13, 1 ) = 2.100
round( 3.186, 1 ) = 3.200
round( -1.798, 1 ) = -1.800
round( 21.66, 0 ) = 22.000
round( 21.8, -1 ) = 20.000
round( 2.13m, 1, “m” ) = 2.100m
round( 2137mm, 1, “in” ) = 84.100in
round( 2.1378m, 0, “mm” ) = 2138.000mm
round( -1.798kN/m, 1, “kN/m” ) = -1.800kN/m
round( 21.66m, 0, “m” ) = 22.000m
round( 21.8m, -1, “m” ) = 20.000m
Page 43 of 903
Tedds 2020 - Function and Field Reference
RoundUp
Returns a number rounded up to the specified number of digits.
Syntax
RoundUp( number, numDigits, units )
Parameters
number is the number you want to round
Remarks
RoundUp behaves like Round, expect that it always rounds a number up.
If numDigits is greater than zero, then number is rounded up to the specified number of decimal places.
if numDigits is less than zero, then number is rounded up to the left of the decimal point
Examples
roundup( 2.13, 1 ) = 2.200
roundup( 3.186, 1 ) = 3.200
roundup( -1.798, 1 ) = -1.800
roundup( 21.66, 0 ) = 22.000
roundup( 21.8, -1 ) = 30.000
roundup( 2.13m, 1, "m" ) = 2.200m
roundup( 2137mm, 1, "in" ) = 84.200in
roundup( 2.1378m, 0, "mm" ) = 2138.000mm
roundup( -1.798kN/m, 1, "kN/m" ) = -1.800kN/m
roundup( 21.66m, 0, "m" ) = 22.000m
roundup( 21.8m, -1, "m" ) = 30.000m
Page 44 of 903
Tedds 2020 - Function and Field Reference
RoundDown
Returns a number rounded down to the specified number of digits.
Syntax
RoundDown( number, numDigits, units )
Parameters
number is the number you want to round
Remarks
RoundDown behaves like Round, expect that it always rounds a number down.
If numDigits is greater than zero, then number is rounded down to the specified number of decimal places.
if numDigits is less than zero, then number is rounded down to the left of the decimal point
Examples
rounddown( 2.13, 1 ) = 2.100
rounddown( 3.186, 1 ) = 3.100
rounddown( -1.798, 1 ) = -1.700
rounddown( 21.66, 0 ) = 21.000
rounddown( 21.8, -1 ) = 20.000
rounddown( 2.13m, 1, "m" ) = 2.100m
rounddown( 2137mm, 1, "in" ) = 84.100in
rounddown( 2.1378m, 0, "mm" ) = 2137.000mm
rounddown( -1.798kN/m, 1, "kN/m" ) = -1.700kN/m
rounddown( 21.66m, 0, "m" ) = 21.000m
rounddown( 21.8m, -1, "m" ) = 20.000m
Page 45 of 903
Tedds 2020 - Function and Field Reference
Sqrt
Returns a positive square root.
Syntax
Sqrt( number )
Parameters
number is the number for which you want the square root
Remarks
If number is negative Sqrt throws an error.
Examples
sqrt(16) = 4.000
sqrt(-9) = ?<Error: square root of a negative number>
sqrt(abs(-25)) = 5.000
Page 46 of 903
Tedds 2020 - Function and Field Reference
Sum
Returns the sum of a set of values.
Syntax
Sum( number1, number[n], …)
Parameters
number1, number[n] are 1 to n numbers for which you want to return the sum.
Examples
sum( 1, 2, 3, 4, 5 ) = 15.000
sum( 12, -2, 8, -4 ) = 14.000
Page 47 of 903
Tedds 2020 - Function and Field Reference
xy
Returns the result of x raised to the power y
Parameters
x is the base number.
Examples
52 = 25.000
33 = 27.000
Page 48 of 903
Tedds 2020 - Function and Field Reference
Trignometric Functions
Page 49 of 903
Tedds 2020 - Function and Field Reference
Sin
Returns the sine of the given angle.
Syntax
Sin( number )
Parameters
number is the angle in degrees for which you want the sine.
Return Value
Sine in degrees.
Examples
sin(1)=0.017
sin(45) = 0.707
sin(90)=1.000
Page 50 of 903
Tedds 2020 - Function and Field Reference
Cos
Returns the cosine of the given angle.
Syntax
Cos( number )
Parameters
number is the angle in degrees for which you want the cosine.
Return Value
Cosine in degrees.
Examples
cos(1)=1.000
cos(45) = 0.707
cos(90)=0.000
Page 51 of 903
Tedds 2020 - Function and Field Reference
Tan
Returns the tangent of the given angle.
Syntax
Tan( number )
Parameters
number is the angle in degrees for which you want the tangent.
Return Value
Tangent in degrees.
Examples
tan(1)=0.017
tan(45) = 1.000
tan(60)=1.732
Page 52 of 903
Tedds 2020 - Function and Field Reference
Cosec
Returns the cosecant of the given angle.
Syntax
Cosec( number )
Parameters
number is the angle in degrees for which you want the cosecant.
Return Value
Cosecant in degrees.
Examples
cosec(1)=57.299
cosec(45) = 1.414
cosec(90)=1.000
Page 53 of 903
Tedds 2020 - Function and Field Reference
Sec
Returns the secant of the given angle.
Syntax
Sec( number )
Parameters
number is the angle in degrees for which you want the secant.
Return Value
Secant in degrees.
Examples
sec(1)=1.000
sec(45) = 1.414
sec(60)=2.000
Page 54 of 903
Tedds 2020 - Function and Field Reference
Cot
Returns the cotangent of the given angle.
Syntax
Cot( number )
Parameters
number is the angle in degrees for which you want the cotangent.
Return Value
Cotangent in degrees.
Examples
cot(1)=57.290
cot(45) = 1.000
cot(60)=0.577
Page 55 of 903
Tedds 2020 - Function and Field Reference
Asin
Returns the inverse sine of a number.
Syntax
Asin( number )
Parameters
number is the number for which you want the inverse sine.
Return Value
Inverse sine in degrees.
Examples
asin(1)=90.000
asin(0.5) = 30.000
Page 56 of 903
Tedds 2020 - Function and Field Reference
Acos
Returns the inverse cosine of a number.
Syntax
Acos( number )
Parameters
number is the number for which you want the inverse cosine.
Return Value
Inverse cosine in degrees.
Examples
acos(1)=0.000
acos(0.5) = 60.000
Page 57 of 903
Tedds 2020 - Function and Field Reference
Atan
Returns the inverse tangent of a number.
Syntax
Atan( number )
Parameters
number is the number for which you want the inverse tangent.
Return Value
Inverse tangent in degrees.
Examples
atan(1)=45.000
atan(0.5) = 26.565
Page 58 of 903
Tedds 2020 - Function and Field Reference
Sinh
Returns the hyperbolic sine of the given angle.
Syntax
Sinh( number )
Parameters
number is the angle in degrees for which you want the hyperbolic sine.
Return Value
Hyperbolic sine in degrees.
Examples
sinh(1)=1.175
sinh(0) = 0.000
sinh(0.5) = 0.521
Page 59 of 903
Tedds 2020 - Function and Field Reference
Cosh
Returns the hyperbolic cosine of the given angle.
Syntax
Cosh( number )
Parameters
number is the angle in degrees for which you want the hyperbolic cosine.
Return Value
Hyperbolic cosine in degrees.
Examples
cosh(1)=1.543
cosh(0) = 1.000
cosh(0.5) = 1.128
Page 60 of 903
Tedds 2020 - Function and Field Reference
Tanh
Returns the hyperbolic tangent of the given angle.
Syntax
Tanh( number )
Parameters
number is the angle in degrees for which you want the hyperbolic tangent.
Return Value
Hyperbolic tangent in degrees.
Examples
tanh(1)=0.762
tanh(0) = 0.000
tanh(0.5) = 0.462
Page 61 of 903
Tedds 2020 - Function and Field Reference
Asinh
Returns the inverse hyperbolic sine of a number.
Syntax
Asinh( number )
Parameters
number is the number for which you want the inverse hyperbolic sine.
Return Value
Inverse hyperbolic sine in degrees.
Examples
asinh(1)=0.881
asinh(90) = 0.000
asinh(45) = 4.500
Page 62 of 903
Tedds 2020 - Function and Field Reference
Acosh
Returns the inverse hyperbolic cosine of a number.
Syntax
Acosh( number )
Parameters
number is the number for which you want the inverse hyperbolic cosine.
Return Value
Inverse hyperbolic cosine in degrees.
Examples
acosh(1)=0.000
acosh(90) = 5.193
acosh(45) = 4.500
Page 63 of 903
Tedds 2020 - Function and Field Reference
Atanh
Returns the inverse hyperbolic tangent of a number.
Syntax
Atanh( number )
Parameters
number is the number for which you want the inverse hyperbolic tangent.
Return Value
Inverse hyperbolic tangent in degrees.
Examples
atanh(0) = 0.000
atanh(0.5) = 0.549
Page 64 of 903
Tedds 2020 - Function and Field Reference
Tedds functions
Page 65 of 903
Tedds 2020 - Function and Field Reference
2D analysis functions
Page 66 of 903
Tedds 2020 - Function and Field Reference
Introduction
The solver is a 2D (XZ plane) linear static analytical solver with shear deformation checking capability.
To use the solver you construct a geometric model from supported and unsupported nodes in 2D space connected by
linear 1D elements that have material and section properties. To simplify loading and results for design purposes
elements can optionally be grouped into spans which are grouped to form design members.
Loading the solver model is achieved by defining load cases that contain node, element and member (point, distributed
and selfweight) loads and moments. Load combinations can also be defined.
More advanced models can be created by adding springs to nodes, using custom coordinate systems, creating elements
from rotated sections, applying element end releases and applying thermal loads.
Once the model has been analysed, it can be queried for base reactions, nodal deflections and reactions. Elements and
members can be queried for axial and shear forces, moments and deflections. By default when results are requested
they are retrieved for all elements in the model and all load combinations, if the model contains load combinations,
otherwise load cases. To retrieve results for a subset of the model you can select specific elements, spans or members.
You can also select specific load cases or load combinations.
Models can be saved and re-loaded using the Import/Export functions. For example the 2D Analysis calculation saves
models to a variable named "_analysisModel". Therefore if you create a model using the solver functions and save it
using the expression _analysisModel = SolvGetXml(), then you can view and modify that model using the 2D analysis
calculation.
Example
Geometry
Models are created using SolvCreateSolver
SolvCreateSolver( ) = 1.000
Define the material(s) and section(s) that will be used in the model
SolvAddMaterial( "Steel", 210 kN/mm2, 7850 kg/m3, 81 kN/mm2 ) = 1.000
SolvAddSection( "UC 203x203x60", 76.37307936 cm2, 6124.513488 cm4,
2064.59815 cm4,
52.60248 cm2, 19.7024 cm2 ) = 1.000
SolvAddSection( "UC 203x203x46", 58.73147936 cm2, 4567.816776 cm4,
1548.2057 cm4,
40.3128 cm2, 14.6304 cm2) = 2.000
SolvAddSection( "UB 406x178x60", 76.51867936 cm2, 21596.26278 cm4,
1203.064151 cm4,
40.98816 cm2, 32.1056 cm2 ) = 3.000
SolvAddSection( "UB 305x127x37", 47.18053864 cm2, 7170.682187 cm4,
336.1743038 cm4,
23.76684 cm2, 21.6124 cm2) = 4.000
SolvAddSection( "CHS 168.3x6.3", 32.06309462 cm2, 1053.420549 cm4,
1053.420549 cm4,
16.03154731 cm2, 16.03154731 cm2 ) = 5.000
Page 67 of 903
Tedds 2020 - Function and Field Reference
Loading
Roof
Dead wdr = 3.5 kN/m2
Imposed wir = 1.0 kN/m2
Page 68 of 903
Tedds 2020 - Function and Field Reference
Floor
Dead wdf = 3.5 kN/m2
Imposed wif = 6.0 kN/m2
Results
Once the model is complete you must analyse the model to obtain the
results
Page 69 of 903
Tedds 2020 - Function and Field Reference
SolvAnalyse( ) = 1.000
Create the expressions that when evaluated will obtain the results
for specific nodes
$1=Sqrt(SolvGetMaxHorizontalDeflection(3)2+SolvGetMaxVerticalDeflect
ion(3)2);$1=1
$2=Sqrt(SolvGetMaxHorizontalDeflection(5)2+SolvGetMaxVerticalDeflect
ion(5)2);$2=2-1
$3=Sqrt(SolvGetMaxHorizontalDeflection(7)2+SolvGetMaxVerticalDeflect
ion(7)2);$3=3-2
$roof=Sqrt(SolvGetMaxHorizontalDeflection(9)2+SolvGetMaxVerticalDefle
ction(9)2);$roof=roof-3
Select the first combination then output the results
SolvSelectCombinations( 1 ) = 1.000
1 = 3.354 mm 1 = 3.354 mm
2 = 6.067 mm 2 = 2.713 mm
3 = 8.386 mm 3 = 2.319 mm
roof = 10.388 mm roof = 2.002 mm
Page 70 of 903
Tedds 2020 - Function and Field Reference
SolvCreateSolver
Creates a new solver model. A solver model must be created before any other solver functions can be used.
Syntax
SolvCreateSolver( areaLoading, units )
Parameters
areaLoading optional, True to use area loading, default is False
units optional “SI” or “US” units used in interfaces and drawings, if omitted defaults to Tedds base unit setting
Remarks
The area loading parameter is used to replicate a basic 3D model within the 2D solver by treating the model as having
unit length depth. Once a model has been created with area loading a few changes are made to the dimensions
expected/returned by certain solver functions to incorporate this per unit length change:
SolvAddSection
Area parameter: (mm, in) this is now the thickness of the section (as it has unit length depth)
Inertia parameters: (cm3, in3) this is now the inertia per unit length
ShearArea parameters: (mm, in) this is now the shear area per unit length
SolvAddSpringX/SolvAddSpringZ
Stiffner parameters: (kN/m2, kip/ft2) this is now the stiffner tension per unit length
SolvAddRotationalSpring
Stiffner parameter: (kN/°, kip/°) this is now the stiffner tension per unit length
Return Value
Numeric identifier that uniquely identifies the newly created solver model.
Page 71 of 903
Tedds 2020 - Function and Field Reference
SolvSetActiveSolver
Sets the currently active solver model.
Syntax
SolvSetActiveSolver( id )
Parameters
id unique identifier of the solver model to activate (as returned by SolvCreateSolver).
Remarks
If a solver model is deactivated (by setting another solver model as the active model) analysis will have to be repeated to
request results at custom locations, using SolvSelectResultsPosition.
Return Value
1 if successful, otherwise 0.
Page 72 of 903
Tedds 2020 - Function and Field Reference
SolvGetActiveSolver
Returns the Id of the active solver model.
Syntax
SolvGetActiveSolver()
Return Value
Unique Id of the active solver model or zero if a solver model does not exist.
Page 73 of 903
Tedds 2020 - Function and Field Reference
SolvGetSolverCount
Returns the number of solver models that currently exist.
Syntax
SolvGetSolverCount()
Return Value
Total number of solver models that currently exist.
Page 74 of 903
Tedds 2020 - Function and Field Reference
SolvAnalyse/SolvAnalyze
Analyses the solver model so that the calculated results can be returned using the other functions in the solver function
library.
Syntax
SolvAnalyse/SolvAnalyze()
Return Value
1 if successful, otherwise 0.
Page 75 of 903
Tedds 2020 - Function and Field Reference
SolvAddCoordinateSystem
Adds a new coordinate system to the active solver model.
Syntax
SolvAddCoordinateSystem( name, rotation )
Parameters
name name of the coordinate system which must be unique
rotation angle of rotation () of the new coordinate systems X axis from the global x axis
originX x coordinate (m, ft) of the origin of the new coordinate system
originZ z coordinate (m, ft) of the origin of the new coordinate system
xAxisX x coordinate (m, ft) of a point on the new coordinate systems X axis
xAxisZ z coordinate (m, ft) of a point on the new coordinate systems X axis
Return Value
Unique numeric identifier of the created coordinate system; 0 if a coordinate system could not be created.
Materials
SolvAddMaterial( name, youngs, density, shear, thermal )
Page 76 of 903
Tedds 2020 - Function and Field Reference
SolvAddMaterial
Adds a new material to the active solver model.
Syntax
SolvAddMaterial( name, youngs, density, shear, thermalCoefficient, source )
Parameters
name name of material which must be unique
youngs youngs modulus (kN/mm2, ksi)
density optional density (kg/m3, lbm/ft3), default is 0
shear optional shear modulus (kN/mm2, ksi) which is required to calculate shear deformation (The corresponding
element section must have a shear area value provided), default is 0 – no shear deformation check
thermalCoefficient optional thermal coefficient (C-1) required for uniform temperature loads, default is 0
source optional source reference data which specifies the source of the material properties, default is “”
Return Value
Unique numeric identifier of the created material; 0 if a material could not be created.
Remarks
In order that the solver can perform shear deformation checks on elements the material must have a shear modulus
provided and the section must have shear area provided.
Page 77 of 903
Tedds 2020 - Function and Field Reference
SolvSetMaterial
Sets the material of all the elements in the current selection in the active solver model. To use a material that already
exists all parameters must match those of the pre-existing material, otherwise a new material will be created. Any
materials that were referenced by the selected elements which are no longer referenced by any elements within the
model after the new material has been set will be removed from the model.
Syntax
SolvSetMaterial( name, youngs, density, shear, thermalCoefficient, source )
Parameters
name name of material which must be unique for a new material
youngs youngs modulus (kN/mm2, ksi)
density optional density (kg/m3, lbm/ft3), default is 0
shear optional shear modulus (kN/mm2, ksi) which is required to calculate shear deformation (The corresponding
element section must have a shear area value provided), default is 0 – no shear deformation check
thermalCoefficient optional thermal coefficient (C-1) required for uniform temperature loads
source optional source reference data which specifies the source of the material properties
Return Value
Unique numeric identifier of the material now in use; 0 if the function failed to assign a material because a material with
the specified name was already in use with different properties.
Remarks
In order that the solver can perform shear deformation checks on elements the material must have a shear modulus
provided and the section must have shear area provided.
Sections
SolvAddSection( name, area, majorInertia )
Page 78 of 903
Tedds 2020 - Function and Field Reference
SolvAddSection
Adds a new section to the active solver model.
Syntax
SolvAddSection( name, area, majorInertia )
Parameters
name name of the section which must be unique
area cross sectional area (mm2, in2)
majorInertia second moments of area (Major axis) (cm4, in4)
minorInertia optional Second moments of area (Minor axis) (cm4, in4) required for elements using rotated sections
shearAreaParallelMinor optional Effective shear area (mm2, in2) when loading parallel to the Minor axis. Corresponding section must
provide a shear modulus for a shear deformation check
shearAreaParallelMajor optional Effective shear area (mm2, in2) when loading parallel to the Major axis, required for elements using
rotated sections. Corresponding section must provide a shear modulus for a shear deformation check
source optional source reference data which specifies the source of the section properties
Return Value
Unique numeric identifier of the created section; 0 if a section could not be created.
Remarks
In order that the solver can perform shear deformation checks on elements the material must have a shear modulus
provided and the section must have shear area provided.
Elements can be created with rotated (90) sections using SolvAddElement. To do this the section must have been
created with additional values for the second moments of area (minor axis) and, if shear deformation checks are
required, the effective shear area when loading parallel to the major axis.
Page 79 of 903
Tedds 2020 - Function and Field Reference
SolvSetSection
Sets the section of all the elements in the current selection in the active solver model. To use a section that already exists
all parameters must match those of the pre-existing section, otherwise a new section will be created. Any sections that
were referenced by the selected elements which are no longer referenced by any elements within the model after the
new section has been set will be removed from the model.
Syntax
SolvSetSection( name, area, majorInertia )
Parameters
name name of the section which must be unique for a new section
area cross sectional area (mm2, in2)
majorInertia second moments of area (Major axis) (cm4, in4)
minorInertia optional Second moments of area (Minor axis) (cm4, in4) required for elements using rotated sections
shearAreaParallelMinor optional Effective shear area (mm2, in2) when loading parallel to the Minor axis. Corresponding section must
provide a shear modulus for a shear deformation check
shearAreaParallelMajor optional Effective shear area (mm2, in2) when loading parallel to the Major axis, required for elements using
rotated sections. Corresponding section must provide a shear modulus for a shear deformation check
source optional source reference data which specifies the source of the section properties
Return Value
Unique numeric identifier of the section now in use; 0 if the function failed to assign a section because a section with the
specified name was already in use with different properties.
Remarks
In order that the solver can perform shear deformation checks on elements the material must have a shear modulus
provided and the section must have shear area provided.
Elements can be created with rotated (90) sections using SolvAddElement. To do this the section must have been
created with additional values for the second moments of area (minor axis) and, if shear deformation checks are
required, the effective shear area when loading parallel to the major axis.
Nodes
SolvAddNode( x, z )
Page 80 of 903
Tedds 2020 - Function and Field Reference
SolvAddNode
Adds a new node to the active solver model.
Syntax
SolvAddNode( x, z )
SolvAddNode( x, z, freedom )
SolvAddNode( x, z, coordinateSystem )
Parameters
x x location of the node
z z location of the node
freedom optional freedom of the node
freedomX optional translational freedom in the x direction
freedomZ optional translational freedom in the z direction
freedomRotational optional rotational freedom
coordinateSystem optional name or index of a user defined coordinate system for the node. The default is none, (the global
coordinate system), but can be changed with the SolvSetDefaultNodeCoordSystem function
Remarks
The following table lists the possible values for freedom. The default freedom is pinned, but can be changed with the
SolvSetDefaultNodeFreedom function.
Name Description
“Fixed” Node cannot translate or rotate.
“Free” Node is free to translate and rotate.
“Pinned” Node cannot translate but can rotate.
“RollerPinX” Node can translate in x direction and
rotate.
“RollerPinZ” Node can translate in z direction and
rotate.
The following table lists the possible values for freedomX, freedomZ and freedomRotational.
Page 81 of 903
Tedds 2020 - Function and Field Reference
Name Description
“Fixed” Node cannot translate or rotate.
“Free” Node is free to translate or rotate.
Return Value
Unique numeric identifier of the created node; 0 if a node could not be created.
Page 82 of 903
Tedds 2020 - Function and Field Reference
SolvAddNodes
Adds new nodes to the active solver model.
Syntax
SolvAddNodes( x1, z1, … x[n], z[n] )
Parameters
x1 x location of the first node
z1 z location of the first node
coordinates comma separated list of the coordinates in x1, z1, x2, z2, … x[n], z[n] format
units optional string containing the unit of length in which the coordinates are specified
Remarks
Nodes will be added using the default node freedom and user coordinate system. These defaults can be changed using
the SolvSetDefaultNodeFreedom and SolvSetDefaultNodeCoordSystem functions.
Return Value
Unique numeric identifier of the first created node; 0 if nodes could not be created. The subsequent nodes will have
sequential identifiers.
SolvSetDefaultNodeFreedom( freedom )
Page 83 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultNodeFreedom
Sets the default freedom for new nodes added to the active solver model.
Syntax
SolvSetDefaultNodeFreedom( freedom )
Parameters
freedom freedom for new nodes
freedomX translational freedom in the x direction for new nodes
freedomZ translational freedom in the z direction for new nodes
freedomRotational rotational freedom for new nodes
Remarks
The following table lists the possible values for freedom. The default freedom is initially pinned.
Name Description
“Fixed” Node cannot translate or rotate.
“Free” Node is free to translate and rotate.
“Pinned” Node cannot translate but can rotate.
“RollerPinX” Node can translate in x direction and
rotate.
“RollerPinZ” Node can translate in z direction and
rotate.
The following table lists the possible values for freedomX, freedomZ and freedomRotational.
Name Description
“Fixed” Node cannot translate or rotate.
“Free” Node is free to translate or rotate.
Return Value
1 if successful, otherwise 0.
SolvSetDefaultNodeCoordSystem( coordinateSystem )
Page 84 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultNodeCoordSystem
Sets the default user coordinate system for new nodes added to the active solver model.
Syntax
SolvSetDefaultNodeCoordSystem( coordinateSystem )
Parameters
coordinateSystem name or index of a user defined coordinate system for new nodes. The default is initially none, (the global
coordinate system)
Return Value
1 if successful, otherwise 0.
Page 85 of 903
Tedds 2020 - Function and Field Reference
SolvSetNodeLabel
Sets a user defined label for the specified node in the active solver model.
Syntax
SolvSetNodeLabel( node, label )
Parameters
node index of the node to label
label label to attach to the specified node, maximum of 4 characters
Return Value
1 if successful, otherwise 0.
Page 86 of 903
Tedds 2020 - Function and Field Reference
SolvAddSpringX
Adds a support spring to a node along the local x axis of the node. This function also ensures that the node is free to
move along its x axis so that the spring is effective.
Syntax
SolvAddSpringX( node, stiffner )
Parameters
node identifier or label of node to add a spring to
stiffner stiffner value (kN/m, kip/ft) of the spring
Return Value
Unique numeric identifier of the created spring; 0 if a spring could not be created.
Page 87 of 903
Tedds 2020 - Function and Field Reference
SolvAddSpringZ
Adds a support spring to a node along the local z axis of the node. This function also ensures that the node is free to
move along its z axis so that the spring is effective.
Syntax
SolvAddSpringZ( node, stiffner )
Parameters
node identifier or label of node to add a spring to
stiffner stiffner value (kN/m, kip/ft) of the spring
Return Value
Unique numeric identifier of the created spring; 0 if a spring could not be created.
Page 88 of 903
Tedds 2020 - Function and Field Reference
SolvAddRotationalSpring
Adds a rotational support spring to a node. This function also ensures that the node is free to rotate so that the spring is
effective.
Syntax
SolvAddRotationalSpring( node, stiffner )
Parameters
node identifier or label of node to add a spring to
stiffner stiffner value (kNm/°, kip_ft/°) of the spring
Return Value
Unique numeric identifier of the created spring; 0 if a spring could not be created.
Elements/spans/members
SolvAddElement( nodeStart, nodeEnd, section, material, rotated )
Page 89 of 903
Tedds 2020 - Function and Field Reference
SolvAddElement
Adds a new 1D element to the active solver model.
Syntax
SolvAddElement( nodeStart, nodeEnd, section, material, rotated )
Parameters
nodeStart identifier of node at start of element
nodeEnd identifier of node at end of element
section optional name or identifier of element section. The default section is the first section added to the model but
can be changed using SolvSetDefaultElementSection
material optional name or identifier of element material. The default material is the first material added to the model
but can be changed using SolvSetDefaultElementMaterial
rotated optional value, True(1) or False(0), to specify whether the section used for this element should be rotated.
The default is an non-rotated section but can be changed using SolvSetDefaultElementRotation. If true the
section must have been defined with a second moments of area (Minor axis)
momentReleaseStart optional moment release of start of element
momentReleaseEnd optional moment release of end of element
axialRelease optional axial release of element
Remarks
The following table lists the possible moment releases. The default moment releases are fixed, but can be changed using
SolvSetDefaultElementReleases.
Name Description
“Fixed” End of element can transmit bending moments to
the node.
“Free” End of element cannot transmit bending
moments to the node.
The following table lists the possible axial releases. The default axial release is fixed, but can be changed using
SolvSetDefaultElementReleases.
Name Description
“Fixed” Ends of element can transmit axial forces to the
node.
“Start” Start of element cannot transmit axial forces to
the node.
Page 90 of 903
Tedds 2020 - Function and Field Reference
Return Value
Unique numeric identifier of the created element; 0 if an element could not be created.
Page 91 of 903
Tedds 2020 - Function and Field Reference
SolvAddElements
Adds new 1D elements to the active solver model.
Syntax
SolvAddElements( nodeStart1, nodeEnd1, … nodeStart[n], nodeEnd[n] )
SolvAddElements( nodes )
Parameters
nodeStart1 identifier of node at start of first element
nodeEnd1 identifier of node at end of first element
nodes comma separated list of the nodes in nodeStart1, nodeEnd1, nodeStart2, nodeEnd2, … nodeStart[n],
nodeEnd[n] format
Remarks
The elements added will have the default element section, material, rotation and releases. These defaults can be
changed using the SolvSetDefaultElementSection, SolvSetDefaultElementMaterial, SolvSetDefaultElementRotation and
SolvSetDefaultElementReleases functions.
Return Value
Unique numeric identifier of the first created element; 0 if elements could not be created. The subsequent elements will
have sequential identifiers.
Page 92 of 903
Tedds 2020 - Function and Field Reference
SolvAddSpan
Adds a new span to the specified member.
Syntax
SolvAddSpan( member, element1, … element[n] )
Parameters
member name or identifier of the member to which the span should be added
element1 identifier of the first element in the elements first span
element[n] optional identifier of the nth element in the elements first span
Remarks
A span must consist of one or more collinear elements that all have the same rotation. The end node of element (n) must
be the first node of element (n+1). Flexural deflection and rotation is continuous within a span. Rotational releases may
be applied at the start, and/or end of span but not internally. Additionally, if the span is a cantilever no rotational
releases should be applied to that span or the next. An axial/torsional release may be applied at either the start or end of
a span but not internally. Additionally, if the span is a cantilever no axial/torsional releases should be applied to that span
at all.
Return Value
1 if successful, otherwise 0.
Page 93 of 903
Tedds 2020 - Function and Field Reference
SolvAddMember
Adds a new member to the active solver model.
Syntax
SolvAddMember( name, supportedStart, supportedEnd, element1, … element[n] )
Parameters
name name of member
supportedStart optional whether the first span of the member is supported at the start (rather than a cantilever), default is
True(1). If the member only has one span one of supportedStart and supportedEnd must be True(1)
supportedEnd optional whether the last span of the member is supported at the end (rather than a cantilever), default is
True(1). If the member only has one span one of supportedStart and supportedEnd must be True(1)
element1 optional identifier of the first element in the elements first span
element[n] optional identifier of the nth element in the elements first span
Remarks
A member must consist of 1 or more spans, which themselves consist of one or more elements that all have the same
rotation. The end node of the last element of span (n) must be the first node of the first element of span (n+1). When
creating the member the elements that make up the first span can be provided (as above) if desired. If no elements are
provided then a member will be created with no spans. Additional spans can be added using SolvAddSpan. See
SolvAddSpan for the constraints placed on elements within a span.
Return Value
Unique numeric identifier of the created member; 0 if a member could not be created.
SolvSetDefaultElementSection( section )
Page 94 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultElementSection
Sets the default section used when adding new elements to the active solver model.
Syntax
SolvSetDefaultElementSection( section )
Parameters
section name or identifier of section for new elements. The default section is initially the first section added to the
model
Return Value
1 if successful, otherwise 0.
SolvSetDefaultElementMaterial( material )
Page 95 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultElementMaterial
Sets the default material used when adding new elements to the active solver model.
Syntax
SolvSetDefaultElementMaterial( material )
Parameters
material name or identifier of material for new elements. The default material is initially the first material added to the
model
Return Value
1 if successful, otherwise 0.
SolvSetDefaultElementRotation( rotated )
Page 96 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultElementRotation
Sets the default rotation for new elements added to the active solver model.
Syntax
SolvSetDefaultElementRotation( rotated )
Parameters
rotated True(1) or False(0), to specify whether the section used for new elements should be rotated. The default is
initially non-rotated sections. If true the section must have been defined with a second moments of area
(Minor axis)
Return Value
1 if successful, otherwise 0.
Page 97 of 903
Tedds 2020 - Function and Field Reference
SolvSetDefaultElementReleases
Sets the default releases for new elements added to the active solver model.
Syntax
SolvSetDefaultElementReleases( momentReleaseStart, momentReleaseEnd, axialRelease )
Parameters
momentReleaseStart moment release of start of new elements
momentReleaseEnd moment release of end of new elements
axialRelease axial release of new elements
Remarks
The following table lists the possible moment releases. The default moment releases are initially fixed.
Name Description
“Fixed” End of element can transmit bending moments to
the node.
“Free” End of element cannot transmit bending
moments to the node.
The following table lists the possible axial releases. The default axial release is initially fixed.
Name Description
“Fixed” Ends of element can transmit axial forces to the
node.
“Start” Start of element cannot transmit axial forces to
the node.
“End” End of element cannot transmit axial forces to
the node.
Return Value
1 if successful, otherwise 0.
Page 98 of 903
Tedds 2020 - Function and Field Reference
SolvSetElementRotation
Sets the section rotation of the specified element.
Syntax
SolvSetElementRotation( element, rotated )
Parameters
element the Index of the element
rotated True(1) or False(0), to specify whether the section used for the element should be rotated. If True the section
must have been defined with a second moment of area (Minor axis)
Return Value
1 if successful, otherwise 0.
Page 99 of 903
Tedds 2020 - Function and Field Reference
SolvSetMemberRotation
Sets the section rotation of all the elements in the specified design member.
Syntax
SolvSetMemberRotation( member, rotated )
Parameters
member the name or index of the member
rotated True(1) or False(0), to specify whether the section used for the members elements should be rotated. If True
the section must have been defined with a second moment of area (Minor axis)
Return Value
1 if successful, otherwise 0.
Loads
SolvAddLoadCase( name, selfWeight )
SolvAddLoadCase
Adds a new load case to the active solver model.
Syntax
SolvAddLoadCase( name, selfWeight )
Parameters
name name of load case
selfWeight optional self weight load factor, default is 0
Return Value
Unique numeric identifier of the created load case; 0 if a load case could not be created.
SolvAddCombination( name )
SolvAddCombination
Adds a new load combination to the active solver model.
Syntax
SolvAddCombination( name, type, source )
Parameters
name name of load combination
type type of load combination
source optional source reference data which specifies the source of the load combination
Remarks
The following table lists the possible values for type.
Name
“None”
“Strength”
“Service”
“Quasi”
Return Value
Unique numeric identifier of the created load combination; 0 if a load combination could not be created.
SolvAddCombinationLoadCase
Adds a load case to the specified load combination in the active solver model.
Syntax
SolvAddCombinationLoadCase( combination, loadCase, factor )
Parameters
combination identifier of the load combination, created using SolvAddCombination, to add to
loadCase name or identifier of the load case to add to the load combination
factor load factor to apply to the load case in this load combination
Remarks
Adds a load case to a load combination in the active solver model that was created using SolvAddCombination.
Return Value
1 if successful, otherwise 0.
Node
SolvAddNodeLoad( node, loadCase, loadX, loadZ, moment )
SolvAddNodeLoad
Adds a new point load to the specified node.
Syntax
SolvAddNodeLoad( node, loadCase, loadX, loadZ, moment )
Parameters
node identifier or label of the node that the load applies to
loadCase name or identifier of the load case to add load to
loadX load (kN, kips) to be applied to node in local x direction
loadZ load (kN, kips) to be applied to node in local z direction
moment optional moment (kNm, kip_ft) to be applied to node
Return Value
1 if successful, otherwise 0.
SolvAddNodeDisplacement
Adds a new displacement/settlement load to the specified node.
Syntax
SolvAddNodeDisplacement( node, loadCase, translationX, translationZ, rotation)
Parameters
node identifier or label of node that the load applies to
loadCase name or identifier of load case to add load to
translationX displacement (m, ft) to be applied to node in local x direction
translationZ displacement (m, ft) to be applied to node in local z direction
rotation optional rotation () to be applied to node
Return Value
1 if successful, otherwise 0.
Element
SolvAddElementPointLoad( element, loadCase, load, pos, orient )
SolvAddElementPointLoad
Adds a new point load to the specified element.
Syntax
SolvAddElementPointLoad( element, loadCase, load, position, orientation )
Parameters
element identifier of element that the load applies to
loadCase name or identifier of load case to add load to
load load (kN, kips) to be applied
position distance from start node of element to point load (m, ft), OR, ratio of position from node start to end where
point load is applied (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
Return Value
1 if successful, otherwise 0.
SolvAddElementPointMoment
Adds a new point moment to the specified element.
Syntax
SolvAddElementPointMoment( element, loadCase, moment, position )
Parameters
element identifier of element that the moment applies to
loadCase name or identifier of load case to add moment to
moment moment (kNm, kip_ft) to be applied (+ve is clockwise)
position distance from start node of element to point moment (m, ft), OR, ratio of position from start to end where
point moment is applied (dimensionless)
Return Value
1 if successful, otherwise 0.
SolvAddElementUDL
Adds a new universally distributed load (UDL) to the specified element.
Syntax
SolvAddElementUDL( element, loadCase, load, startPosition, endPosition, orientation )
Parameters
element identifier of element that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied across range
startPosition distance from start node of element to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of element to where load ends (m, ft), OR, ratio of position from start to end where
load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddElementVDL
Adds a new variable distributed load (VDL) to the specified element.
Syntax
SolvAddElementVDL( element, loadCase, startLoad, endLoad, startPosition, endPosition, orientation )
Parameters
element identifier of element that the load applies to
loadCase name or identifier of load case to add load to
startLoad load (kN/m, kips/ft) to be applied at start of range
endLoad load (kN/m, kips/ft) to be applied at end of range
startPosition distance from start node of element to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of element to where load ends (m, ft), OR, ratio of position from start to end where
load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddElementTrapezoidalLoad
Adds a new variable trapezoidal load to the specified element.
Syntax
SolvAddElementTrapezoidalLoad( element, loadCase, load, startPosition, endPosition, orientation )
Parameters
element identifier of element that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied between start and end position
startPosition distance from start node of element to where uniform load starts (m, ft), OR, ratio of position from start to
end where uniform load starts (dimensionless)
endPosition distance from start node of element to where uniform load ends (m, ft), OR, ratio of position from start to
end where uniform load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddElementUniformTemperature
Adds a new variable uniform temperature load to the specified element.
Syntax
SolvAddElementUniformTemperature( element, loadCase, temperature )
Parameters
element identifier of element that the load applies to
loadCase name or identifier of load case to add load to
temperature temperature (C) to apply to element
Remarks
In order to add a temperature load the material must have been defined with a temperature coefficient when it was
created using SolvAddMaterial.
Return Value
1 if successful, otherwise 0.
Span
SolvAddSpanPointMoment( member, span, loadCase, moment, pos )
SolvAddSpanPointMoment
Adds a new point moment to the specified span.
Syntax
SolvAddSpanPointMoment( member, span, loadCase, moment, position )
Parameters
member name or identifier of member that the moment applies to
span identifier of span that the moment applies to
loadCase name or identifier of load case to add moment to
moment moment (kNm, kip_ft) to be applied
position distance from start node of span to point moment (m, ft), OR, ratio of position where point moment is
applied (dimensionless)
Return Value
1 if successful, otherwise 0.
SolvAddSpanPointLoad
Adds a new point load to the specified span.
Syntax
SolvAddSpanPointLoad( member, span, loadCase, load, position, orientation )
Parameters
member name or identifier of member that the load applies to
span identifier of span that the load applies to
loadCase name or identifier of load case to add load to
load load (kN, kips) to be applied
position distance from start node of span to point load (m, ft), OR, ratio of position from start to end where point load
is applied (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
Return Value
1 if successful, otherwise 0.
SolvAddSpanUDL
Adds a new universally distributed load (UDL) to the specified span.
Syntax
SolvAddSpanUDL( member, span, loadCase, load, startPosition, endPosition, orientation )
Parameters
Member name or identifier of member that the load applies to
span identifier of span that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied across range
startPosition distance from start node of span to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of span to where load ends (m, ft), OR, ratio of position from start to end where load
ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddSpanVDL
Adds a new variable distributed load (VDL) to the specified span.
Syntax
SolvAddSpanVDL( member, span, loadCase, startLoad, endLoad, startPosition, endPosition, orientation )
Parameters
member name or identifier of member that the load applies to
span identifier of span that the load applies to
loadCase name or identifier of load case to add load to
startLoad load (kN/m, kips/ft) to be applied at start of range
endLoad load (kN/m, kips/ft) to be applied at end of range
startPosition distance from start node of span to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of span to where load ends (m, ft), OR, ratio of position from start to end where load
ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddSpanTrapezoidalLoad
Adds a new variable trapezoidal load to the specified span.
Syntax
SolvAddSpanTrapezoidalLoad( member, span, loadCase, load, startPosition, endPosition, orientation )
Parameters
member name or identifier of member that the load applies to
span identifier of span that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied between start and end position
startPosition distance from start node of span to where uniform load starts (m, ft), OR, ratio of position from start to end
where uniform load starts (dimensionless)
endPosition distance from start node of span to where uniform load starts (m, ft), OR, ratio of position from start to end
where uniform load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddSpanUniformTemperature
Adds a new variable uniform temperature load to the specified span.
Syntax
SolvAddSpanUniformTemperature( member, span, loadCase, temperature )
Parameters
member name or identifier of member that the load applies to
span identifier of span that the load applies to
loadCase name or identifier of load case to add load to
temperature temperature (C) to apply to span
Remarks
In order to add a temperature load the material must have been defined with a temperature coefficient in
SolvAddMaterial.
Return Value
1 if successful, otherwise 0.
Member
SolvAddMemberPointMoment( member, loadCase, moment, pos )
SolvAddMemberPointMoment
Adds a new point moment to the specified member.
Syntax
SolvAddMemberPointMoment( member, loadCase, moment, position )
Parameters
member name or identifier of member that the moment applies to
loadCase name or identifier of load case to add moment to
moment moment (kNm, kip_ft) to be applied
position distance from start node of member to point moment (m, ft), OR, ratio of position where point moment is
applied (dimensionless)
Return Value
1 if successful, otherwise 0.
SolvAddMemberPointLoad
Adds a new point load to the specified member.
Syntax
SolvAddMemberPointLoad( member, loadCase, load, position, orientation )
Parameters
member name or identifier of member that the load applies to
loadCase name or identifier of load case to add load to
load load (kN, kips) to be applied
position distance from start node of member to point load (m, ft), OR, ratio of position from start to end where point
load is applied (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
Return Value
1 if successful, otherwise 0.
SolvAddMemberRollingPointLoads
Adds a new rolling load train consisting of multiple point loads to the specified member.
Syntax
SolvAddMemberRollingPointLoads( member, allowOffEnd, intervals, load1, position[n], load[n], … )
Parameters
member name or identifier of the member to which the loads should be added
allowOffEnd When positioning the load train close to the start or end of the beam this option determines whether the
loads in the load train are allowed to lie off the beam or whether they must lie completely on the beam.
intervals Determines the number of locations to position the load train on each span. The load train is positioned at
the end of each interval with each load in the load train located at that position. The load train is also
positioned at the mid span about the centre of gravity of the load train.
load1 First load in the load train (kN or kips).
position[n] Position of the nth load in the load train (m or ft)
load[n] nth load in the load train (kN or kips).
Remarks
Rolling loads are simulated by positioning the load train at numerous intervals along the member. The load train is
positioned at the end of each interval with each load in the load train located at that position. The load train is also
positioned at the mid span about the centre of gravity of the load train. For each position of the load train a separate
load case is created which includes the point loads for that position. The function returns the number of load cases which
were added so that the caller can then set the load combination factors which may be required to combine the rolling
loads with the member self weight or any other applied loading.
The sequence of wheel loads is defined in the opposite direction to the sequence of spans, i.e. the first defined load is at
the front of the load train. For non-symmetrical load trains, the analysis should be repeated with a mirror image of the
load train (where this is physically possible in the real structure) to obtain the worst load effects at each location.
Return Value
The number of load cases which were created to simulate the rolling loads.
SolvAddMemberUDL
Adds a new universally distributed load (UDL) to the specified member.
Syntax
SolvAddMemberUDL( member, loadCase, load, startPosition, endPosition, orientation )
Parameters
Member name or identifier of member that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied across range
startPosition distance from start node of member to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of member to where load ends (m, ft), OR, ratio of position from start to end where
load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddMemberVDL
Adds a new variable distributed load (VDL) to the specified member.
Syntax
SolvAddMemberVDL( member, loadCase, startLoad, endLoad, startPosition, endPosition, orientation )
Parameters
member name or identifier of member that the load applies to
loadCase name or identifier of load case to add load to
startLoad load (kN/m, kips/ft) to be applied at start of range
endLoad load (kN/m, kips/ft) to be applied at end of range
startPosition distance from start node of member to where load starts (m, ft), OR, ratio of position from start to end where
load starts (dimensionless)
endPosition distance from start node of member to where load ends (m, ft), OR, ratio of position from start to end where
load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddMemberTrapezoidalLoad
Adds a new variable trapezoidal load to the specified member.
Syntax
SolvAddMemberTrapezoidalLoad( member, loadCase, load, startPosition, endPosition, orientation )
Parameters
member name or identifier of member that the load applies to
loadCase name or identifier of load case to add load to
load load (kN/m, kips/ft) to be applied between start and end position
startPosition distance from start node of member to where uniform load starts (m, ft), OR, ratio of position from start to
end where uniform load starts (dimensionless)
endPosition distance from start node of member to where uniform load starts (m, ft), OR, ratio of position from start to
end where uniform load ends (dimensionless)
orientation optional orientation of load
Remarks
The following table lists the possible orientations. The default orientation is “LocalZ”.
Name Description
“LocalX” Load is applied parallel to element x axis.
“LocalZ” Load is applied parallel to element z axis.
“GlobalX” Load is applied parallel to global x axis.
“GlobalZ” Load is applied parallel to global z axis.
“ProjectedX” Load is applied parallel to global x axis, over the
projected length.
“ProjectedZ” Load is applied parallel to global z axis, over the
projected length.
Return Value
1 if successful, otherwise 0.
SolvAddMemberUniformTemperature
Adds a new variable uniform temperature load to the specified member.
Syntax
SolvAddMemberUniformTemperature( member, loadCase, temperature )
Parameters
member name or identifier of member that the load applies to
loadCase name or identifier of load case to add load to
temperature temperature (C) to apply to member
Remarks
In order to add a temperature load the material must have been defined with a temperature coefficient in
SolvAddMaterial.
Return Value
1 if successful, otherwise 0.
SolvDeleteAllCombinations
Deletes all the load combinations defined in the active solver model.
Syntax
SolvDeleteAllCombinations()
Return Value
The number of load combinations which were deleted.
SolvDeleteAllLoadCases
Deletes all the load cases defined in the active solver model.
Syntax
SolvDeleteAllLoadCases( deleteCombinations )
Parameters
deleteCombinations Optional, determines whether all the load combinations are also deleted, default is True
Remarks
If the option to delete all of the load combinations is not enabled then the combinations which remain will effectively be
empty because there are no associated load cases. Subsequent processing can be used to add new load cases to these
existing combinations.
Return Value
The number of load cases which were deleted.
SolvCreateDrawing
Create a solver drawing.
Syntax
SolvCreateDrawing( output, type )
Parameters
output output medium to optimise the generated drawing for
type type of drawing to create
orientation optional orientation of the generated drawing. The default is “Global”
orientationElement optional identifier of the element to base orientation on when generating the drawing, or 0 to use the first
element in the current selection. This parameter is only used when orientation is “Local”. The default
orientation element is the first element in the current selection
stringOrientation optional orientation for strings in the generated drawing
results1 optional results to show. Only required if type is “Diagram” or “Envelope”
Remarks
The following table lists the possible values for output.
Name Description
“Document” Generated drawing is optimised for document
output.
“Screen” Generated drawing is optimised for screen
output.
Name Description
“None” Blank drawing ready for subsequent drawing
layers to be drawn
“InputGeometry” Drawing will show the geometry of the input
model.
“Loading” Drawing will show the loading on the input
model.
The following table lists the possible values for orientation. The default is “Global”.
Name Description
“Global” Generated drawing is created relative to global
axis.
“Local” Generated drawing is created relative to
orientationElement.
The following table lists the possible values for stringOrientation. The default is “Horizontal”.
Name Description
“Horizontal” Text is drawn horizontally.
“Parallel” Text is drawn parallel to element.
“Perpendicular” Text is drawn perpendicular to element.
“Vertical” Text is drawn vertically
The following table lists the possible values for results[n]. The default is “Moment”.
Name Description
“AxialDeflection” Draw axial deflection diagram/envelope.
“AxialForce” Draw axial force diagram/envelope.
“Deflection” Draw deflection diagram/envelope.
“Moment” Draw moment diagram/envelope.
“Shear” Draw shear diagram/envelope.
Return Value
Numeric identifier that uniquely identifies the newly created drawing.
SolvDrawAttach
Attach to an existing drawing.
Syntax
SolvDrawAttach( output, orientation, orientationElement, stringOrientation, includeOrigin, border )
Parameters
output optional output medium to optimise the drawing for
orientation optional orientation of the drawing. The default is “Global”
orientationElement optional identifier of the element to base orientation on when generating the drawing, or 0 to use the first
element in the current selection. This parameter is only used when orientation is “Local”. The default
orientation element is the first element in the current selection
stringOrientation optional orientation for strings in the drawing
includeOrigin optional If True the origin is included in the drawing even if it is outside the bounds of the model. If False the
origin is only included in the drawing if it is within the bounds of the model. The default is True
border optional size of border to include around the drawing. If dimensionless the border is treated as a percentage
of the model bounds, if a length, the border is treated as the absolute border width. The default border is
10% (0.1)
Remarks
The following table lists the possible values for output. The default is “Document”.
Name Description
“Document” Generated drawing is optimised for document
output.
“Screen” Generated drawing is optimised for screen
output.
The following table lists the possible values for orientation. The default is “Global”.
Name Description
“Global” Generated drawing is created relative to global
axis.
“Local” Generated drawing is created relative to
orientationElement.
The following table lists the possible values for stringOrientation. The default is “Horizontal”
Name Description
“Horizontal” Text is drawn horizontally.
“Parallel” Text is drawn parallel to element.
Page 129 of 903
Tedds 2020 - Function and Field Reference
Return Value
Numeric identifier that uniquely identifies the drawing that was attached to.
SolvDrawCoordinateSystem
Sets the co-ordinate system to use for subsequent drawing operations.
Syntax
SolvDrawCoordinateSystem( orientation, orientationElement )
Parameters
orientation optional orientation of the drawing. The default is “Global”
orientationElement optional identifier of the element to base orientation on when generating the drawing, or 0 to use the first
element in the current selection. This parameter is only used when orientation is “Local”. The default
orientation element is the first element in the current selection
Remarks
The following table lists the possible values for orientation. The default is “Global”.
Name Description
“Global” Generated drawing is created relative to global
axis.
“Local” Generated drawing is created relative to
orientationElement.
Return Value
1 if successful, otherwise 0.
SolvDraw
Draws a solver results drawing to the active drawing.
Syntax
SolvDraw( type, results1, … results[n] )
Parameters
type type of drawing
results1 optional results to show. Only required if type is “Diagram” or “Envelope”
Remarks
The following table lists the possible values for results[n]. The default is “Moment”.
Name Description
“AxialDeflection” Draw axial deflection diagram/envelope.
“AxialForce” Draw axial force diagram/envelope.
“Deflection” Draw deflection diagram/envelope.
“Moment” Draw moment diagram/envelope.
“Shear” Draw shear diagram/envelope.
Return Value
1 if successful, otherwise 0.
SolvDrawGetWidth
Gets the width of the solver drawing bounds.
Syntax
SolvDrawGetWidth( includeBorder )
Parameters
includeBorder optional include the border in the width of the solver drawing bounds. Default is True
Return Value
The width of the solver drawing bounds.
SolvDrawGetHeight
Gets the height of the solver drawing bounds.
Syntax
SolvDrawGetHeight( includeBorder )
Parameters
includeBorder optional include the border in the height of the solver drawing bounds. Default is True
Return Value
The height of the solver drawing bounds.
SolvDrawAxis
Draws the global co-ordinate system axis to the active drawing.
Syntax
SolvDrawAxis()
SolvDrawAxis( invertedZ )
SolvDrawAxis( invertedZ, x, z )
Parameters
invertedZ optional parameter to invert the z axis for drawing loading diagrams etc, default is False
x optional x coordinate of where to draw the axis
z optional z coordinate of where to draw the axis
units length units used to label the position of the axis
colour colour to draw the axis
colourX colour to draw the X axis
colourZ colour to draw the Z axis
Remarks
The following table lists the predefined colour values.
Return Value
1 if successful, otherwise 0.
SolvDrawNodes
Draws the nodes within the current selection to the active drawing.
Syntax
SolvDrawNodes( deflected, icons, colour, labels, scaleFactor, label )
Parameters
deflected optional, True to show the deflected position of the nodes. The default value is False
icons optional, True to draw the node icons, False to draw a simple dot. The default is True
colour optional colour to draw the nodes. The default colour is “Black”
labels optional, True to draw the node labels, False to draw just the node. The default is True
scaleFactor optional scale factor used for size of node in drawing as a percentage of the drawing bounds. The default is
1% (0.01)
label optional text to use as the node labels when drawing deflected node positions. The default is the node label
(index)
Remarks
The following table lists the predefined colour values.
Name Description
“Label” The label or index of the node.
“Horizontal” The horizontal deflection of the node.
“Vertical” The vertical deflection of the node.
“HorizontalVertical” The horizontal and vertical deflection of the node.
“LabelHorizontalVertical” The label or index of the node and the horizontal and vertical
deflection of the node.
“Total” The total deflection of the node.
“LabelTotal” The label or index of the node and the total deflection of the
node.
Return Value
1 if successful, otherwise 0.
SolvDrawElements
Draws the currently selected element(s) to the active drawing.
Syntax
SolvDrawElements( deflected, colour, drawElementAxis, elementLabel, drawElementReleases, drawElementEnds,
scaleFactor, lineWidth )
Parameters
deflected optional, True to show the deflected position of the elements. The default value is False
colour optional colour to draw the elements. The default colour is “Black”
drawElementAxis optional, True to show the local element axis on each element. The default is False
elementLabel optional, Type of label to draw. The default is Index
drawElementReleases optional, True to show the element releases in the drawing. The default is False
drawElementEnds optional, True to show the entire element so nodes are drawn connected. False to leave a gap at element
ends to avoid clashes with node support diagrams. The default is True
scaleFactor optional scale factor used for size of element axis, releases and end gaps in drawing as a percentage of the
drawing bounds. The default is 1% (0.01)
lineWidth optional width of element line. Specify a negative number for fixed pixels and a positive number for a
measured width
Remarks
The following table lists the possible values for elementLabel. The default is “Index”.
If Length is specified an optional format string for displaying the length of each element can also be specified.
So for example if “Length,F1,mm” is passed the lengths of elements will be drawn in mm to 1 decimal place.
Name Description
“None” No label
“Index” Element Index
“Length” Element length
“Material” Element material
“Section” Element section
Return Value
1 if successful, otherwise 0.
SolvDrawLoading
Draws the loading for the current selection to the active drawing.
Syntax
SolvDrawLoading( colour )
Parameters
colour optional colour to draw the loading. The default colour is “Purple”
Remarks
The following table lists the predefined colour values.
Return Value
1 if successful, otherwise 0.
SolvDrawDiagram
Draws a results diagram to the active drawing.
Syntax
SolvDrawDiagram( results, colour, maxMin, legend, units, unitfactor )
Parameters
results results to show in the diagram
colour optional colour to draw the results diagram
maxMin optional, True to show the maximum and minimum values on the diagram. The default is True
legend optional legend entry for this results diagram
units optional units to use for values in this results diagram
unitFactor optional scale factor used with units
Remarks
The following table lists the possible values for results.
Name Description
“AxialDeflection” Draw axial deflection diagram.
“AxialForce” Draw axial force diagram.
“Deflection” Draw deflection diagram.
“Moment” Draw moment diagram.
“Shear” Draw shear diagram.
Return Value
1 if successful, otherwise 0.
SolvDrawDiagrams
Draws results diagrams to the active drawing.
Syntax
SolvDrawDiagram( results1, … results[n] )
Parameters
results1 results to draw
Remarks
The following table lists the possible values for results. The default is “Moment”.
Name Description
“AxialDeflection” Draw axial deflection diagram.
“AxialForce” Draw axial force diagram.
“Deflection” Draw deflection diagram.
“Moment” Draw moment diagram.
“Shear” Draw shear diagram.
Return Value
1 if successful, otherwise 0.
SolvDrawEnvelope
Draws a results envelope to the active drawing.
Syntax
SolvDrawEnvelope( results, colour, maxMin, legend, units, unitfactor )
Parameters
results results to show in the envelope
colour optional colour to draw the results envelope
maxMin optional, True to show the maximum and minimum values on the envelope. The default is True
legend optional legend entry for this results envelope
units optional units to use for values in this results envelope
unitFactor optional scale factor used with units
Remarks
The following table lists the possible values for results.
Name Description
“AxialDeflection” Draw axial deflection envelope.
“AxialForce” Draw axial force envelope.
“Deflection” Draw deflection envelope.
“Moment” Draw moment envelope.
“Shear” Draw shear envelope.
Return Value
1 if successful, otherwise 0.
SolvDrawEnvelopes
Draws results envelopes to the active drawing.
Syntax
SolvDrawEnvelopes( results1, … results[n] )
Parameters
results1 results to show in the envelope
Remarks
The following table lists the possible values for results. The default is “Moment”
Name Description
“AxialDeflection” Draw axial deflection envelope.
“AxialForce” Draw axial force envelope.
“Deflection” Draw deflection envelope.
“Moment” Draw moment envelope.
“Shear” Draw shear envelope.
Return Value
1 if successful, otherwise 0.
SolvDrawLegend
Draws a legend to the active drawing.
Syntax
SolvDrawLegend()
SolvDrawLegend( x, z )
Parameters
x optional x coordinate of where to draw the legend
z optional z coordinate of where to draw the legend
Return Value
1 if successful, otherwise 0.
SolvDrawMembers
Highlights any member elements within the active drawing.
Syntax
SolvDrawMembers( colour )
Parameters
colour optional colour in which to highlight the members
Remarks
The following table lists the predefined colour values. The default colour is “SkyBlue”.
Return Value
1 if successful, otherwise 0.
SolvDrawStringOrientation
Sets the string orientation for the active drawing.
Syntax
SolvDrawStringOrientation( orientation )
Parameters
orientation optional orientation for strings in the generated drawing
Remarks
The following table lists the possible values for orientation.
Name Description
“Horizontal” Text is drawn horizontally.
“Parallel” Text is drawn parallel to element.
“Perpendicular” Text is drawn perpendicular to element.
“Vertical” Text is drawn vertically
Return Value
1 if successful, otherwise 0.
SolvDrawLockDiagramScaleFactor
Lock the scale factor used when drawing results so that multiple results/envelopes can be drawn using the same scale
factor.
Syntax
SolvDrawLockDiagramScaleFactor()
Return Value
1 if successful, otherwise 0.
SolvDrawUnlockDiagramScaleFactor
Reset the diagram scale factor after drawing multiple diagrams/envelopes with the same scale factor.
Syntax
SolvDrawUnlockDiagramScaleFactor()
Return Value
1 if successful, otherwise 0.
SolvDrawScaleFactor
Set the scale factor used for diagrams/envelopes for the current active drawing.
Syntax
SolvDrawScaleFactor( scaling, factor )
Parameters
scaling method used for scaling
factor the scale factor to use, should be a length for the “Global” scaling method, dimensionless otherwise
Remarks
The following table lists the possible scaling methods.
Name Description
“Auto” The length of value axis for all
diagrams/envelopes is based on the size of the
border around the drawing.
All values will then be multiplied by the given
scale factor.
“Global” Scale factor should be the real world length to
use for the value axis for all diagrams/envelopes.
“RealWorld” This method only applies to deflection
diagrams/envelopes.
The deflection will be shown in real world
coordinates multiplied by the given scale factor.
Moment, shear , force diagrams/envelopes will
use “Auto”.
Return Value
1 if successful, otherwise 0.
SolvDrawTitle
Draw a title on the current active drawing.
Syntax
SolvDrawTitle( title, colour, alignment )
Parameters
title the title of the drawing
colour optional colour of the title
alignment optional alignment for the title
Remarks
The following table lists the predefined colour values. The default colour is “Black”.
"aliceblue" "antiquewhite" "aqua" "aquamarine" "azure"
"beige" "bisque" "black" "blanchedalmond" "blue"
"blueviolet" "brown" "burlywood" "cadetblue" "chartreuse"
"chocolate" "coral" "cornflowerblue" "cornsilk" "crimson"
"cyan" "darkblue" "darkcyan" "darkgoldenrod" "darkgray"
"darkgrey" "darkgreen" "darkkhaki" "darkmagenta" "darkolivegreen"
"darkorange" "darkorchid" "darkred" "darksalmon" "darkseagreen"
"darkslateblue" "darkslategray" "darkslategrey" "darkturquoise" "darkviolet"
"deeppink" "deepskyblue" "dimgray" "dimgrey" "dodgerblue"
"firebrick" "floralwhite" "forestgreen" "fuchsia" "gainsboro"
"ghostwhite" "gold" "goldenrod" "grey" "gray"
"green" "greenyellow" "honeydew" "hotpink" "indianred"
"indigo" "ivory" "khaki" "lavender" "lavenderblush"
"lawngreen" "lemonchiffon" "lightblue" "lightcoral" "lightcyan"
"lightgoldenrodyell "lightgray" "lightgrey" "lightgreen" "lightpink"
ow"
"lightsalmon" "lightseagreen" "lightskyblue" "lightslategray" "lightslategrey"
"lightsteelblue" "lightyellow" "lime" "limegreen" "linen"
"magenta" "maroon" "mediumaquamari "mediumblue" "mediumorchid"
ne"
"mediumpurple" "mediumseagre "mediumslateblue "mediumspringgre "mediumturquoi
en" " en" se"
"mediumvioletred" "midnightblue" "mintcream" "mistyrose" "moccasin"
"navajowhite" "navy" "oldlace" "olive" "olivedrab"
"orange" "orangered" "orchid" "palegoldenrod" "palegreen"
"paleturquoise" "palevioletred" "papayawhip" "peachpuff" "peru"
"pink" "plum" "powderblue" "purple" "red"
Return Value
1 if successful, otherwise 0.
SolvDrawBounds
Draw the bounds on the current active drawing.
Syntax
SolvDrawBounds( horizontal, vertical )
Parameters
horizontal optional draw the bounds of the active drawing horizontally, default is True
vertical optional draw the bounds of the active drawing vertically, default is True
Remarks
If both horizontal and vertical are True then function will draw a bounding rectangle around the
drawing. Alternatively the function can be used to ensure that sets off drawings all have the same
extents, so that multiple drawings align correctly either horizontally or vertically.
Return Value
1 if successful, otherwise 0.
SolvDrawResult
Draws a result value label on the active drawing.
Syntax
SolvDrawResult( result, maxMin )
Parameters
results results to show in the diagram
maxMin Show “max”, “min” or “max and min” result values
Remarks
Combine with SolvSelectResultsPosition to draw results values at specific positions
Name Description
“AxialDeflection” Draw axial deflection diagram.
“AxialForce” Draw axial force diagram.
“Deflection” Draw deflection diagram.
“Moment” Draw moment diagram.
“Shear” Draw shear diagram.
Return Value
1 if successful, otherwise 0.
SolvSelectClear
Restores the current selection for obtaining analysis results to the default which is all elements in the model and all load
combinations, or all load cases if no combinations exist.
Syntax
SolvSelectClear()
Return Value
1 if successful, otherwise 0.
SolvSelectLoadCases
Selects the load cases to be considered when obtaining results.
Syntax
SolvSelectLoadCases( loadCase1, … loadCase[n] )
Parameters
loadCase1
optional, name or index of loadCase to select. If no load cases are specified all active load cases will be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The number of active load cases selected.
SolvSelectCombinations
Selects the load combinations to be considered when obtaining results.
Syntax
SolvSelectCombinations( combination1, … combination[n] )
Parameters
combination1 optional index of combination to select. If no load combinations are specified all active load combinations will
be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations. To select load combinations of a specific type use SolvSelectCombinationsType.
Return Value
The number of active combinations selected.
SolvSelectCombinationsType
Selects the load combinations of a specific type to be considered when obtaining results.
Syntax
SolvSelectCombinations( type, combination1, … combination[n] )
Parameters
type type of combinations to select "service", "strength" or "quasi"
combination1 optional index of load combination to select. If no load combinations are specified all active load
combinations of specified type will be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations. To select load combinations regardless of the type use SolvSelectCombinations.
If no combinations of the specified type could be selected then 0 is returned and all the combinations are selected, this is
because it is not possible to have a model with no valid selection.
Return Value
The number of active combinations selected.
SolvSelectElements
Sets the elements to be considered when obtaining results.
Syntax
SolvSelectElements( element1, … element[n] )
Parameters
element1 optional, index of element to select. If no elements are specified all elements will be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
1 if successful, otherwise 0.
SolvSelectSpans
Sets the spans to be considered when obtaining results.
Syntax
SolvSelectSpans( member, span1, … span[n] )
Parameters
member name or index of member that contains the spans to be selected
span1 optional index of span to be selected. If no spans are specified all spans in given member will be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
1 if successful, otherwise 0.
SolvSelectMembers
Sets the members to be considered when obtaining results.
Syntax
SolvSelectMembers( member1, … member[n] )
Parameters
member1 optional, name or index of member to select. If no members are specified all members will be selected
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
1 if successful, otherwise 0.
SolvSelectResultsPosition
Sets the specific position where results are obtained from.
Syntax
SolvSelectReslutsPosition( position )
Parameters
position optional distance from start node of current selection (m, ft), OR, ratio of position from start to end
(dimensionless) where results are to be retrieved. If omitted the selection is reset to retrieve results from entire selection
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
1 if successful, otherwise 0.
SolvSelectResultsRange
Sets the specific range where results are obtained from.
Syntax
SolvSelectReslutsRange( start, end )
Parameters
start distance from start node of current selection to start of range (m, ft), OR, ratio of position from start node to start
of range (dimensionless) where results are to be retrieved.
end distance from start node of current selection to end of range (m, ft), OR, ratio of position from start node to end
of range (dimensionless) where results are to be retrieved.
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
1 if successful, otherwise 0.
SolvGetSelectionDescription
Gets a description of the current selection.
Syntax
SolvGetSelectionDescription()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
The selection can also be changed to only retrieve results at a specific position (either an absolute position or a ratio
from start to end) on the elements, spans or members.
Return Value
A three part string containing whether the current selection:
contains load cases or load combinations and the names and identifiers of all selected load cases/combinations.
contains elements, spans or members and the names (members only) and identifiers of all selected
elements/spans/members.
will retrieve results at a specified position (optional).
Axial Force
SolvGetMaxAxialForce()
SolvGetMaxAxialForce
Returns the maximum axial force for the current selection in the active solver model.
Syntax
SolvGetMaxAxialForce()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Maximum axial force (kN, kips).
SolvGetMinAxialForce()
SolvGetMinAxialForce
Returns the minimum axial force for the current selection in the active solver model.
Syntax
SolvGetMinAxialForce()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Minimum axial force (kN, kips).
SolvGetMaxAxialForcePos()
SolvGetMaxAxialForcePos
Returns the distance along an element, span or member of the maximum axial force for the current selection in the
active solver model.
Syntax
SolvGetMaxAxialForcePos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMaxAxialForceId) to where the
maximum axial force occurs.
SolvGetMinAxialForcePos()
SolvGetMinAxialForcePos
Returns the distance along an element, span or member of the minimum axial force for the current selection in the
active solver model.
Syntax
SolvGetMinAxialForcePos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMinAxialForceId) to where the
minimum axial force occurs.
SolvGetMaxAxialForceIndex( type )
SolvGetMaxAxialForceIndex
Returns the index of the element, span or member where the maximum axial force occurs for the current selection in the
active solver model.
Syntax
SolvGetMaxAxialForceIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the maximum axial force occurs.
SolvGetMinAxialForceIndex( type )
SolvGetMinAxialForceIndex
Returns the index of the element, span or member where the minimum axial force occurs for the current selection in the
active solver model.
Syntax
SolvGetMinAxialForceIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the minimum axial force occurs.
SolvGetMaxAxialForceLoadContext()
SolvGetMaxAxialForceLoadContext
Returns whether the maximum axial force for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMaxAxialForceLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the maximum axial force occurs in a selected load case; otherwise returns "LoadCombinations" If
the maximum axial force occurs in a selected load combination.
SolvGetMinAxialForceLoadContext()
SolvGetMinAxialForceLoadContext
Returns whether the minimum axial force for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMinAxialForceLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the minimum axial force occurs in a selected load case; otherwise returns "LoadCombinations" If
the minimum axial force occurs in a selected load combination.
SolvGetMaxAxialForceLoadIndex()
SolvGetMaxAxialForceIndex
Returns the index of the first load case or load combination in which the maximum axial force for the current selection in
the active solver model occurs.
Syntax
SolvGetMaxAxialForceLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMaxAxialForceLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the maximum axial force occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMaxAxialForce() = 200.000 kN
loadContext = SolvGetMaxAxialForceLoadContext() = "LoadCases"
index = SolvGetMaxAxialForceLoadIndex() = 3.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Imposed"
SolvGetMinAxialForceLoadIndex()
SolvGetMinAxialForceIndex
Returns the index of the first load case or load combination in which the minimum axial force for the current selection in
the active solver model occurs.
Syntax
SolvGetMinAxialForceLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMinAxialForceLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the minimum axial force occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMinAxialForce() = 0.000 kN
loadContext = SolvGetMinAxialForceLoadContext() = "LoadCases"
index = SolvGetMinAxialForceLoadIndex() = 1.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Self Weight"
Shear
SolvGetMaxShear()
SolvGetMaxShear
Returns the maximum shear force for the current selection in the active solver model.
Syntax
SolvGetMaxShear()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Maximum shear force (kN, kips).
SolvGetMinShear()
SolvGetMinShear
Returns the minimum shear force for the current selection in the active solver model.
Syntax
SolvGetMinShear()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Minimum shear force (kN, kips).
SolvGetMaxShearPos()
SolvGetMaxShearPos
Returns the distance along an element, span or member of the maximum shear force for the current selection in the
solver model.
Syntax
SolvGetMaxShearPos( )
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations. To retrieve results for a subset of the model you can select specific elements, spans or members.
To retrieve results for specific load cases or load combinations you can select those load cases or load combinations. To
retrieve results at a specific location you can select that result position.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMaxShearId) to where the
maximum shear force occurs.
SolvGetMinShearPos()
SolvGetMinShearPos
Returns the distance along an element, span or member of the minimum shear force for the current selection in the
active solver model.
Syntax
SolvGetMinShearPos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMinShearId) to where the
minimum shear force occurs.
SolvGetMaxShearIndex( type )
SolvGetMaxShearIndex
Returns the index of the element, span or member where the maximum shear force occurs for the current selection in
the active solver model.
Syntax
SolvGetMaxShearIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the maximum shear force occurs.
SolvGetMinShearIndex( type )
SolvGetMinShearIndex
Returns the index of the element, span or member where the minimum shear force occurs for the current selection in
the active solver model.
Syntax
SolvGetMinShearIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the minimum shear force occurs.
SolvGetMaxShearForceLoadContext()
SolvGetMaxShearForceLoadContext
Returns whether the maximum shear force for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMaxShearForceLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the maximum shear force occurs in a selected load case; otherwise returns "LoadCombinations" If
the maximum shear force occurs in a selected load combination.
SolvGetMinShearForceLoadContext()
SolvGetMinShearForceLoadContext
Returns whether the minimum shear force for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMinShearForceLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the minimum shear force occurs in a selected load case; otherwise returns "LoadCombinations" If
the minimum shear force occurs in a selected load combination.
SolvGetMaxShearLoadIndex()
SolvGetMaxShearIndex
Returns the index of the first load case or load combination in which the maximum shear force for the current selection
in the active solver model occurs.
Syntax
SolvGetMaxShearLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMaxShearLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the maximum shear force occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMaxShear() = 92.625 kN
loadContext = SolvGetMaxShearLoadContext() = "LoadCases"
index = SolvGetMaxShearLoadIndex() = 2.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Permanent"
SolvGetMinShearLoadIndex()
SolvGetMinShearIndex
Returns the index of the first load case or load combination in which the minimum shear force for the current selection
in the active solver model occurs.
Syntax
SolvGetMinShearLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMinShearLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the minimum shear force occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMinShear() = -92.625 kN
loadContext = SolvGetMinShearLoadContext() = "LoadCases"
index = SolvGetMinShearLoadIndex() = 2.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Permanent"
SolvGetMaxMomentShear()
SolvGetMaxMomentShear
Returns the shear force at the position of the maximum moment for the current selection in the active solver model.
Syntax
SolvGetMaxMomentShear()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Shear force (kN, kips) at the position of the maximum moment.
SolvGetMinMomentShear()
SolvGetMinMomentShear
Returns the shear force at the position of the minimum moment for the current selection in the active solver model.
Syntax
SolvGetMinMomentShear()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Shear force (kN, kips) at the position of the minimum moment.
Moment
SolvGetMaxMoment()
SolvGetMaxMoment
Returns the maximum moment for the current selection in the active solver model.
Syntax
SolvGetMaxMoment()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Maximum moment (kNm, kip_ft).
SolvGetMinMoment()
SolvGetMinMoment
Returns the minimum moment for the current selection in the active solver model.
Syntax
SolvGetMinMoment()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Minimum moment (kNm, kip_ft).
SolvGetMaxMomentPos()
SolvGetMaxMomentPos
Returns the distance along an element, span or member of the maximum moment for the current selection in the active
solver model.
Syntax
SolvGetMaxMomentPos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMaxMomentId) to where the
maximum moment occurs.
SolvGetMinMomentPos()
SolvGetMinMomentPos
Returns the distance along an element, span or member of the minimum moment for the current selection in the active
solver model.
Syntax
SolvGetMinMomentPos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMinMomentId) to where the
minimum moment occurs.
SolvGetMaxMomentIndex( type )
SolvGetMaxMomentIndex
Returns the index of the element, span or member where the maximum moment occurs for the current selection in the
active solver model.
Syntax
SolvGetMaxMomentIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the maximum moment occurs.
SolvGetMinMomentIndex( type )
SolvGetMinMomentIndex
Returns the index of the element, span or member where the minimum moment occurs for the current selection in the
active solver model.
Syntax
SolvGetMinMomentIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the minimum moment occurs.
SolvGetMaxMomentLoadContext()
SolvGetMaxMomentLoadContext
Returns whether the maximum moment for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMaxMomentLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the maximum moment occurs in a selected load case; otherwise returns "LoadCombinations" If
the maximum moment occurs in a selected load combination.
SolvGetMinMomentLoadContext()
SolvGetMinMomentLoadContext
Returns whether the minimum moment for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMinMomentLoadContext()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the minimum moment occurs in a selected load case; otherwise returns "LoadCombinations" If
the minimum moment occurs in a selected load combination.
SolvGetMaxMomentLoadIndex()
SolvGetMaxMomentIndex
Returns the index of the first load case or load combination in which the maximum moment for the current selection in
the active solver model occurs.
Syntax
SolvGetMaxMomentLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMaxMomentLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the maximum moment occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMaxMoment() = 150.516 kNm
loadContext = SolvGetMaxMomentLoadContext() = "LoadCases"
index = SolvGetMaxMomentLoadIndex() = 2.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Permanent"
SolvGetMinMomentLoadIndex()
SolvGetMinMomentIndex
Returns the index of the first load case or load combination in which the minimum moment for the current selection in
the active solver model occurs.
Syntax
SolvGetMinMomentLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMinMomentLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the minimum moment occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMinMoment() = 0.000 kNm
loadContext = SolvGetMinMomentLoadContext() = "LoadCases"
index = SolvGetMinMomentLoadIndex() = 3.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Imposed"
SolvGetMaxShearMoment()
SolvGetMaxShearMoment
Returns the moment at the position of the maximum shear force for the current selection in the active solver model.
Syntax
SolvGetMaxShearMoment()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Moment (kNm, kip_ft) at the position of the maximum shear force.
SolvGetMinShearMoment()
SolvGetMinShearMoment
Returns the moment at the position of the minimum shear force for the current selection in the active solver model.
Syntax
SolvGetMinShearMoment()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Moment (kNm, kip_ft) at the position of the minimum shear force.
Deflection
SolvGetMaxDeflection( global )
SolvGetMaxDeflection
Returns the maximum deflection for the current selection in the active solver model.
Syntax
SolvGetMaxDeflection( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Maximum deflection (m, ft).
SolvGetMinDeflection( global )
SolvGetMinDeflection
Returns the minimum deflection for the current selection in the active solver model.
Syntax
SolvGetMinDeflection( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Minimum deflection (m, ft).
SolvGetMaxDeflectionPos( global )
SolvGetMaxDeflectionPos
Returns the distance along an element, span or member of the maximum deflection for the current selection in the
active solver model.
Syntax
SolvGetMaxDeflectionPos( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMaxDeflectionId) to where the
maximum deflection occurs.
SolvGetMinDeflectionPos( global )
SolvGetMinDeflectionPos
Returns the distance along an element, span or member of the minimum deflection for the current selection in the active
solver model.
Syntax
SolvGetMinDeflectionPos( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMinDeflectionId) to where the
minimum deflection occurs.
SolvGetMaxDeflectionIndex
Returns the index of the element, span or member where the maximum deflection occurs for the current selection in the
active solver model.
Syntax
SolvGetMaxDeflectionIndex( type, global )
Parameters
type optional type of identifier to return
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the maximum deflection occurs.
SolvGetMinDeflectionIndex
Returns the index of the element, span or member where the minimum deflection occurs for the current selection in the
active solver model.
Syntax
SolvGetMinDeflectionIndex( type, global )
Parameters
type optional type of identifier to return
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the minimum deflection occurs.
SolvGetMaxDeflectionLoadContext( global )
SolvGetMaxDeflectionLoadContext
Returns whether the maximum deflection for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMaxDeflectionLoadContext( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the maximum deflection occurs in a selected load case; otherwise returns "LoadCombinations" If
the maximum deflection occurs in a selected load combination.
SolvGetMinDeflectionLoadContext( global )
SolvGetMinDeflectionLoadContext
Returns whether the minimum deflection for the current selection in the active solver model occurs in a Load Case or a
Load Combination.
Syntax
SolvGetMinDeflectionLoadContext( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the minimum deflection occurs in a selected load case; otherwise returns "LoadCombinations" If
the minimum deflection occurs in a selected load combination.
SolvGetMaxDeflectionLoadIndex()
SolvGetMaxDeflectionIndex
Returns the index of the first load case or load combination in which the maximum deflection for the current selection in
the active solver model occurs.
Syntax
SolvGetMaxDeflectionLoadIndex( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMaxDeflectionLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the maximum deflection occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMaxDeflection() = 7.003 mm
loadContext = SolvGetMaxDeflectionLoadContext() = "LoadCases"
index = SolvGetMaxDeflectionLoadIndex() = 2.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Permanent"
SolvGetMinDeflectionLoadIndex()
SolvGetMinDeflectionIndex
Returns the index of the first load case or load combination in which the minimum deflection for the current selection in
the active solver model occurs.
Syntax
SolvGetMinDeflectionLoadIndex( global )
Parameters
global optional parameter to return global or local deflection if the current selection contains spans or members
rather than elements. The local deflection of a span is always 0 at supported ends. At the supported end of
cantilever spans the end rotation is equal to the end rotation of the adjoining span. If the member consists of
a single cantilever span then the end rotation is zero. If the selection contains elements then the global
deflection is always returned. The default value is True(1)
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMinDeflectionLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the minimum deflection occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMinDeflection() = 0.000 mm
loadContext = SolvGetMinDeflectionLoadContext() = "LoadCases"
index = SolvGetMinDeflectionLoadIndex() = 2.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Permanent"
Axial Deflection
SolvGetMaxAxialDeflection()
SolvGetMaxAxialDeflection
Returns the maximum axial deflection for the current selection in the active solver model.
Syntax
SolvGetMaxAxialDeflection()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Maximum axial deflection (m, ft).
SolvGetMinAxialDeflection()
SolvGetMinAxialDeflection
Returns the minimum axial deflection for the current selection in the active solver model.
Syntax
SolvGetMinAxialDeflection()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Minimum axial deflection (m, ft).
SolvGetMaxAxialDeflectionPos()
SolvGetMaxAxialDeflectionPos
Returns the distance along an element, span or member of the maximum axial deflection for the current selection in the
active solver model.
Syntax
SolvGetMaxAxialDeflectionPos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMaxAxialDeflectionId) to where
the maximum axial deflection occurs.
SolvGetMinAxialDeflectionPos()
SolvGetMinAxialDeflectionPos
Returns the distance along an element, span or member of the minimum axial deflection for the current selection in the
active solver model.
Syntax
SolvGetMinAxialDeflectionPos()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Distance (m, ft) from the start of the element, span or member (returned from SolvGetMinAxialDeflectionId) to where
the minimum axial deflection occurs.
SolvGetMaxAxialDeflectionIndex( type )
SolvGetMaxAxialDeflectionIndex
Returns the index of the element, span or member where the maximum axial deflection occurs for the current selection
in the active solver model.
Syntax
SolvGetMaxAxialDeflectionIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the maximum axial deflection occurs.
SolvGetMinAxialDeflectionIndex( type )
SolvGetMinAxialDeflectionIndex
Returns the index of the element, span or member where the minimum axial deflection occurs for the current selection
in the active solver model.
Syntax
SolvGetMinAxialDeflectionIndex( type )
Parameters
type optional type of identifier to return
Remarks
The following table lists the possible type of identifiers to return. The default is “Default”.
Name Description
“Default” The index returned is based on the current
selection, be that element, span or member.
“Element” The index of the element is returned.
“Span” The index of the span is returned.
“Member” The index of the member is returned.
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
The index of the element, span or member where the minimum axial deflection occurs.
SolvGetMaxAxialDeflLoadContext()
SolvGetMaxAxialDeflectionLoadContext
Returns whether the maximum axial deflection for the current selection in the active solver model occurs in a Load Case
or a Load Combination.
Syntax
SolvGetMaxAxialDeflectionLoadContext( global )
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the maximum axial deflection occurs in a selected load case; otherwise returns
"LoadCombinations" If the maximum axial deflection occurs in a selected load combination.
SolvGetMinAxialDeflLoadContext()
SolvGetMinAxialDeflectionLoadContext
Returns whether the minimum axial deflection for the current selection in the active solver model occurs in a Load Case
or a Load Combination.
Syntax
SolvGetMinAxialDeflectionLoadContext( global )
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
Return Value
Returns "LoadCases" if the minimum axial deflection occurs in a selected load case; otherwise returns
"LoadCombinations" If the minimum axial deflection occurs in a selected load combination.
SolvGetMaxAxialDeflLoadIndex()
SolvGetMaxAxialDeflLoadIndex
Returns the index of the first load case or load combination in which the maximum axial deflection for the current
selection in the active solver model occurs.
Syntax
SolvGetMaxAxialDeflLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMaxAxialDeflLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the maximum axial deflection occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMaxAxialDeflection() = 0.000 mm
loadContext = SolvGetMaxAxialDeflLoadContext() = "LoadCases"
index = SolvGetMaxAxialDeflLoadIndex() = 1.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Self Weight"
SolvGetMinAxialDeflLoadIndex()
SolvGetMinAxialDeflLoadIndex
Returns the index of the first load case or load combination in which the minimum axial deflection for the current
selection in the active solver model occurs.
Syntax
SolvGetMinAxialDeflLoadIndex()
Remarks
Once a model has been analysed, by default, the results retrieved from the solver are for all elements in the model and
all load combinations, if the model contains load combinations, otherwise load cases. To retrieve results for a subset of
the model you can select specific elements, spans or members. You can also select specific load cases or load
combinations.
If both load cases and load combinations are selected the SolvGetMinAxialDeflLoadContext function can be used to
determine whether the index refers to a load case or a load combination.
Return Value
Returns the index of the first load case or load combination in which the minimum axial deflection occurs.
Example
SolvCreateSolver() = 1.000
SolvSetXml(_analysisModel) = 1.000
SolvSelectLoadCases() = 3.000
SolvAnalyse() = 1.000
SolvGetMinAxialDeflection() = 0.000 mm
loadContext = SolvGetMinAxialDeflLoadContext() = "LoadCases"
index = SolvGetMinAxialDeflLoadIndex() = 1.000
SolvGetTableRowValue( loadContext, index, "Name" ) = "Self Weight"
Node Deflection
SolvGetMaxHorizontalDeflection( node, global )
SolvGetMaxHorizontalDeflection
Returns the maximum horizontal deflection of the specified node in the active solver model.
Syntax
SolvGetMaxHorizontalDeflection( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global deflection (True) or deflection in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Maximum horizontal deflection (m, ft) of the specified node.
SolvGetMinHorizontalDeflection
Returns the minimum horizontal deflection of the specified node in the active solver model.
Syntax
SolvGetMinHorizontalDeflection( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global deflection (True) or deflection in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Minimum horizontal deflection (m, ft) of the specified node.
SolvGetMaxVerticalDeflection
Returns the maximum vertical deflection of the specified node in the active solver model.
Syntax
SolvGetMaxVerticalDeflection( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global deflection (True) or deflection in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Maximum vertical deflection (m, ft) of the specified node.
SolvGetMinVerticalDeflection
Returns the minimum vertical deflection of the specified node in the active solver model.
Syntax
SolvGetMinVerticalDeflection( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global deflection (True) or deflection in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Minimum vertical deflection (m, ft) of the specified node.
SolvGetMaxRotationalDeflection( node )
SolvGetMaxRotationalDeflection
Returns the maximum rotational deflection of the specified node in the active solver model.
Syntax
SolvGetMaxRotationalDeflection( node )
Parameters
node identifier or label of the node
Return Value
Maximum rotational deflection (°) of the specified node.
SolvGetMinRotationalDeflection( node )
SolvGetMinRotationalDeflection
Returns the minimum rotational deflection of the specified node in the active solver model.
Syntax
SolvGetMinRotationalDeflection( node )
Parameters
node identifier or label of the node
Return Value
Minimum rotational deflection (°) of the specified node.
Node Reaction
SolvGetMaxHorizontalReaction( node, global )
SolvGetMaxHorizontalReaction
Returns the maximum horizontal reaction of the specified node in the active solver model.
Syntax
SolvGetMaxHorizontalReaction( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global reaction (True) or reaction in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Maximum horizontal reaction (kN, kips) of the specified node.
SolvGetMinHorizontalReaction
Returns the minimum horizontal reaction of the specified node in the active solver model.
Syntax
SolvGetMinHorizontalReaction( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global reaction (True) or reaction in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Minimum horizontal reaction (kN, kips) of the specified node.
SolvGetMaxVerticalReaction
Returns the maximum vertical reaction of the specified node in the active solver model.
Syntax
SolvGetMaxVerticalReaction( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global reaction (True) or reaction in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Maximum vertical reaction (kN, kips) of the specified node.
SolvGetMinVerticalReaction
Returns the minimum vertical reaction of the specified node in the active solver model.
Syntax
SolvGetMinVerticalReaction( node, global )
Parameters
node identifier or label of the node
global optional parameter to return global reaction (True) or reaction in the nodes user coordinate system if the
node has one (False). The default value is True(1)
Return Value
Minimum vertical reaction (kN, kips) of the specified node.
SolvGetMaxMomentReaction( node )
SolvGetMaxMomentReaction
Returns the maximum moment reaction of the specified node in the active solver model.
Syntax
SolvGetMaxMomentReaction( node )
Parameters
node identifier or label of the node
Return Value
Maximum moment reaction (kNm, kip_ft) of the specified node.
SolvGetMinMomentReaction( node )
SolvGetMinMomentReaction
Returns the minimum moment reaction of the specified node in the active solver model.
Syntax
SolvGetMinMomentReaction( node )
Parameters
node identifier or label of the node
Return Value
Minimum moment reaction (kNm, kip_ft) of the specified node.
Base Reaction
SolvGetMaxHorizontalBaseReaction()
SolvGetMaxHorizontalBaseReaction
Returns the maximum horizontal base reaction of the solver model.
Syntax
SolvGetMaxHorizontalBaseReaction()
Return Value
Maximum horizontal base reaction (kN, kips).
SolvGetMinHorizontalBaseReaction()
SolvGetMinHorizontalBaseReaction
Returns the minimum horizontal base reaction of the solver model.
Syntax
SolvGetMinHorizontalBaseReaction()
Return Value
Minimum horizontal base reaction (kN, kips).
SolvGetMaxVerticalBaseReaction()
SolvGetMaxVerticalBaseReaction
Returns the maximum vertical base reaction of the solver model.
Syntax
SolvGetMaxVerticalBaseReaction()
Return Value
Maximum vertical base reaction (kN, kips).
SolvGetMinVerticalBaseReaction()
SolvGetMinVerticalBaseReaction
Returns the minimum vertical base reaction of the solver model.
Syntax
SolvGetMinVerticalBaseReaction()
Return Value
Minimum vertical base reaction (kN, kips).
SolvGetMaxMomentBaseReaction()
SolvGetMaxMomentBaseReaction
Returns the maximum moment base reaction of the solver model.
Syntax
SolvGetMaxMomentBaseReaction()
Return Value
Maximum moment base reaction (kNm, kip_ft).
SolvGetMinMomentBaseReaction()
SolvGetMinMomentBaseReaction
Returns the minimum moment base reaction of the solver model.
Syntax
SolvGetMinMomentBaseReaction()
Return Value
Minimum moment base reaction (kNm, kip_ft).
SolvGetMaxEndAxialForce
Returns the maximum axial force exerted by the start/end of the selected element(s).
Syntax
SolvGetMaxEndForceAxial( elementEnd )
Parameters
elementEnd identifies the end of the element; start = 1, end = 2
Return Value
Maximum axial force exerted by the start/end of the element (kN, kips).
SolvGetMaxEndShear( elementEnd )
SolvGetMaxEndShear
Returns the maximum shear exerted by the start/end of the selected element(s).
Syntax
SolvGetMaxEndShear ( elementEnd )
Parameters
elementEnd identifies the end of the element; start = 1, end = 2
Return Value
Maximum shear exerted by the start/end of the element (kN, kips).
SolvGetMaxEndMoment( elementEnd )
SolvGetMaxEndMoment
Returns the maximum moment at the start/end of the selected element(s).
Syntax
SolvGetMaxEndMoment( elementEnd )
Parameters
elementEnd identifies the end of the element; start = 1, end = 2
Return Value
Maximum moment exerted by the start/end of the element (kNm, kip_ft).
SolvGetOutputOption
Returns the value of the specified output option.
Syntax
SolvGetOutputOption( optionName )
Parameters
optionName Name of the option to return
Return Value
Option value
Remarks
A solver model includes a range of output options which correspond to the output options available in the 2D analysis
calculation. The output is only generated by the 2D analysis calculation but if you use the solver user interface then you
can query these options.
SolvSetOutputOption
Sets the value of the specified output option.
Syntax
SolvSetOutputOption( optionName, value )
Parameters
optionName Name of the option to set
value Value of the option to set
Remarks
A solver model includes a range of output options which correspond to the output options available in the 2D analysis
calculation. The output is only generated by the 2D analysis calculation but if you use the solver user interface then you
can query these options.
SolvGetCombinationCount
Gets the total combination count for the current solver model.
Syntax
SolvGetCombinationCount()
Return Value
The total combination count for the current solver model.
SolvGetCombinationDisplayName
Returns the display name of the specified combination.
Syntax
SolvGetCombinationDisplayName( combination )
Parameters
combination name or numeric index of combination
Return Value
Combination display name.
SolvGetCombinationSource
Gets the requested source property value for the specified combination.
Syntax
SolvGetCombinationSource( combination, source, defaultValue )
Parameters
combination identifier of the combination
source optional name or index of the source property value to return, omit to return all names and values in a string
defaultValue optional default value to return if source property does not exist for the specified combination
Remarks
When a pre-defined combination is selected additional properties are associated with the combination which specify the
source data for the combination.
The possible source values names and their corresponding values are:
Return Value
The requested source property value, if the source value does not exist the default value is returned, If no default value
is specified an error will occur.
SolvGetCombinationSourceCount
Returns the number of source properties defined for the specified combination.
Syntax
SolvGetCombinationSourceCount( combination )
Parameters
combination identifier of the combination
Remarks
If a standard pre-defined combination has been selected the combination will include properties which define the source
data of that combination. This function can be used in conjunction with the SolvGetCombinationSource function to
retrieve all of the properties which are defined for a particular combination.
Return Value
The number of source properties associated with the specified combination.
SolvGetElementCount
Gets the total element count for the current solver model.
Syntax
SolvGetElementCount()
Return Value
The total element count for the current solver model.
SolvGetElementLength
Returns the length of the specified element.
Syntax
SolvGetElementLength( element )
Parameters
element the index of the element
Return Value
Length of element (m, ft).
SolvGetLoadCaseCount
Gets the total load case count for the current solver model.
Syntax
SolvGetLoadCaseCount()
Return Value
The total load case count for the current solver model.
SolvGetMaterialSource
Gets the requested source property value for the specified material.
Syntax
SolvGetMaterialSource( material, source, defaultValue )
Parameters
material name or identifier of the material
source optional name or index of the source property value to return, omit to return all names and values in a string
defaultValue optional default value to return if source property does not exist for the specified material
Remarks
When a pre-defined material is selected additional properties are associated with the material which specify the source
data for the material.
The possible source values names and their corresponding values are:
Return Value
The requested source property value, if the source value does not exist the default value is returned, If no default value
is specified an error will occur.
SolvGetMaterialSourceCount
Returns the number of source properties defined for the specified material.
Syntax
SolvGetMaterialSourceCount( material )
Parameters
material name or identifier of the material
Remarks
If a standard pre-defined material has been selected the material will include properties which define the source data of
that material. This function can be used in conjunction with the SolvGetMaterialSource function to retrieve all of the
properties which are defined for a particular material.
Return Value
The number of source properties associated with the specified material.
SolvGetMaterialSourceName
Returns the source property name of the specified source property for the specified material.
Syntax
SolvGetMaterialSourceName( material, index )
Parameters
material name or identifier of the material
index identifier of the source property
Remarks
If a standard pre-defined material has been selected the material will include properties which define the source data of
that material. This function can be used in conjunction with the SolvGetMaterialSourceCount & SolvGetMaterialSource
functions to retrieve all of the properties which are defined for a particular material.
Return Value
The name of the source property associated with the specified material.
SolvGetMemberCantilevered
Determines whether a member is cantilevered at the specified end.
Syntax
SolvGetMemberCantilevered( member, end )
Parameters
member the name or index of the member
end “Start” or “End” to check the start or end of the member
Return Value
True if the member is cantilevered, otherwise False.
If the member was defined with supportedStart / supportedEnd as False in SolvAddMember then the member is
deemed to be cantilevered at that end. If not then this function will check if the end node of the member is free and that
there are no other supported elements supporting the end of the member. Note, only elements that are directly
connected to the member are checked as supports. If the opposite end node of these elements are not supported they
are deemed to be ‘hanging’ from the member rather than supporting it.
SolvGetMemberCount
Gets the total member count for the current solver model.
Syntax
SolvGetMemberCount()
Return Value
The total member count for the current solver model.
SolvGetMemberElements
Gets a list of element identifiers for the specified member.
Syntax
SolvGetMemberElements( member )
Parameters
member the name or index of the member
Return Value
A list of identifiers for the elements in the specified member.
SolvGetMemberLength
Returns the length of the specified member.
Syntax
SolvGetMemberLength( member )
Parameters
member the name or index of the member
Return Value
Length of member (m, ft).
SolvGetModifiedTimeStamp
Gets the active solver models time stamp.
Syntax
SolvGetModifiedTimeStamp()
Remarks
Each solver model maintains a timestamp which is a numeric value that identifies when the model was last modified. By
retrieving and storing this value it is possible to verify at a later time whether a model has been modified or not by
comparing the stored value with the current value.
Example
_analysisModelTimeStamp = SolvGetModifiedTimeStamp()
…
Do some calcs
…
Message( If(_analysisModelTimeStamp <> SolvGetModifiedTimeStamp(),
"Model has been modified", "Model has not been modified") )
Return Value
The numeric timestamp which identifies the last time the model was modified.
SolvGetNodeCount
Returns the total number of nodes in the active solver model.
Syntax
SolvGetNodeCount()
Return Value
The total number of nodes in the active solver model.
SolvGetSectionSource
Gets the requested source property value for the specified section.
Syntax
SolvGetSectionSource( section, source, defaultValue )
Parameters
section name or identifier of the section
source optional name or index of the source property value to return, omit to return all names and values in a string
defaultValue optional default value to return if the source property does not exist for the specified material
Remarks
When a pre-defined section is selected additional properties are associated with the section which specify the source
data for the section.
The possible source values names and their corresponding values are:
Return Value
The requested source property value, if the source value does not exist the default value is returned, if no default value is
specified an error will occur.
SolvGetSectionSourceCount
Returns the number of source properties defined for the specified section.
Syntax
SolvGetSectionSourceCount( section )
Parameters
section name or identifier of the section
Remarks
If a standard pre-defined section has been selected the section will include properties which define the source data of
that section. This function can be used in conjunction with the SolvGetSectionSource function to retrieve all of the
properties which are defined for a particular section.
Return Value
The number of source properties associated with the specified section.
SolvGetSectionSourceName
Returns the source property name of the specified source property for the specified section.
Syntax
SolvGetSectionSourceName( section, index )
Parameters
section name or identifier of the section
index identifier of the source property
Remarks
If a standard pre-defined section has been selected the section will include properties which define the source data of
that section. This function can be used in conjunction with the SolvGetSectionSourceCount & SolvGetSectionSource
functions to retrieve all of the properties which are defined for a particular section.
Return Value
The name of the source property associated with the specified section.
SolvGetSpanCount
Gets the total span count for a member in the current solver model.
Syntax
SolvGetSpanCount( member )
Parameters
member name or identifier of the member
Return Value
The total span count for the given member in the current solver model.
SolvGetSpanElements
Gets a list of element identifiers for the specified span.
Syntax
SolvGetSpanElements( member, span )
Parameters
member the name or index of the member
span the index of the span
Return Value
A list of identifiers for the elements in the specified span.
SolvGetSpanLength
Returns the length of the specified span.
Syntax
SolvGetSpanLength( member, span )
Parameters
member the name or index of the member
span the index of the span
Return Value
Length of span (m, ft).
SolvIdFromIndex
Gets the unique static Id of an item in one of the solver's database tables from the item's index.
Syntax
SolvIdFromIndex( table, index )
Parameters
table name of the solver database table the index refers to i.e. the name of the collection of items (Nodes,
Elements, etc.)
index numeric identifier which denotes the position of the item in the table
Remarks
The possible table values are:
"Nodes"
"Elements"
"Members"
"Sections"
"Materials"
"LoadCases"
"LoadCombinations"
Each of the solver database tables contains a series of related items e.g. Nodes, Elements, Sections, etc. Each item in a
table has an index, an Id and for some item types a Name.
Index:
The numeric identifier of an item which denotes the position of that item in the table, where 1 is the index of the
first item, 2 is the index of the second item, etc.
An items index is subject to change as a result of other items being added or removed in the table
The index of an item should only be used for a time period when you can guarantee that the content of the table
hasn’t changed e.g. you’re iterating through the table reading the contents of the table, once you’ve finished
iterating the table the index may change as a result of other changes to the model.
Id:
A numeric identifier associated with a specific item which is guaranteed not to change during the lifetime of the
model
Id’s are unique to all the items within a single table i.e. Two Nodes will never have the same Id but a Node and an
Element may have the same Id
Name:
Page 275 of 903
Tedds 2020 - Function and Field Reference
A name is a string identifier associated with some item types e.g. Design Members but not Nodes or Elements
A name must be unique to the items within a single table i.e. Two design members cannot have the same name
but a load case and a combination could have the same name
An items name is subject to change because they are defined by the user therefore a name should only be used as
an identifier for a time period when you can guarantee that the name cannot change.
Return Value
The unique static id of the item in the table; or zero if an item with the specified Index does not exist.
SolvIdFromName
Gets the unique static Id of an item in one of the solver's database tables from the item's name.
Syntax
SolvIdFromName( table, name )
Parameters
table name of the solver database table the index refers to i.e. the name of the collection of items (Nodes,
Elements, etc.)
name name of the item in the table
Remarks
The possible table values are:
"Nodes"
"Elements"
"Members"
"Sections"
"Materials"
"LoadCases"
"LoadCombinations"
Each of the solver database tables contains a series of related items e.g. Nodes, Elements, Sections, etc. Each item in a
table has an index, an Id and for some item types a Name.
Index:
The numeric identifier of an item which denotes the position of that item in the table, where 1 is the index of the
first item, 2 is the index of the second item, etc.
An items index is subject to change as a result of other items being added or removed in the table
The index of an item should only be used for a time period when you can guarantee that the content of the table
hasn’t changed e.g. you’re iterating through the table reading the contents of the table, once you’ve finished
iterating the table the index may change as a result of other changes to the model.
Id:
A numeric identifier associated with a specific item which is guaranteed not to change during the lifetime of the
model
Id’s are unique to all the items within a single table i.e. Two Nodes will never have the same Id but a Node and an
Element may have the same Id
Name:
Page 277 of 903
Tedds 2020 - Function and Field Reference
A name is a string identifier associated with some item types e.g. Design Members but not Nodes or Elements
A name must be unique to the items within a single table i.e. Two design members cannot have the same name
but a load case and a combination could have the same name
An items name is subject to change because they are defined by the user therefore a name should only be used as
an identifier for a time period when you can guarantee that the name cannot change.
Return Value
The unique static id of the item in the table; or zero if an item with the specified name does not exist.
SolvIndexFromId
Gets the index of an item in one of the solver's database tables from the item's unique Id.
Syntax
SolvIndexFromId( table, id )
Parameters
table name of the solver database table the id refers to i.e. the name of the collection of items (Nodes, Elements,
etc.)
id unique static identifier of the item in the table
Remarks
The possible table values are:
"Nodes"
"Elements"
"Members"
"Sections"
"Materials"
"LoadCases"
"LoadCombinations"
Each of the solver database tables contains a series of related items e.g. Nodes, Elements, Sections, etc. Each item in a
table has an index, an Id and for some item types a Name.
Index:
The numeric identifier of an item which denotes the position of that item in the table, where 1 is the index of the
first item, 2 is the index of the second item, etc.
An items index is subject to change as a result of other items being added or removed in the table
The index of an item should only be used for a time period when you can guarantee that the content of the table
hasn’t changed e.g. you’re iterating through the table reading the contents of the table, once you’ve finished
iterating the table the index may change as a result of other changes to the model.
Id:
A numeric identifier associated with a specific item which is guaranteed not to change during the lifetime of the
model
Id’s are unique to all the items within a single table i.e. Two Nodes will never have the same Id but a Node and an
Element may have the same Id
Name:
Page 279 of 903
Tedds 2020 - Function and Field Reference
A name is a string identifier associated with some item types e.g. Design Members but not Nodes or Elements
A name must be unique to the items within a single table i.e. Two design members cannot have the same name
but a load case and a combination could have the same name
An items name is subject to change because they are defined by the user therefore a name should only be used as
an identifier for a time period when you can guarantee that the name cannot change.
Return Value
The index of the item in the table; or zero if an item with the specified Id does not exist.
SolvIndexFromName
Gets the index of an item in one of the solver's database tables from the item's unique name.
Syntax
SolvIndexFromName( table, name )
Parameters
table name of the solver database table the name parameter refers to i.e. the name of the collection of items
(Nodes, Elements, etc.)
name unique name of the item in the table
Remarks
The possible table values are:
"Members"
"Sections"
"Materials"
"LoadCases"
"LoadCombinations"
Each of the solver database tables contains a series of related items e.g. Nodes, Elements, Sections, etc. Each item in a
table has an index, an Id and for some item types a Name.
Index:
The numeric identifier of an item which denotes the position of that item in the table, where 1 is the index of the
first item, 2 is the index of the second item, etc.
An items index is subject to change as a result of other items being added or removed in the table
The index of an item should only be used for a time period when you can guarantee that the content of the table
hasn’t changed e.g. you’re iterating through the table reading the contents of the table, once you’ve finished
iterating the table the index may change as a result of other changes to the model.
Id:
A numeric identifier associated with a specific item which is guaranteed not to change during the lifetime of the
model
Id’s are unique to all the items within a single table i.e. Two Nodes will never have the same Id but a Node and an
Element may have the same Id
Name:
A name is a string identifier associated with some item types e.g. Design Members but not Nodes or Elements
A name must be unique to the items within a single table i.e. Two design members cannot have the same name
but a load case and a combination could have the same name
An items name is subject to change because they are defined by the user therefore a name should only be used as
an identifier for a time period when you can guarantee that the name cannot change.
Return Value
The index of the item in the table; or zero if an item with the specified name does not exist.
SolvSelectTable
Selects the specified table as the active table.
Syntax
SolvSelectTable( tableName, sortColumn )
Parameters
tableName Name of the table to set as the active table
sortColumn Optional name of the column to sort by in ascending order
Remarks
The solver model and the calculated results are stored in a series of Database tables which can be queried directly by
selecting a table, iterating the rows in the table using SolvSelectNextRow or SolvSelectRow and then querying values in
specific columns of the table using SolvGetValue.
"ShearAreaY" Effective shear area when loading parallel to the Minor axis
(mm2, in2)
"ShearAreaZ" Effective shear area when loading parallel to the Major axis
(mm2, in2)
"X" Force applied to the node in the local X direction (kN, kips)
"Z" Force applied to the node in the local Z direction (kN, kips)
Return Value
The number of rows in the selected table; zero if the table is empty.
SolvGetTableRowValue
Returns the column value for the specified table and row.
Syntax
SolvGetTableRowValue( tableName, rowIndex, columnName )
Parameters
tableName Name of database table
rowIndex Row index
columnName Name of the column to return the value for
Remarks
SolvGetTableRowValue can be used to directly query a value in a table without having to first select the table and row to
query, also the currently selected table and row are not changed when using this function.
Refer to SolvSelectTable for the permitted tables names and SolvGetValue for the column names.
Return Value
Cell value from the specified table and row.
SolvGetValue
Returns the column value for the currently selected table and row.
Syntax
SolvGetValue( columnName )
Parameters
columnName Name of the column to return the value for
Remarks
The following table shows the possible values that can be requested for each table
"ShearAreaY" Effective shear area when loading parallel to the Minor axis
(mm2, in2)
"ShearAreaZ" Effective shear area when loading parallel to the Major axis
(mm2, in2)
"X" Force applied to the node in the local X direction (kN, kips)
"Z" Force applied to the node in the local Z direction (kN, kips)
Return Value
Cell value as specified in the above table.
SolvSelectRow
Selects the specified row of the currently selected solver database table.
Syntax
SolvSelectRow( rowIndex )
Parameters
rowIndex 1 based index of the row to select
Return Value
True (1) if successful; otherwise False (0).
SolvSelectRowParent
Selects the parent table for the specified column of the currently selected row of the current solver database table.
Syntax
SolvSelectRowParent( parentIdentifier, sortColumn )
Parameters
parentTableName[n] Name of the parent table
parentIdentifier[n] Identifier of the parent
sortColumn Optional name of the column to sort by in ascending order
Return Value
Returns the number of child rows within the selection.
SolvSelectNextRow
Selects the next row of the currently selected solver database table.
Syntax
SolvSelectNextRow()
Return Value
True (1) if successful; otherwise False (0).
SolvGetXml
Returns the active solver model as a string in XML format.
Syntax
SolvGetXml()
Remarks
SolvGetXml saves the active solver model to a string in the Extensible Markup Language (XML) format which can be
subsequently loaded using SolvSetXml. When a model is saved the geometry, loading and output options are included
but analysis results are not included.
Return Value
Solver model as a string in XML format
SolvSetXml
Loads an existing solver model that was saved in XML format using SolvGetXml into the active solver model.
Syntax
SolvSetXml( xml )
Parameters
xml analysis model in the Extensible Markup Language (XML) format
Remarks
SolvSetXml loads an existing solver model that was saved in XML format using SolvGetXml into the active solver model.
When a model is loaded the geometry, loading and output options are restored.
Return Value
True (1) if solver model was loaded successfully; otherwise False (0).
CalcItemExists
Determines if an Calc Item exists in a Calc Library.
Syntax
CalcItemExists( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if item exists; otherwise returns False(0).
Example
CalcItemExists( "$(SysLbrDir)TeddsBas.lbr", "CalcItemExists" ) =
1.000
CalcItemExists( "$(SysLbrDir)TeddsBas.lbr", "Invalid item name" ) =
0.000
CalcLibraryExists
Determines if a Calc Library exists.
Syntax
CalcLibraryExists( fileName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if library exists; otherwise returns False(0).
Example
CalcLibraryExists( "$(SysLbrDir)TeddsBas.lbr" ) = 1.000
CalcLibraryExists( "$(SysLbrDir)InvalidFileName.lbr" ) = 0.000
DeleteCalcItem
Deletes a Calc Item from a Calc Library.
Syntax
DeleteCalcItem( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if calc item was deleted; otherwise returns False(0).
Example
SetCalcItemText( "$(SysLbrDir)Test.lbr", "Test DeletCalcItem",
"Test" ) = ?
CalcItemExists("$(SysLbrDir)Test.lbr", "Test DeletCalcItem" ) = ?
DeleteCalcItem("$(SysLbrDir)Test.lbr", "Test DeletCalcItem" ) = ?
CalcItemExists("$(SysLbrDir)Test.lbr", "Test DeletCalcItem" ) = ?
GetActiveCalcItemInfo
Returns a summary of the Calc Item that is currently being calculated.
Syntax
GetActiveCalcItemInfo( formatString )
Parameters
formatString is the optional format string which determines what information will be included in the summary
information that is returned by the function. When omitted the summary information will include the information as
determined by the users Tedds settings in Tedds Options->Calculating->Calc Items.
Return Value
Returns a string summarising the Calc Item currently being calculated.
Remarks
This function is typically used in a Show field which is included at the end of a Calc Item in hidden text. When calculated
as part of a calculation this ensures that every item output to the document will include a reference to the Calc Item that
generated that part of the output. By default the Tedds options are set to not output any information.
If there is no Calc Item currently being calculated an empty string will be returned.
GetCalcItemAuthor
Returns the author property for a Calc Item in a Calc Library.
Syntax
GetCalcItemAuthor( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the Calc Item author property as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string.
Example
GetCalcItemAuthor( "$(SysLbrDir)TeddsBas.lbr", "GetCalcItemAuthor" )
= "CSC (UK) Ltd"
GetCalcItemDescription
Returns the description property for a Calc Item in a Calc Library.
Syntax
GetCalcItemDescription( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the Calc Item description property as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string.
Example
GetCalcItemDescription( "$(SysLbrDir)TeddsBas.lbr",
"GetCalcItemDescription" ) = "Returns the description property for a Calc
Item in a Calc Library"
GetCalcItemLongName
Returns the long name property for a Calc Item in a Calc Library.
Syntax
GetCalcItemLongName( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the Calc Item long name property as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string.
Example
GetCalcItemLongName( "$(SysLbrDir)TeddsBas.lbr",
"GetCalcItemLongName" ) = "GetCalcItemLongName( fileName, itemName )"
GetCalcItemProperties
Retrieves the properties of a Calc Item in a Calc Library.
Syntax
GetCalcItemProperties( fileName, itemName, longName, description, version, status, author )
Parameters
fileName is the full path to the Calc Library file.
longName is the optional name of the variable to copy the long name property to.
description is the optional name of the variable to copy the description property to.
version is the optional name of the variable to copy the version property to.
status is the optional name of the variable to copy the status property to.
author is the optional name of the variable to copy the author property to.
Example
GetCalcItemProperties( "$(SysLbrDir)TeddsBas.lbr",
"GetCalcItemProperties", "longName", "description", "version",
"status", "author" ) = 1.000
longName = "GetCalcItemProperties( fileName, itemName, ... )"
description = "Retrieves the properties of a Calc Item in a Calc Library"
version = "11.0"
status = "General release"
author = "CSC (UK) Ltd"
GetCalcItemsStrList
Returns a string listing all the Calc Items in a Calc Library where the items name starts with the specified prefix.
Syntax
GetCalcItemsStrList( fileName, itemPrefixName, formatString )
Parameters
fileName is the full path to the Calc Library file.
itemPrefixName is the optional Calc Item prefix name to search for. If no prefix is specified all items are returned.
formatString is the optional format for each element returned in the list, defaults to [Name]. The placeholders
[Name], [LongName], [Description], [Status], [Version], and [Author] can be used.
Return Value
Returns a string that contains a comma separated list of each Calc Item in the Calc Library that starts with the specified
prefix. Each element in the list is formatted according to the formatString argument.
Example
GetCalcItemsStrList( "$(SysLbrDir)TEDDSBas.lbr", "GetCalcItem" ) = ?
GetCalcItemsStrList( "$(SysLbrDir)TEDDSBas.lbr", "GetCalcItem", "[LongName] v[Version] by
[Author]" ) = ?
GetCalcItemStatus
Returns the status property for a Calc Item in a Calc Library.
Syntax
GetCalcItemStatus( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the Calc Item status property as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string.
Example
GetCalcItemStatus( "$(SysLbrDir)TeddsBas.lbr", "GetCalcItemStatus" )
= "General release"
GetCalcItemText
Returns the content of a Calc Item in a Calc Library as a text string.
Syntax
GetCalcItemText( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the content of a Calc Item as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string. If the
content of a Calc Item is not stored in text format then this function will also return an empty string.
Example
GetCalcItemText( "$(SysLbrDir)TeddsBas.lbr", "GetCalcItemText" ) =
""
GetCalcItemVersion
Returns the version property for a Calc Item in a Calc Library.
Syntax
GetCalcItemVersion( fileName, itemName )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns the Calc Item version property as a string.
Remarks
If the Calc Item or the Calc Library does not exist this function will not throw an error it will return an empty string.
Example
GetCalcItemVersion( "$(SysLbrDir)TeddsBas.lbr", "GetCalcItemVersion"
) = "11.0"
SaveSectionVarsCalcItem
Save variables in the active Calc Section to a Calc Item in a Calc Library.
Syntax
SaveSectionVarsCalcItem( fileName, itemName, options, variable1, variable[n], …)
Paramaters
fileName is the full path to the Calc Library.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
An item saved with this function can be calculated by Tedds using the EvalCalcItem function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem1") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem2", 0, "a") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem3", 1+2+4) = 1.000
SaveVerifySectionVarsCalcItem
Save Verify expressions for variables in the active Calc Section to a Calc Item in a Calc Library.
Syntax
SaveVerifySectionVarsCalcItem( fileName, itemName, options, variable1, variable[n], …)
Paramaters
fileName is the full path to the Calc Library.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
This function creates a Calc Item that includes expressions to verify the values of variables are the same as they were
when the item was created. A verification item is useful for testing, start by running a calculation then create the
verification item, make changes to the calculation then calculate the verification item to verify that the results of the
calculation have not changed. An item saved with this function can be calculated by Tedds using the EvalCalcItem
function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveVerifySectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveVerifySectionVarsCalcItem1") = 1.000
a = 2m
EvalCalcItem("$(UserLbrDir)Test.lbr",
"SaveVerifySectionVarsCalcItem1") = 1.000
Look at results in Progress Log to view verification failure
SelectCalcItem
Shows a standard user interface for selecting a Calc Item from a Calc Library.
Syntax
SelectCalcItem( fileName, itemName, open, title )
Parameters
fileName is the full path to the selected Calc Library file, can be an empty string if no file is selected.
itemName is the name of the selected Calc Item, can be an empty string if no item is selected.
open is the parameter that specifies whether an item is being selected for opening (True(1)) or saving
(False(0)).
Return Value
Returns the name of the selected Calc Item, if the user Cancels the user interface the original itemName value is
returned.
Example
SelectCalcItem( "$(SysLbrDir)TeddsBas.lbr", "", True, "Select Calc
Item to open" ) = "SelectCalcLibrary"
SelectCalcLibrary
Shows a standard user interface for selecting a Calc Library file.
Syntax
SelectCalcLibrary ( fileName, open, title )
Parameters
fileName is the full path to the selected Calc Library file, can be an empty string if no file is selected.
open is the parameter that specifies whether a file is being selected for opening (True(1)) or saving (False(0)).
Return Value
Returns the full path of the selected Calc Library, if the user Cancels the user interface the original fileName value is
returned.
Example
SelectCalcLibrary( "", True, "Select Calc Library to open" ) =
"$(SysLbrDir)Teddsbas.lbr"
SetCalcItemAuthor
Sets the author property for a Calc Item in a Calc Library.
Syntax
SetCalcItemAuthor( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Remarks
The Calc Item must exist in the Calc Library for this function to succeed.
Example
SetCalcItemAuthor( "$(UserLbrDir)Test.lbr", "SetCalcItemAuthor",
"Me" ) = 1.000
SetCalcItemDescription
Sets the description property for a Calc Item in a Calc Library.
Syntax
SetCalcItemDescription( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Remarks
The Calc Item must exist in the Calc Library for this function to succeed.
Example
SetCalcItemDescription( "$(UserLbrDir)Test.lbr",
"SetCalcItemDescription", "Description property" ) = 1.000
SetCalcItemLongName
Sets the long name property for a Calc Item in a Calc Library.
Syntax
SetCalcItemLongName( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Remarks
The Calc Item must exist in the Calc Library for this function to succeed.
Example
SetCalcItemLongName( "$(UserLbrDir)Test.lbr", "SetCalcItemLongName",
"Long name property" ) = 1.000
SetCalcItemStatus
Sets the status property for a Calc Item in a Calc Library.
Syntax
SetCalcItemStatus( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Remarks
The Calc Item must exist in the Calc Library for this function to succeed.
Example
SetCalcItemStatus( "$(UserLbrDir)Test.lbr", "SetCalcItemStatus",
"General release" ) = 1.000
SetCalcItemText
Sets the content of a Calc Item in a Calc Library as a text string.
Syntax
SetCalcItemText( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Example
SetCalcItemText( "$(UserLbrDir)Test.lbr", "SetCalcItemText", "x =
1\; y = 2" ) = ?
SetCalcItemVersion
Sets the version property for a Calc Item in a Calc Library.
Syntax
SetCalcItemVersion( fileName, itemName, value )
Parameters
fileName is the full path to the Calc Library file.
Return Value
Returns True(1) if property was set; otherwise returns False(0).
Remarks
The Calc Item must exist in the Calc Library for this function to succeed.
Example
SetCalcItemVersion( "$(UserLbrDir)Test.lbr", "SetCalcItemVersion",
"11.0" ) = 1.000
AddSection
Adds a new Calc Section to the variable database for the current document.
Syntax
AddSection()
Return Value
The unique identifier of the new Calc Section.
Remarks
Variables for each Calc Section are stored in a unique list so that variables in one Calc Section are separated from the
variables in all other Calc Sections. When variables are assigned or retrieved they automatically use the active Calc
Section or the Document Calc Section if no Calc Section is active. To set a section as the active section use SetSection.
DeleteSection
Deletes an existing Calc Section from the variable database for the current document.
Syntax
DeleteSection( sectionId )
Parameters
sectionId is the unique identifier of the section to delete.
Return Value
Returns True(1) if the section was deleted; otherwise returns False(0).
DeleteVarsInAllSections
Delete each occurrence of the named variables in the document section and in all Calc Sections.
Syntax
DeleteVarsInAllSections( varName1, … varName[n] )
Parameters
varName[n] is the name of a variable to delete. Named placeholders can be used within the variable name, see
remarks.
Remarks
If no parameters are specified then all the variables in the document and Calc Sections will be deleted.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a1 = 1;a2 = 2;b1 = 3;b2 = 4
listvarsinsection()=
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a1”, “b1”) = 1.000
listvarsinsection()=
a2 = 2.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a2”, “b2”) = 1.000
listvarsinsection()=
Using placeholders
Count = 1.000000;
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 1.000000;
a2 = 2.000000;
b2 = 4.000000;
Count = 2
DeleteVarsInAllSections(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 2.000000;
DeleteVarsInSectionExcept
Deletes all variables in the current calc section except those named in the parameter list.
Syntax
DeleteVarsInSectionExcept( varName1,…varName[n] )
Parameters
varName[n]
Name of each variable that should not be deleted. Named placeholders can be used within the variable name, see
remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a1 = 1;a2 = 2;b1 = 3;b2 = 4
listvarsinsection()=
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
deletevarsinsectionexcept (“a2”)=1.000
listvarsinsection()=
a2 = 2.000000;
Using placeholders
b1 = 3.000000;
b2 = 4.000000;
deletevarsinsectionexcept (“Count”, “a[Count]”)=1.000
listvarsinsection()=
Count = 2.000000;
a2 = 2.000000;
DeleteVarsInSection
Deletes named variables from the current Calc Section, or the document section if the expression is not in a calc section.
Syntax
DeleteVarsInSection( varName1, … varName[n] )
Parameters
varName[n] is the name of a variable to delete. Named placeholders can be used within the variable name, see
remarks.
Remarks
If no parameters are specified then all variables in the current Calc Section will be deleted.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Examples
a1 = 2; b1 = 6; a2 = 4; b2 = 8
listvarsinsection()=
a1 = 2.000000;
a2 = 4.000000;
b1 = 6.000000;
b2 = 8.000000;
deletevarsinsection(“a1”, “b1”) = 1.000
listvarsinsection()=
a2 = 4.000000;
b2 = 8.000000;
deletevarsinsection(“a2”, “b2”) = 1.000
listvarsinsection()=
Using placeholders
Count = 1; a1 = 2; b1 = 6; a2 = 4; b2 = 8
listvarsinsection()=
Count = 1.000000;
Page 331 of 903
Tedds 2020 - Function and Field Reference
a1 = 2.000000;
a2 = 4.000000;
b1 = 6.000000;
b2 = 8.000000;
deletevarsinsection(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 1.000000;
a2 = 4.000000;
b2 = 8.000000;
Count = 2
deletevarsinsection(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 2.000000;
GetSectionID
Returns the unique numeric identifier for the current Calc Section.
Syntax
GetSectionID()
GetSectionName
Returns the name of the current Calc Section as a string value.
Syntax
GetSectionName()
GetSectionVar
Returns the value of a Calc Section variable, if the variable does not exist then the specified default value is returned.
Syntax
GetSectionVar( sectionId, varName, [defaultValue] )
Paramaters
sectionId is the numeric section Id that uniquely identifies the section to get the value from. Use 0 to get the value
of a variable in the document section.
varName is the name of the variable. Named placeholders can be used within the variable name, see remarks.
defaultValue is the optional default value to return if the variable does not exist.
Remarks
The defaultValue parameter is optional but if it is not specified GetSectionVar will error if the variable does not exist.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
Value of variable or default value if variable does not exist.
Example
a1 = 1; a2 = 2; a3 = 3
getsectionvar( 0, “a1”, “undefined” ) = 1.000
getsectionvar( 0, “a2”, “undefined” ) = 2.000
getsectionvar( 0, “a3”, “undefined” ) = 3.000
getsectionvar( 0, “a4”, “undefined” ) = "undefined"
Using placeholders
Count = 1
getsectionvar( 0, “a[Count]”, “undefined” ) = 1.000
Page 335 of 903
Tedds 2020 - Function and Field Reference
Count = 2
getsectionvar( 0, “a[Count]”, “undefined” ) = 2.000
Count = 3
getsectionvar( 0, “a[Count]”, “undefined” ) = 3.000
Count = 4
getsectionvar( 0, “a[Count]”, “undefined” ) = "undefined"
ListAllSections
Returns a list of all the Calc Sections in the current document.
Syntax
ListAllSections()
Return Value
A string listing all the Calc Sections.
ListVarsInSection
Returns a list of all the variables in the active Calc Section.
Syntax
ListVarsInSection ()
Return Value
A string listing all the variables.
SetSection
Sets the active Calc Section.
Syntax
SetSection( sectionID, sectionName )
Parameters
sectionId is the numeric Calc Section identifier that uniquely identifies the section.
Return Value
True(1) if section was successfully activated; otherwise False(0).
Remarks
The active Calc Section is normally set automatically by Tedds as a document is calculated. The active Calc Section
determines where variables are stored and retrieved from.
Example
SetSection( 1, “Section 1” ) = 100.000
SetSectionVar
Assigns a value to a Calc Section variable.
Syntax
SetSectionVar( sectionID, varName, value )
Parameters
sectionId is the numeric section Id that uniquely identifies the section to get the value from. Use 0 to get the value
of a variable in the document section.
varName is the variable name. Named placeholders can be used within the variable name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
True(1) if value was successfully assigned; otherwise False(0).
Example
SetSectionVar( 0, “a1”, 100 ) = 100.000
SetSectionVar( 0, “a2”, 150 ) = 150.000
SetSectionVar( 0, “a3”, 200 ) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
Using placeholders
Count = 1
SetSectionVar( 0, “a[Count]”, 100 ) = 100.000
Count = 2
SetSectionVar( 0, “a[Count]”, 150 ) = 150.000
Count = 3
SetSectionVar( 0, “a[Count]”, 200 ) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
Calculating
CancelIf
Cancels the current calculation process if the specified condition is True(1)
Syntax
CancelIf( condition, message, cancelAction, log, output)
Parameters
condition expression which if True(1) will stop the calculation process
message optional message text used for prompt, log and output as appropriate
cancelAction optional action to take if condition is True "prompt" (default), "abort", "interrupt"
Return Value
Returns True(1) if cancel condition is True; otherwise returns False(0).
Remarks
Cancels the current calculation process in the same manner as if the user clicked about/interrupt. This can be useful for
stopping a calculation when you know subsequent calculations are likely to cause errors due to invalid input. For
example, a dive by zero error, square root of a negative number, etc. It is also useful for debugging purposes to stop a
calculation at a certain point. The calculation will be stopped in the context of what started the calculation, for example if
the calculation is occurring because the user clicked a button in a user interface then control will return to the user
interface, if however the calculation is in the process of producing the final output (i.e. the context is that the user
clicked calculate from Tedds or Tedds for Word then control will return to Tedds or Tedds for Word with interrupted
output (interrupt) or no output at all (abort).
Example
CancelIf( y == 0, "y cannot be zero", "interrupt" ) = ?
10 / y = ?
Eval/EvalString
Calculates a string as an expression and returns the result of the expression.
Syntax
Eval ( expression )
EvalString( expression )
Eval( format )
EvalString( format )
Parameters
expression is the expression to calculate.
format is the string format. Place holders indicate where to insert values in the string and in what
format.
value1 is the first value that can be inserted into the string
value[n] is the nth value that can be inserted into the string
Return Value
Returns the result of the expression.
Remarks
The eval function is used to calculate a string as an expression. It can be used to format a string that is then calculated or
it is sometimes used to prevent an expression from being calculated that would otherwise cause Tedds to error, for
example a divide by zero error. For more information about using the format string with placeholders please refer to the
documentation for StrFormat.
a = 1
Eval( “a” ) = 1.000
This function can be useful in ‘if’ statements, where one of the variables may not exist.
a = 1
b = 2
Eval( if( a<b, ”a”, ”c” ) ) = 1.000
If this was a simple if statement, the variable ‘c’ would be prompted for because although it is not ultimately selected (in
this case), both potential options are calculated then discarded. Using the Eval function, means that at the point of “a”
and “c” being calculated and then one selected by the ‘if’ statement, they are both strings and hence calculate without
error. Then they are converted into an expression by the Eval function.
a = 1
b = 0
Eval( if( b==0, ”0", "a/b" ) ) = 0.000
This function is often used in the Tedds Calc Designer where in a ‘set variable’ object, the variable name can be created in
this way and hence the name built up from a string which may include a changing value (such as a subscript).
Eval(“a[1]”, value)
or with a named placeholder.
Eval(“a[value]”)
where value is a number that changes on each iteration of a loop, a1, a2, a3, etc.
The Eval function is also useful to allow a button in an interface to call a dialog, data lists, data tables etc.
The following example sets up a variable called Stress_string which contains either a call to a sub dialog, or a call to a
data list.
Stress_string = if(Stresses=="User
defined","InputWizardDialog(\"Timber stresses\")","DataList(
timber_grade_dlist,\"Grade
stresses\",\"C24\",\"Use\",\"\",\"Current_stress\",\"\",\"Show\"
,\"No\")")
This is then used in the button call as follows;
Eval(Stress_string)
The parameters which have quotes around them in this instance work OK because quotes can be represented within a
string by the \” symbol.
EvalCalcItem
Calculates a Calc Library Item.
Syntax
EvalCalcItem( fileName, itemName, output)
Paramaters
filename is the full path to the Calc Library.
output determines whether to output (Append) or discard (Discard) the calculated item.
Return Value
Returns True (1) if the item was calculated
Remarks
If the itemName is an empty string ("") then nothing will be calculated and no errors will be reported.
Example
EvalCalcItem( "$(SysLbrDir)LibraryName.lbr", "ItemName", Discard ) =
?
EvalCalcItemIf
Calculates a Calc Library Item if the condition expression is True.
Syntax
EvalCalcItemIf( condition, fileName, itemName, output)
Paramaters
condition is the expression that must evaluate to either True (1) or False(0)
output determines whether to output (Append) or discard (Discard) the calculated item.
Return value
Returns True (1) if the item was calculated; otherwise False (0)
Example
x = 100
EvalCalcItemIf( x > 0, "$(SysLbrDir)LibraryName.lbr", "ItemName",
Discard ) = ?
x = -100
EvalCalcItemIf( x < 0, "$(SysLbrDir)LibraryName.lbr", "ItemName",
Discard ) = ?
EvalCalcItemIfExists
Calculates a Calc Library Item if the item actually exists. If the item does not exist nothing will be calculated and no errors
will be reported.
Syntax
EvalCalcItemIfExists(fileName, itemName, output)
Paramaters
filename is the full path to the Calc Library.
output determines whether to output (Append) or discard (Discard) the calculated item.
Return value
Returns True (1) if the item was calculated; otherwise False (0)
Example
EvalCalcItemIfExists( "$(SysLbrDir)LibraryName.lbr", "ItemName",
Discard ) = ?
EvalDo
Calculates a series of strings.
Syntax
EvalDo(expression1,…expression[n] )
Parameters
expression1 is the first expression to calculate
Return Value
Returns True(1) if all expressions were calculated successfully; otherwise returns False(0).
Remarks
Note that the expressions must be defined as strings, i.e. enclosed in quotes.
Placeholders – Placeholders allow you to substitute the value of another variable in the expression before the expression
is processed which is particularly useful when writing iterative calculations. If you had a set of related variables x 1, x2, x3
you might want to use a counter variable to determine which value of x you are currently using. A placeholder allows you
to use the counter variable within the expression.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
$swapXY = EvalDo(
"SetVar(\"tmp\", x, \"th\")",
"SetVar(\"x\", y)",
"SetVar(\"y\", tmp)" )
x = 10
y = 20
swapXY = 1
x = 20
y = 10
$swapX = EvalDo(
"SetVar(\"tmp\", x[i1], \"th\")",
"SetVar(\"x[i1]\", x[i2])",
"SetVar(\"x[i2]\", tmp)" )
x1 = 10
x2 = 20
x3 = 30
i1 = 1
i2 = 3
swapX = 1
x1 = 30
x2 = 20
x3 = 10
EvalDoWhile
Iteratively calculates a sequence of strings whilst a condition is True(1).
Syntax
EvalDoWhile( expression1,…expression[n], condition )
Parameters
expression1 is the first expression to calculate for each iteration
condition is the final expression calculated for each loop iteration, the iteration continues until the result of this
expression is False(0) .
Return Value
Returns True(1) if the iteration completed successfully; otherwise returns False(0).
Remarks
Note that the condition and the expressions must be defined as strings, i.e. enclosed in quotes, this ensures that the
expression is re-calculated upon each iteration of the loop.
Named placeholders can be used within the condition and the expressions.
Placeholders – Placeholders allow you to substitute the value of another variable in the expression before the expression
is processed which is particularly useful when writing iterative calculations. If you had a set of related variables x 1, x2, x3
you might want to use a counter variable to determine which value of x you are currently using. A placeholder allows you
to use the counter variable within the expression.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
DrawCreateDrawing(720,200) = 1.000
DrawLine( -360, 0, 360, 0 ) = 1.000
DrawLine( 0, -100, 0, 100 ) = 1.000
DrawLineColor("green")=1.000
x = -360
$y = 100 * sin(x)
DrawMove( x, y ) = 1.000
EvalDoWhile( "DrawLine(x,y)",
"increment(\"x\") <= 360" ) = 1.000
EvalFile
Calculates a text file.
Syntax
EvalFile( fileName, output)
Paramaters
filename is the full path to the text file.
output determines whether to output (Append) or discard (Discard) the calculated text.
Example
{ =CSC|CALL EvalFile( "C:\InputVariables.txt", Append ) }
EvalFor
Iteratively calculates a sequence of strings using a counter variable whilst a condition is True(1).
Syntax
EvalFor( counterName, initialValue, continueCondition, incrementValue, expression1,…expression[n] )
Parameters
counterName is the name of the variable to be used as the counter
continueondition is the expression that is calculated at the start of each iteration, the loop will continue as long as
the result of this expression is True (1)
incrementValue is the value that the counter is incremented by at the end of each loop iteration, a negative
value can be used to create a loop that counts backwards
Return Value
Returns True(1) if the iteration completed successfully; otherwise returns False(0).
Remarks
Note that the condition and the expressions must be defined as strings, i.e. enclosed in quotes, this ensures that the
expression is re-calculated upon each iteration of the loop.
Named placeholders can be used within the condition and the expressions.
Placeholders – Placeholders allow you to substitute the value of another variable in the expression before the expression
is processed which is particularly useful when writing iterative calculations. If you had a set of related variables x 1, x2, x3
you might want to use a counter variable to determine which value of x you are currently using. A placeholder allows you
to use the counter variable within the expression.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
DrawCreateDrawing(720,200) = 1.000
Page 354 of 903
Tedds 2020 - Function and Field Reference
EvalIf
Calculates a string as an expression if the condition expression is True and returns the result of the expression.
Syntax
EvalIf( condition, expression )
EvalIf(condition, format )
Parameters
condition is the expression that must evaluate to either True (1) or False (0)
format is the string format. Place holders indicate where to insert values in the string and in what
format.
value1 is the first value that can be inserted into the string
value[n] is the nth value that can be inserted into the string
Return Value
Returns the result of the expression.
Remarks
The eval function is used to calculate a string as an expression. It can be used to format a string that is then calculated or
it is sometimes used to prevent an expression from being calculated that would otherwise cause Tedds to error, for
example a divide by zero error. For more information about using the format string with placeholders please refer to the
documentation for StrFormat.
a = 1
b = 0
EvalIf( b<>0, "a/b" ) = 0.000
b = 2
EvalIf( b<>0, "a/b" ) = 0.500
EvalWhile
Iteratively calculates a sequence of strings whilst a condition is True(1).
Syntax
EvalWhile( condition, expression1,…expression[n] )
Parameters
condition is the expression calculated for each loop iteration, the iteration continues until the result of this
expression is False(0) .
Return Value
Returns True(1) if the iteration completed successfully otherwise returns False(0).
Remarks
Note that the condition and the expressions must be defined as strings, i.e. enclosed in quotes, this ensures that the
expression is re-calculated upon each iteration of the loop.
Named placeholders can be used within the condition and the expressions.
Placeholders – Placeholders allow you to substitute the value of another variable in the expression before the expression
is processed which is particularly useful when writing iterative calculations. If you had a set of related variables x 1, x2, x3
you might want to use a counter variable to determine which value of x you are currently using. A placeholder allows you
to use the counter variable within the expression.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
DrawCreateDrawing(720,200) = 1.000
DrawLine( -360, 0, 360, 0 ) = 1.000
DrawLine( 0, -100, 0, 100 ) = 1.000
DrawLineColor("red")=1.000
x = -360
EvalWhile(
"x <= 360",
"DrawLine(x,100*sin(x),x+1,100*sin(x+1))",
"increment(\"x\")" ) = 1.000
ReturnArg
Returns the last argument.
Syntax
ReturnArg( arg1,…arg[n])
Parameters
arg1 First argument
Return Value
Returns the last argument passed to the function.
Remarks
In itself the ReturnArg function doesn't actually do anything it simply returns the last argument the caller passes.
However it can be used to execute a sequence of expressions in order by passing each expression as a subsequent
argument to the ReturnArg function, the result of the final expression will then be returned to the caller. If this
expression is then assigned to a variable so that it is stored as an expression value then the variable can be used to return
a single value from a sequence of expressions.
Example
L1 = 1 m; L2 = 2 m; L3 = 3m
$LTotal = ReturnArg(
SetVar("_LTotalResult", 0 m ),
EvalFor( "i", 1, "VarExists(\"L[i]\")", +1,
"Increment(\"_LTotalResult\", L[i])" ),
_LTotalResult
)
LTotal = 6.000 m
L4 = 4m
LTotal = 10.000 m
RootOfCubic
Returns the root of a cubic equation.
Syntax
Rootofcubic( a, b, c, d, startValue, tolerance, maxIterations )
Parameters
a
startValue is the point at which the function will start looking for a root value.
tolerance is the increment that is applied for each iteration to the number that is checked to see if it is a root.
maxIterations is the maximum number of iterations that the function will perform in order to find a root, if no root is
found within this number of iterations then an error is returned.
Remarks
A cubic could have three roots and the value found will not necessarily be the smallest so you should set the start value
accordingly to find the root you want. A quick sketch of your curve in a spreadsheet should give enough information to
allow either dynamic allocation of the start value e.g. startValue = min(a*b,c*d) or the correct start point for the root you
want to find.
The function returns a dimensionless number regardless of the parameter values. You must be careful to add the units to
the function as it is calculated. For example if a root is expected which has dimensions of kNm then the following should
be used;
Example
a = 34
b = 23
c = 33
d = 211
startValue = -1000000
Page 362 of 903
Tedds 2020 - Function and Field Reference
Tolerance = .001
maxIterations = 1000
x = Rootofcubic( a, b, c, d, startValue, tolerance, maxIterations )
= -1.894
a*x + b*x2 + c*x + d = 0.000
3
Database functions
DBOpen
Open a new database connection with the current provider.
Syntax
DBOpen( source, createNew, failIfMissing, readonly, password, compress, version )
Parameters
source optional data source path to database. Default is a new in memory database.
createNew optional, True to create a new database if one does not already exist. Default is True
failIfMissing optional, True to fail if database specified by source does not exist. Default is False
readonly optional, True to open database as read only. Default is False
password optional password to open database
compress optional, True to create database with compression. Default is False
version optional version of the database engine to use
Return Value
Unique numeric identifier for the new database connection.
DBClose
Close the database connection.
Syntax
DBClose( id )
Parameters
id optional database connection identifier returned by DBOpen, if not specified then the active database
connection is closed
Return Value
1 (True) if successful; otherwise 0 (False).
DBConnectionString
Creates a connection string with the specified keyword values.
Syntax
DBConnectionString( keyword1, value1, …keyword[n], value[n] )
Parameters
keyword name of the keyword
value value of the keyword
Return Value
The connection string with the specified keyword values.
DBGetConnectionCount
Return the number of open database connections.
Syntax
DBGetConnectionCount()
Return Value
Number of open database connections.
DBGetActiveConnection
Return the unique numeric identifier of the active database connection.
Syntax
DBGetActiveConnection()
Return Value
Active connection Id.
DBSetActiveConnection
Set the active database connection.
Syntax
DBSetActiveConnection( id )
Parameters
id unique numeric identifier of the database connection
Return Value
1 (True) if successful; otherwise 0 (False).
DBExecute
Execute the specified database command with the active connection.
Syntax
DBExecute( command )
Parameters
command command to execute
Return Value
Number of rows affected by the command.
DBExecuteQueryGetValue
Execute the specified database query with the active connection and return the value.
Syntax
DBExecuteQueryGetValue( query )
Parameters
query query to execute
Return Value
Value returned by the query.
DBExecuteQuery
Execute the specified database query with the active connection. DBGetValue can then be used to obtain values from
the first result row and DBNextRow can then be used to obtain values from subsequent rows.
Syntax
DBExecuteQuery( query )
Parameters
query query to execute
Return Value
Number of rows returned by the query command
DBGetValue
Return values from the current row of the most recent database query command. Use DBExecuteQuery to execute the
query and DBNextRow to advance to the next row within the results
Syntax
DBGetValue( column )
Parameters
column index or name of column.
Return Value
Result of the most recent database query command at the specified column in the current row.
DBNextRow
Move to the next row in the current query results.
Syntax
DBNextRow()
Return Value
1 (True) if successful; otherwise 0 (False).
DBCreateTable
Creates a new table using the active database connection. The table will have the columns previously specified by calls to
DBCreateTableColumn.
Syntax
DBCreateTable( name, rowIds, errorIfExists, temporary )
Parameters
name name of the table
rowIds optional, True to include row id column, default is True
errorIfExists optional, True to error if table already exists, default is True
temporary optional, True to create a temporary table, default is False
command optional additional command text
Return Value
1 (True) if successful; otherwise 0 (False)
DBCreateTableColumn
Specify a column to be created by DBCreateTable.
Syntax
DBCreateTableColumn( name, type, nullable, primaryKey )
Parameters
name name of column
type optional type of column
nullable optional, True to create nullable column, default is True
primaryKey optional, True to create primary key column, default is False
Return Value
Index that column will have when table is created.
DBCreateTableReference
Specify a reference to be created by DBCreateTable.
Syntax
DBCreateTableReference( column1, …column[n], referenceTable, referenceColumn1, …referenceColumn[n] )
Parameters
column columns to reference into the reference table
referenceTable table referenced by columns
referenceColumn column in reference table that corresponding column references to
Return Value
Index of reference when table is created.
DBCreateTableConstraint
Specify a unique constraint to be created by DBCreateTable.
Syntax
DBCreateTableConstraint( name, column1 ,…column[n] )
Parameters
name name of constraint
column set of columns that must be unique in constraint
Return Value
Index of constraint when table is created.
DBInsert
Insert a new row into the specified table using the active database connection.
Syntax
DBInsert( table, column1, value1, …column[n], value[n] )
Parameters
table table into which to insert the row
column name of column
value value to insert into column
Return Value
1 (True) if successful; otherwise 0 (False).
DBAddParameter
Adds a named parameter to be used when the next database command is executed.
Syntax
DBAddParameter( name, value )
Parameters
name name of the parameter
value value of the parameter
Return Value
The formatted parameter name as it should be used in the command.
DBSetParameter
Sets a named parameter to be used when the next database command is executed.
Syntax
DBSetParameter( name, value )
Parameters
name name of the parameter
value value of the parameter
Return Value
The formatted parameter name as it should be used in the command.
DBListProviders
Returns a list of the supported database providers.
Syntax
DBListProviders()
Return Value
List of supported database providers.
DBRegisterProvider
Register a new database provider.
Syntax
DBRegisterProvider( providerName, providerDescription, providerInvariantName, providerAssembly )
Parameters
providerName human readable name of database provider
providerDescription human readable description of the database provider
providerInvariantName name that can be used programmatically to refer to the data provider
providerAssembly Fully qualified name of provider factory class
Return Value
1 (True) if successful; otherwise 0 (False).
DBGetProvider
Return the name of the active database provider.
Syntax
DBGetProvider()
Return Value
Database provider name.
DBSetProvider
Set the default database provider.
Syntax
DBSetProvider( providerInvariantName )
Parameters
providerInvariantName name that can be used programmatically to refer to the data provider
Return Value
1 (True) if successful; otherwise 0 (False).
DBSetProviderBoolKeywords
Set Boolean keywords for current database provider.
Syntax
DBSetProviderBoolKeywords( trueString, falseString )
Parameters
trueString ‘True’ string used by the current database provider
falseString ‘False’ string used by the current database provider
Return Value
1 (True) if successful; otherwise 0 (False).
DBSetProviderConnectionKeywords
Set connection keywords for current database provider.
Syntax
DBSetProviderConnectionKeywords( source, createNew, failIfMissing, readonly, password, compress, inMemory, version
)
Parameters
source string used by current database provider for data source
createNew string used by current database provider to create a new database
failIfMissing string used by current database provider to fail if database specified does not exist
readonly string used by current database provider for read only database
password string used by current database provider for password
compress string used by current database provider for compression
inMemory string used by current database provider for in memory database
version string used by current database provider for engine version
Return Value
1 (True) if successful; otherwise 0 (False).
DBSetProviderCreateTableKeywords
Set create table keywords for current database provider.
Syntax
DBSetProviderCreateTableKeywords( format, formatColumn, ifNotExists, notNullable, primaryKey, temporary,
withoutRowId )
Parameters
format format of create table command using placeholders (See example)
formatColumn format of columns using placeholders (See example)
ifNotExists string used by current database provider for table existance
notNullable string used by current database provider for non null columns
primaryKey string used by current database provider for primary keys
temporary string used by current database provider for temporary tables
withoutRowId string used by current database provider for no row ids
Example
For SQLite these values are:
format CREATE [TEMPORARY] TABLE [ERROR] [NAME] ( [COLUMNS] [REFERENCES] [CONSTRAINTS] ) [COMMAND]
formatColumn [TABLE] [TYPE] [NULLABLE]
ifNotExists IF NOT EXISTS
notNullable NOT NULL
primaryKey PRIMARY KEY
temporary TEMPORARY
withoutRowId WITHOUT ROWID
Notes
The table name will be used for the [NAME] placeholder. Each column will be formatted using formatColumn and
combined. This combined string will be used for the [COLUMNS] placeholder in format.
Return Value
1 (True) if successful; otherwise 0 (False).
DBSetProviderInsertKeywords
Set insert keywords for current database provider.
Syntax
DBSetProviderInsertKeywords( format )
Parameters
format format of insert command using placeholders (See example)
Example
For SQLite these values are:
Notes
The table name will be used for the [NAME] placeholder.
Return Value
1 (True) if successful; otherwise 0 (False).
DBSetProviderParameterKeywords
Set parameter keywords for current database provider.
Syntax
DBSetProviderParameterKeywords( format )
Parameters
format format of paramaters using placeholders (See example)
Example
For SQLite these values are:
format @[NAME]
Notes
The parameter name will be used for the [NAME] placeholder.
Return Value
1 (True) if successful; otherwise 0 (False).
DataList functions
DListDeleteVars
Deletes all the variables for the current selection from the Tedds document.
Syntax
DListDeleteVars()
Return Value
1 if successful, otherwise 0
Example
DListSetFile(“Euro.dls”) = 1.000
DListWriteVars() = 1.000
ListVarsInSection() =
A = 0.001652;
Ax = 0.001040;
Ay = 0.000508;
Area_per_m = 0.536952;
Area_per_t = 0.041406;
B = 0.076000;
Cnotch = 0.004000;
D = 0.127000;
H = 0.000000;
Ixx = 0.000005;
Iyy = 0.000001;
J = 0.000000;
K1xx = 0.000084;
K1yy = 0.000023;
K2xx = 0.000171;
K2yy = 0.000005;
K3xx = 0.000009;
K3yy = 0.000041;
K4xx = 10.504448;
K4yy = 0.465069;
Mass = 12.968052;
Nnotch = 0.048000;
Name = "UKB 127x76x13";
Sxx = 0.000084;
Syy = 0.000023;
Source = "Corus Advance";
T = 0.007600;
Westok_No = 80.000000;
Zxx = 0.000075;
Zyy = 0.000015;
b_upon_T = 5.000000;
d = 0.096600;
d_upon_t = 24.150000;
fab_type = "R";
nnotch = 0.016000;
nxx = 0.268399;
nyy = 0.307510;
r = 0.007600;
rxx = 0.053534;
ryy = 0.018369;
t = 0.004000;
type = "I";
u = 0.895246;
x = 16.267060;
DListDeleteVars() = 1.000
ListVarsInSection() =
DListFileExists
Determines if the specified DataList file exists.
Syntax
DListFileExists( fileName )
Parameters
fileName name of the DataList file
Return Value
1 if file exists, otherwise 0.
Example
DListFileExists(“Euro.dls”) = 1.000
DListFileExists(“MissingFile.dls”) = 0.000
DListGetColumnStrList
Returns the list of column values for the specified level in the item hierarchy for the currently selected DataList page.
Syntax
DListGetColumnStrList( parent1, parent[n]… )
Parameters
parent1, parent[n] optional name or index of the parents in the hierarchy.
Return Value
Returns a comma separated string list of the column values for the specified level in the hierarchy of the currently
selected page. If no parameters are specified the list of values for the first column are returned.
Example
DListSetFile(“Euroecsi.dls”) = 1.000
DListSetPage(“Universal Beams”) = 1.000
Get list of values for B, where the parent is the 5th row
DListGetColumnStrList(5) = "102,146"
Get list of values for B, where the parent is "254"
DListGetColumnStrList("254") = "102,146"
Get list of values for Wt., where the parent is the 2nd row of the
5th row
DListGetColumnStrList(5, 2) = "31,37,43"
Get list of values for Wt., where the parent is "146" of "254"
DListGetColumnStrList("254", "146") = "31,37,43"
DListGetFile
Returns the file name of the currently selected DataList file.
Syntax
DListGetFile()
Return Value
1 if successful, otherwise 0.
Example
DListSetFile(“Euro.dls”) = 1.000
DListGetFile() = "Euro.dls"
DListGetFootNote
Returns the text for the specified footnote on the currently selected page.
Syntax
DListGetFootNote( footNoteId )
Parameters
footNoteId FootNote Id (1 to n, where n is the total number of foot notes)
Return Value
Returns the footnote text as a string. If the footnote does not exists an empty string will be returned.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Rolled Steel Joists”) = 1.000
DListGetFootNote(1) = "# Check availability"
DListGetFootNoteSymbol
Returns the symbol for the specified footnote on the currently selected page.
Syntax
DListGetFootNoteSymbol( footNoteId )
Parameters
footNoteId FootNote Id (1 to n, where n is the total number of foot notes)
Return Value
Returns the footnote symbol as a string. If the footnote does not exists an empty string will be returned.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Rolled Steel Joists”) = 1.000
DListGetFootNoteSymbol(1) = "#"
DListGetItemColumnValue
Returns the column value for the specified column for the currently selected DataList item.
Syntax
DListGetItemColumnValue( columnIndex )
Parameters
columnIndex optional index of the column.
Return Value
Returns the value of the specified column for the currently selected item.
Example
DListSetFile("Euroecsi.dls") = 1.000
DListSetPage("Universal Beams") = 1.000
Select 17th item on the page which is 305x127x42
DListSetItem(17) = 1.000
DListGetItemColumnValue(1) = "305"
DListGetItemColumnValue(2) = "127"
DListGetItemColumnValue(3) = "42"
DListGetItemDescription
Returns the description of the currently selected DataList item
Syntax
DListGetItemDescription( includeFootNotes )
Parameters
includeFootNotes optional value, if True footnote symbols are included in the item description; otherwise the
footnote symbols is omitted. By default foot notes are not included.
Return Value
Returns the description of the currently selected item on the currently selected page.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetItem(“127(76(13))”) = 1.000
DListGetItemDescription() = "UKB 127x76x13"
DListGetItemFootNotes
Returns all the footnote symbols for the currently selected item.
Syntax
DListGetItemFootNotes()
Return Value
Returns all the footnote symbols for the currently selected item as a string
Example
DListSetFile(“Euro.dls”, 1) = 1.000
DListSetPage(“Circular Hollow Sections”) = 1.000
DListSetItem (“139.7(3.6)”) = 1.000
DListGetItemFootNotes() = "#"
DListGetItemName
Returns the name of the currently selected item.
Syntax
DListGetItemName()
Return Value
Returns the name of the currently selected item as a string. The name is used to uniquely identify a DataList item on a
specific page in a specific DataList.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetItem(“127(76(13))”) = 1.000
DListGetItemName() = "127(76(13))"
DListGetItemStrList
Returns the list of items on the currently selected DataList page that match the current item filter.
Syntax
DListGetItemStrList( formatString )
Parameters
formatString optional value that specifies the string format for each item returned in the list. The default
format uses the placeholder [ItemName]. You can also use the placeholder [ItemDescription].
Return Value
Returns a comma separated string list of the items on the currently selected DataList page that match the current item
filter. By default the list will be the name of each item however the formatString parameter can be used to format each
element in the list for example “[ItemDescription]=\”[ItemName]\””. If no item filter has been defined using
DListSetItemFilter then all the items on the currently selected page will be returned.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Universal Beams”) = 1.000
DListSetItemFilter(“[D]<200mm”) = 3.000
DListGetItemStrList(“[ItemName]”) = "127(76(13)),152(89(16)),178(102(19))"
DListGetItemStrList(“[ItemDescription]”) = "UB 127x76x13,UB
152x89x16,UB 178x102x19"
DListGetPageColumnName
Returns the name of the specified column for the currently selected DataList page.
Syntax
DListGetPageColumnName(columnIndex)
Parameters
columnIndex Index of the column
Return Value
Returns the name of the specified column for the currently selected page.
Example
DListSetFile("Euroecsi.dls") = 1.000
DListSetPage("Universal Beams") = 1.000
DListGetPageColumnName(1) = "D"
DListGetPageColumnName(2) = "B"
DListGetPageColumnName(3) = "Wt."
DListGetPageName
Returns the name of the currently selected page for the currently selected DataList.
Syntax
DListGetPageName()
Return Value
Returns the name of the currently selected page for the currently selected DataList as a string. The name of the page is
unique to that DataList and is used in other DataList functions such as DListSetPage to identify a page.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListGetPageName() = "Advance UKB"
DListGetPageNumColumns
Returns the number of columns for the currently selected DataList page.
Syntax
DListGetPageNumColumns()
Return Value
Returns the number of columns for the currently selected page.
Example
DListSetFile("Euroecsi.dls") = 1.000
DListSetPage("Universal Beams") = 1.000
DListGetPageNumColumns() = 3.000
DListGetPageShortName
Returns the short (abbreviated) name of the currently selected page for the currently selected DataList.
Syntax
DListGetPageShortName()
Return Value
Returns the short (abbreviated) name of the currently selected page for the currently selected DataList as a string.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListGetPageName() = "Advance UKB"
DListGetPageShortName() = "UKB"
DListGetPageStrList
Returns the list of pages in the currently selected DataList that match the current page filter.
Syntax
DListGetPageStrList( formatString )
Parameters
formatString optional value that specifies the string format for each item returned in the list. The default
format uses the placeholder [PageName]. You can also use the placeholder [PageShortName].
Return Value
Returns a comma separated string list of the pages in the currently selected DataList that match the current page filter.
By default the list will be the name of each page however the formatString parameter can be used to format each
element in the list for example “[PageShortName]=\”[PageName]\””. If no page filter has been defined using
DListSetPageFilter then all the pages in the currently selected page will be returned.
Example
DListSetFile(“Euro.dls”) = 1.000
DListGetPageStrList() = "Advance UKB,Advance UKC,Advance
UKPFC,Universal Beams,Universal Columns,Rolled Steel
Joists,Asymmetric Beams,Slimflor Fabricated Beams,Rolled Steel
Channels,Rolled Steel Channels (Parallel),Rectangular Hollow
Sections,Square Hollow Sections,Circular Hollow
Sections,Structural Tee from UB,Structural Tee from UC,Equal
Angles,Unequal Angles,2 Equal Angles (back to back),2 Unequal
Angles (long leg back to back),2 Unequal Angles (short leg back
to back),Flat Bars,Parallel Faced Flange Beams,Wide/Very Wide
Flanged Beams,Wide Flanged Columns,European Standard
Beams,European Parallel Flange Channels,European Standard
Channels,European Rectangular Hollow Sections,European Square
Hollow Sections,European Circular Hollow Sections,European Equal
Angles,European Unequal Angles,European 2 Equal Angles (back to
back),European 2 Unequal Angles (long leg back to back),European
2 Unequal Angles (short leg back to back)"
DListGetVar
Returns the value of a DataList variable for the currently selected DtaList item.
Syntax
DListGetVar( varId, defaultValue )
Parameters
varId numeric identifier of the variable (1 to n, where n is the number of variables)
defaultValue value returned if the variable name or Id does not exist for the currently selected item
Return Value
Returns the value of a DataList variable for the currently selected DtaList item. If the variables does not exist the optional
default value is returned.
Example
DListSetFile(“Euro.dls”) = 1.000
DListGetItemName() = "127(76(13))"
DListGetVar(“D”, 150mm) = 127 mm
DListGetVar(5, 150mm) = 127 mm
DListGetVarMax
Returns the maximum numeric value of a DataList variable for all the items on the currently selected DataList page.
Syntax
DListGetVarMax( varName )
Parameters
varName name of the variable
Return Value
Returns the maximum numeric value of a DataList variable for all the items on the currently selected DtaList page.
Remarks
If an item filter has been defined using DListSetItemFilter then the value returned is the maximum for the items on the
currently selected page that match the item filter criteria.
Example
DListSetFile(“EuroEcSi.dls”) = 1.000
DListGetPageName() = "Universal Beams"
DListGetVarMax(“d”) = 868.200 mm
DListGetVarMin(“d”) = 96.600 mm
DListGetVarMin
Returns the minimum numeric value of a DataList variable for all the items on the currently selected DataList page.
Syntax
DListGetVarMin( varName )
Parameters
varName name of the variable
Return Value
Returns the minimum numeric value of a DataList variable for all the items on the currently selected DtaList page.
Remarks
If an item filter has been defined using DListSetItemFilter then the value returned is the minimum for the items on the
currently selected page that match the item filter criteria.
Example
DListSetFile(“EuroEcSi.dls”) = 1.000
DListGetPageName() = "Universal Beams"
DListGetVarMax(“d”) = 868.200 mm
DListGetVarMin(“d”) = 96.600 mm
DListGetVarName
Returns the name of the nth variable of the currently selected DataList item.
Syntax
DListGetVarName( varId )
Parameters
varId numeric identifier of the variable (1 to n, where n is the number of variables)
Return Value
Returns the name of the nth variable of the currently selected DataList item as a string.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListGetVarName(1) = "type"
DListGetVarName(2) = "fab_type"
DListGetVarName(3) = "Source"
DListGetVarUnits
Returns the units of the nth variable of the currently selected DataList item.
Syntax
DListGetVarUnits( varId )
Parameters
varId numeric identifier of the variable (1 to n, where n is the number of variables)
Return Value
Returns the units of the nth variable of the currently selected DataList item as a string.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListGetVarName(5) = "D"
DListGetVarUnits(5) = "mm"
DListItemExists
Determines if the specified DataList item exists on the currently selected page in the currently selected DataList.
Syntax
DListItemExists( itemName )
DListItemExists( itemID )
Parameters
itemName name of the DataList item
itemId numeric identifier of the item to be selected (1 to n, where n is the number of items)
Return Value
1 if file exists, otherwise 0.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage("Universal Beams") = 1.000
DListItemExists("127(76(13))") = 1.000
DListItemExists("Missing item") = 0.000
DListItemExists(DListNumItems()) = 1.000
DListItemExists(DListNumItems() + 1) = 0.000
DListNumFootNotes
Returns the number of footnotes specified for the currently selected DataList page.
Syntax
DListNumFootNotes()
Return Value
Number of footnotes.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Rolled Steel Joists”) = 1.000
DListNumFootNotes() = 1.000
DListNumItems
Returns the number of items on the currently selected DataList page.
Syntax
DListNumItems()
Return Value
Number of items on the currently selected DataList page.
Remarks
If an item filter has been defined using DListSetItemFilter then the value returned is the number of items on the
currently selected page that match the item filter criteria.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListNumItems() = 96.000
DListSetItemFilter("[D]<300mm")=12.000
DListNumItems() = 12.000
DListNumPages
Returns the number of pages in the selected DataList.
Syntax
DListNumPages()
Return Value
Number of pages in the selected DataList.
Remarks
If a page filter has been defined using DListSetPageFilter then the value returned is the number of pages in the currently
selected DataList that match the page filter criteria.
Example
DListSetFile(“euro.dls”) = 1.000
DListNumPages() = 35.000
DListSetPageFilter("[type]==\"I\"") = 9.000
DListNumPages() = 9.000
DListNumVars
Returns the number of variables for the currently selected DatList item.
Syntax
DListNumVars()
Return Value
Number of variables for the currently selected DataList Item.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListSetItem (“127(76(13))”) = 1.000
DListNumVars() = 43.000
DListPageExists
Determines if the specified DataList page exists in the currently selected DataList.
Syntax
DListPageExists( pageName )
DListPageExists( pageId )
Parameters
pageName name of the DataList page
pageId numeric identifier of the page to be selected (1 to n, where n is the number of pages)
Return Value
1 if file exists, otherwise 0.
Example
DListSetFile(“Euro.dls”) = 1.000
DListPageExists("Universal Beams") = 1.000
DListPageExists("Missing page") = 0.000
DListPageExists(DListNumPages()) = 1.000
DListPageExists(DListNumPages() + 1) = 0.000
DListSelect
Selects the specified data list item and writes all of the associated variables to the Tedds document.
Syntax
DListSelect( filename, selectedPageVar, selectedItemVar, suffix )
Parameters
filename name of the DataList file to select
selectedPageVar name of the variable to use for the current page selection
selectedItemVar name of the variable to use for the current item selection
suffix optional variable suffix which is added to the name of each variable written to the document
Return Value
1 if successful, otherwise 0
Remarks
DListSelect provides a function to select a page, item and write the variables to the Tedds document in a single operation
rather than using the separate functions DListSetFile, DListSetPage, DListSetItem and DListWriteVars. You do not need to
use any other DataList functions to use this function.
Example
Page = "Universal Columns"
Item = "254(254(167))"
DListSelect(“Euro.dls”, “Page”, “Item”) = 1.000
D = 289.100 mm
B = 265.200 mm
T = 31.700 mm
t = 19.200 mm
d = 200.300 mm
DListSelectUI
Shows the standard DataList user interface, the selected page and item variables are updated and the items variables are
written to the Tedds document.
Syntax
DListSelectUI( selectedFileName, selectedPageVar, selectedItemVar, suffix, pageFilter )
Parameters
selectedFileName name of the DataList file to select from or the name of the variable to use for the DataList file
selectedPageVar name of the variable to use for the current page selection
selectedItemVar name of the variable to use for the current item selection
suffix optional variable suffix which is added to the name of each variable written to the document
Return Value
1 if successful, otherwise 0
Remarks
DListSelectUI provides a single function to show the user the standard DataList user interface and write the selected
variables to the Tedds document. You do not need to use any other DataList functions to use this function.
Example 1
DListSelectUI("EuroEcsi.dls", "Page", "Item", "_{1}",
"[type]==\"I\"") = 0.000
Example 2
File = "EuroEcsi.dls"
DListSelectUI("File", "Page", "Item") = 1.000
File = "EuroEcsi-FI.dls"
Page = "European Square Hollow Sections"
Item = "90(90(3.0))"
Page 423 of 903
Tedds 2020 - Function and Field Reference
DListSetFile
Sets the currently selected DataList file.
Syntax
DListSetFile( filename, reset )
Parameters
filename name of the DataList file to be selected
reset optional argument which defaults to TRUE, if TRUE datalist is reset which clears both the page and item
filters and sets the current selection to the first item on the first page. If FALSE current filters and selection are
maintained. By default the DataList is reset.
Return Value
1 if successful, otherwise 0.
Remarks
The DataList function library is a collection of Tedds functions for retrieving the data defined in the Tedds DataLists.
To retrieve data from a DataList you must first select the DataList using DListSetFile, you can then use the other DataList
functions to retrieve the pages, items and variables defined within the DataList. You can also use the DListShowUI or
DListSelectUI functions to allow a Tedds user to interact with the DataList by using the standard DataList user interface.
Example
DListSetFile(“Euro.dls”) = 1.000
DListShowUI() = 1.000
DListWriteVars() = 1.000
DListSetItem
Sets the currently selected DataList item for the currently selected DataList.
Syntax
DListSetItem( ItemName )
DListSetItem( ItemID )
Parameters
ItemName name of the DataList item to be selected
ItemID numeric identifier of the DataList item to be selected (1 to n, where n is the total number of
items on the currently selected page)
Return Value
1 if successful, otherwise 0.
Remarks
The selected item must exist on the currently selected page.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetItem(“127(76(13))”) = 1.000
DListGetItemName() = "127(76(13))"
DListSetItem (2) = 1.000
DListGetItemName() = "152(89(16))"
DListSetItemFilter
Sets the current item filter for the currently selected page.
Syntax
DListSetItemFilter( filterExpression )
Parameters
filterExpression expression used to filter the available items
Return Value
1 if successful, otherwise 0.
Remarks
When a DataList page is selected using DListSetPage all the items on that page are available. You can restrict the items
that are available by applying a filter, only those items that match the filter criteria will then be available when using the
other DataList functions such as DListGetNumItems.
The list of available items is filtered according to the filterExpression parameter which is calculated for each item on the
page. You can use placeholders within the expression to refer to any of the variables associated with that item. A
placeholder is denoted by enclosing a variable name in square brackets, so for example if you only want to include items
where the value of "D" is < 200mm you would use the expression "[D] < 200mm".
Note: The standard DataList user interface does not currently support filtered items.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetItemFilter(“[D]<200mm”) = 3.000
DListGetItemStrList(“[ItemName]”) =
"127(76(13)),152(89(16)),178(102(19))"
DListSetPage
Sets the currently selected DataList page for the currently selected DataList.
Syntax
DListSetPage( pageName )
DListSetPage( pageID )
Parameters
pageName name of the DataList page to be selected
PageID numeric identifier of the page to be selected (1 to n, where n is the number of pages)
Return Value
1 if successful, otherwise 0.
Remarks
The selected page must exist in the DataList. IF a page filter has been defined using DListSetPageFilter the selected page
must match the page filter criteria.
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPage(“Advance UKB”) = 1.000
DListGetPageName() = "Advance UKB"
DListSetPage(2) = 1.000
DListGetPageName() = "Advance UKC"
DListSetPageFilter
Sets the current page filter for the currently selected DataList.
Syntax
DListSetPageFilter( filterExpression )
Parameters
filterExpression expression used to filter the available pages. Named variable placeholders can be used for the
first item on the page [VarName], in addition the page name [PageName] and page short name [PageShortName] can be
used in the expression
Return Value
1 if successful, otherwise 0.
Remarks
When a DataList is selected using DListSetFile all the pages in that DataList are available. You can restrict the pages that
are available by applying a filter, only those pages that match the filter criteria will then be available when using the
other DataList functions such as DListGetNumPages.
The list of available pages is filtered according to the filterExpression parameter which is calculated for each page in the
DataList. You can use placeholders within the expression to refer to the page name and short name or any of the
variables associated with the first item on the page. A placeholder is denoted by enclosing a variable name in square
brackets, so for example if you only want to include pages which contain T sections in a steel section DataList where the
variable "type" denotes the section type you would use the expression "[type]==\"T\"".
Example
DListSetFile(“Euro.dls”) = 1.000
DListSetPageFilter(“[PageName]==\”Advance UKB\””) = 1.000
DListShowUI() = 1.000
DListSetPageFilter(“[type]==\”I\””) = 9.000
DListShowUI() = 1.000
DListShowUI
Shows the standard DataList user interface using the current settings as defined by the DataList functions DListSetFile,
DListSetPage, DListSetItem, and DListSetPageFilter.
Syntax
DListShowUI()
Return Value
1 if successful, otherwise 0
Remarks
If the users confirms their selection in the user interface by clicking "OK" only the currently selected page and item will
be updated no variables will be written to the Tedds document. To write variables use the DListWriteVars function.
Example
DListSetFile(“Euro.dls”) = 1.000
DListShowUI() = 1.000
DListGetPageName() = "Advance UKB"
DListGetItemName() = "305(102(28))"
DListWriteVars
Writes the variables for the selected data list item to the Tedds document
Syntax
DListWriteVars( suffix, varName1, varName[n], … )
Parameters
suffix optional variable suffix which is added to the name of each variable written to the document.
varName1, varName[n] optional names of variables to include, when omitted all variables are included.
Return Value
1 if successful, otherwise 0
Example
DListSetFile(“Euro.dls”) = 1.000
DListWriteVars() = 1.000
DListWriteVars( "_{1}", "d", "D", "T" ) = 1.000
Data tools
DataGraph
Shows a Tedds DataGraph for selecting variables.
Syntax
DataGraph( fileName, prefix, suffix, var1, var2, show )
Parameters
fileName is the name of the DataGraph file to open.
suffix is the optional text appended to all variables names for the selection.
show is the optional condition that determines if the DataGraph should be shown. If True(1) the DataGraph is
always shown; otherwise the DataGraph is only shown if the current selection cannot be determined.
Example
DataGraph( "5950-21a.dgt", "Example Datagraph: ", "_{1}", "", "",
Show ) = 1.000
a_over_d1 = 0.900
d_over_t1 = 130.000
qcr1 = 113.000 N/mm2;
DataList
Shows the Tedds DataList user interface for selecting variables.
Syntax
DataList( fileName, defaultPage, defaultItem, prefix, suffix, itemVar, pageVar, show, output, prompt )
Parameters
fileName is the name of the DataList file to open.
suffix is the optional text appended to the name of all variables written to the Tedds document.
itemVar is the optional name of the variable used for storing the selected item.
pageVar is the optional name of the variable used for storing the selected page.
show is the optional expression that determines if the DataList user interface should be shown. If True(1) the
DataList is always shown; otherwise the DataList is only shown if the current selection cannot be determined. You can
use the pre-defined Tedds system variables "Show" and "Hide" for this parameter.
prompt is the message prompt to display at the top of the DataList window.
Example
DataList("Euro.dls", "Universal Beams", "457(152(52))", "", "1",
"selectedItem", "selectedPage", Show, 0, "Select an I section")
= 1.000
selectedPage1 = "Universal Beams"
selectedItem1 = "457(152(52))"
DataTable
Shows a Tedds DataTable for selecting variables.
Syntax
DataTable( filename(s), prefix, suffix, show )
Parameters
filename(s) is the name of the DataTable file to open. To open more than one file simultaneously separate each file
name with a comma.
suffix is the optional text appended to the name of all variables written to the Tedds document.
show is the optional expression that determines if the DataTable user interface should be shown. If True(1) the
DataTable is always shown; otherwise the DataTable is only shown if the current selection cannot be determined. You
can use the pre-defined Tedds system variables "Show" and "Hide" for this parameter.
Remarks
DataTables allow you to access a wide range of standard engineering data including design tables, section tables and
proprietary manufacturers data. A DataTable allows you to select an item graphically, Tedds will then write the collection
of variables associated with that item to your Tedds document. DataTables may also include diagrams and notes and
allow you to search the data within the table as well as interpolate the data when aplpicable.
Example
DataTable("5950-21a.tbl", "", "1", Show ) = 1.000
a_over_d1 = 0.900
d_over_t1 = 130.000
qcr1 = 113.000 N/mm2;
Date
Returns the current date as a formatted string.
Syntax
Date( format )
Parameters
format is the format to output the data in (see below)
Remarks
The format of the date can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument =CSC|CALL DATE("dddd, MMMM d, yyyy") displays
"Friday, November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y);
hours (h) minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and
spaces.
Date instructions
Month (M)
The letter "M" must be uppercase to distinguish months from minutes.
Symbols
M
Displays the month as a number without a leading 0 (zero) for single-digit months. For example, July is "7".
MM
Displays the month as a number with a leading 0 (zero) for single-digit months. For example, July is "07".
MMM
MMMM
Day (d)
Displays the day of the month or the day of the week. The letter "d" can be either uppercase or lowercase.
Symbols
d
Displays the day of the week or month as a number without a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "6".
dd
Displays the day of the week or month as a number with a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "06".
ddd
Displays the day of the week or month as a three-letter abbreviation. For example, Tuesday is displayed as "Tue".
dddd
Year (y)
Displays the year as two or four digits. The letter "y" can be either uppercase or lowercase.
Symbols
yy
Displays the year as two digits with a leading 0 (zero) for years 01 through 09. For example, 1995 is displayed as "95", and
2006 is displayed as "06".
yyyy
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, Time("HH:mm 'Greenwich
mean time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space.
Example
Date("M-d, yy") = 3-28, 08
Date("MM-dd, yy") = 03-28, 08
Date("ddd-dd MMM, yy") = Fri-28 Mar, 08
Date("dddd dd, MMMM yyyy") = Friday 28, March 2008
DateTime
Returns the date and time as a formatted string.
Syntax
DateTime( format )
Parameters
format is the format to output the data and time in (see below)
Remarks
The format of the date or time can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument DateTime("dddd, MMMM d, yyyy") displays "Friday,
November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y); hours (h)
minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and spaces.
Date instructions
Month (M)
The letter "M" must be uppercase to distinguish months from minutes.
Symbols
M
Displays the month as a number without a leading 0 (zero) for single-digit months. For example, July is "7".
MM
Displays the month as a number with a leading 0 (zero) for single-digit months. For example, July is "07".
MMM
MMMM
Day (d)
Displays the day of the month or the day of the week. The letter "d" can be either uppercase or lowercase.
Symbols
d
Displays the day of the week or month as a number without a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "6".
dd
Displays the day of the week or month as a number with a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "06".
ddd
Displays the day of the week or month as a three-letter abbreviation. For example, Tuesday is displayed as "Tue".
dddd
Year (y)
Displays the year as two or four digits. The letter "y" can be either uppercase or lowercase.
Symbols
yy
Displays the year as two digits with a leading 0 (zero) for years 01 through 09. For example, 1995 is displayed as "95", and
2006 is displayed as "06".
yyyy
Time instructions
Hours (h)
A lowercase "h" bases time on the 12-hour clock. An uppercase "H" bases time on the 24-hour, or military, clock; for
example, 5 P.M. is displayed as "17".
Symbols
h or H
Displays the hour without a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "9".
hh or HH
Displays the hour with a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "09".
Minutes (m)
The letter "m" must be lowercase to distinguish minutes from months.
Displays minutes without a leading 0 (zero) for single-digit minutes. For example =CSC|CALL TIME("m") displays "2".
mm
Displays minutes with a leading 0 (zero) for single-digit minutes. For example, =CSC|CALL TIME("mm")displays "02".
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, DateTime("HH:mm
'Greenwich mean time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space.
Example
DateTime("HH:mm MMM-d, yy") = 16:06 Mar-28, 08
DateTime("'Now:' HH:mm:ss, dddd MMMM dd, yyyy") = Now: 16:07:40, Friday
March 28, 2008
Time
Shows the current time.
Syntax
Time( format )
Parameters
format is the format to output the time and time in (see below)
Remarks
The format of the time can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument =CSC|CALL DATE("dddd, MMMM d, yyyy") displays
"Friday, November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y);
hours (h) minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and
spaces.
Time instructions
Hours (h)
A lowercase "h" bases time on the 12-hour clock. An uppercase "H" bases time on the 24-hour, or military, clock; for
example, 5 P.M. is displayed as "17".
Symbols
h or H
Displays the hour without a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "9".
hh or HH
Displays the hour with a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "09".
Minutes (m)
The letter "m" must be lowercase to distinguish minutes from months.
Displays minutes without a leading 0 (zero) for single-digit minutes. For example =CSC|CALL TIME("m") displays "2".
mm
Displays minutes with a leading 0 (zero) for single-digit minutes. For example, =CSC|CALL TIME("mm")displays "02".
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, ("HH:mm 'Greenwich mean
time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space.
Example
Time("HH:mm:ss") = 15:58:58
Time("h:m:s") = 3:58:59
Time("'The current time is' HH:mm:ss") = The current time is 15:59:0
Drawing functions
DrawArc
Draws part of the outline of an ellipse. The arc will be drawn using the current line colour, style and width.
Syntax
DrawArc( x1, y1, width, height, startAngle, sweepAngle )
Parameters
x1
x co-ordinate
y1
y co-ordinate
width
width of the ellipse that contains the arc
height
height of the ellipse that contains the arc
startAngle
angle between the x-axis and the starting point of the arc
sweepAngle
angle between the starting and end point of the arc
Return Value
1 if successful; otherwise 0
Remarks
The location that the arc is drawn relative to the co-ordinate is dependent on the Arc alignment property which can be
set using the DrawArcAlignment function. By default the co-ordinate is the bottom left co-ordinate of the ellipses
bounding rectangle.
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawArc( 0mm, 0mm, 100mm, 50mm, 0, 90 ) = ?
DrawArcAlignment
Sets the alignment used by the DrawArc function. The alignment determines how the bounding rectangle of the
complete ellipse is positioned relative to the output co-ordinate.
Syntax
DrawArcAlignment( horizontalAlignmentName, verticalAlignmentName )
Parameters
horizontalAlignmentName
horizontalAlignmentId
numeric id of alignment type to use for aligning arc horizontally
verticalAlignmentName
verticalAlignmentId
numeric id of alignment type to use for aligning arc vertically
Return Value
1 if successful; otherwise 0
Remarks
The alignment is the relationship between the bounding rectangle of the complete ellipse that the arc is part of and the
output co-ordinate.
The following table lists the alignment types. The default alignment is near, near which is the bottom left corner of the
bounding rectangle.
Id Name Description
-1 “Default” Use default ellipse alignment (near)
0 “Near” Arc is aligned so that the bottom left corner of the ellipses bounding rectangle is
nearest to the co-ordinate.
1 “Centre” Arc is aligned so that the centre of the ellipse is at the co-ordinate.
“Center”
2 “Far” Arc is aligned so that the bottom left corner of the ellipses bounding rectangle is the
height of the bounding rectangle away from the co-ordinate.
Example
DrawCreateDrawing( 50, 50 ) = ?
DrawArcAlignment("near","near")=?
DrawArc( 0, 0, 50, 50, 0, 90 ) = ?
DrawLineColor( “red” ) = ?
DrawLine( -5, 0, 5, 0 ) = ?
DrawLine( 0, -5, 0, 5 ) = ?
DrawArcAlignment("Centre","Centre")=?
DrawArcAlignment("far","far")=?
DrawArcIf
Draws part of the outline of an ellipse. The arc will be drawn using the current line colour, style and width. The arc is only
drawn if the condition expression evaluates to true.
Syntax
DrawArc( condition, x1, y1, width, height, startAngle, sweepAngle )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate
y1
y co-ordinate
width
width of the ellipse that contains the arc
height
height of the ellipse that contains the arc
startAngle
angle between the x-axis and the starting point of the arc
sweepAngle
angle between the starting and end point of the arc
Return Value
1 if successful; otherwise 0
Remarks
The location that the arc is drawn relative to the co-ordinate is dependent on the Arc alignment property which can be
set using the DrawArcAlignment function. By default the co-ordinate is the bottom left co-ordinate of the ellipses
bounding rectangle.
Example
sweepAngle = 180
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawRectangle( 0mm, 0mm, 100mm, 50mm ) = ?
DrawArcIf(sweepAngle>=90, 0mm, 0mm, 100mm, 50mm, 0, sweepAngle ) = ?
sweepAngle = 45
DrawClipClear
Removes the current clipping region as defined by DrawClipRectanlge or DrawClipPath.
Syntax
DrawClipClear()
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawCreatePath() = 1.000
Create a triangluar clipping region to clip a circle and only show a
segment of the circle
DrawLine( 0mm, 0mm, 50mm, 50mm, 100mm, 0mm ) = 1.000
DrawClipPath() = 1.000
DrawDestroyPath()=1.000
DrawFillEllipse( 0mm, 0mm, 100mm, 100mm ) = 1.000
DrawClipClear() = 1.000
DrawEllipse( 0mm, 0mm, 100mm, 100mm ) = 1.000
DrawClipPath
Sets the clipping region to the current drawing path created using DrawCreatePath which then restricts other drawing
commands to this region.
Syntax
DrawClipPath()
Return Value
1 if successful; otherwise 0
Remarks
When a clipping region is defined the parts of the drawing that lie outside the clipping region will not
be visible. All subsequent drawing operations will be clipped until a new clipping region is defined or
until the clipping region is cleared using DrawClipClear.
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawCreatePath() = 1.000
Create a triangluar clipping region to clip a circle and only show a
segment of the circle
DrawLine( 0mm, 0mm, 50mm, 50mm, 100mm, 0mm ) = 1.000
DrawClipPath() = 1.000
DrawDestroyPath()=1.000
DrawFillEllipse( 0mm, 0mm, 100mm, 100mm ) = 1.000
DrawClipClear() = 1.000
DrawClipRectangle
Sets the clipping rectangle which restricts other drawing commands to a region.
Syntax
DrawClipRectangle( x1, y1, width, height )
Parameters
x1
y1
y co-ordinate of bottom left corner of clipping rectangle
width
width of clipping rectangle
height
height of clipping rectangle
Return Value
1 if successful; otherwise 0
Remarks
When a clipping region is defined the parts of the drawing that lie outside the clipping region will not
be visible. All subsequent drawing operations will be clipped until a new clipping region is defined or
until the clipping region is cleared using DrawClipClear.
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawClipRectangle( 5mm, 5mm, 90mm, 90mm ) = 1.000
DrawFillEllipse( 0mm, 0mm, 100mm, 100mm ) = 1.000
DrawClipClear() = ?
DrawCreateColor / DrawCreateColour
Creates a numeric color value which can be used with all other color functions.
Syntax
DrawCreateColor( colourName, transparency )
Parameters
colourName name of a predefined color, see remarks.
red amount of red component for a custom color. Value can between 0 and 255 inclusive.
green amount of green component for a custom color. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom color. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can between 0 and 255 inclusive where 0 is completely
transparent and 255 is opaque. Default is 255 (opaque)
Return Value
Color value
Remarks
A custom color value can be defined by specifying the amount of red, green and blue components, each color
component must lie in the range 0 to 255, this allows for a total of more than 16 million colour combinations. The
transparency value allows you to specify the amount of transparency applied to the color which effects how the color is
combined other colors in a drawing.
System Colours
The following table lists the predefined system color values, when using each named system color the name must be
wrapped in qoutes, e.g. "aliceblue".
System palettes
Several system color palettes are also provided for data visualization. These include a status palette, a good (pass,
success, OK) status palette, a bad (fail, error) palette and a spectrum palette
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
color = DrawCreateColor( "red" ) = ?
DrawFillColour( color ) = ?
DrawFillRectangle( 0mm, 0mm, 50mm, 50mm ) = ?
color = DrawCreateColor( 0, 255, 0 ) = ?
DrawFillColour( color ) = ?
DrawFillRectangle( 0mm, 50mm, 50mm, 50mm ) = ?
color = DrawCreateColor( 0, 0, 255 ) = ?
DrawFillColour( color ) = ?
DrawFillRectangle( 50mm, 0mm, 50mm, 50mm ) = ?
color = DrawCreateColor( 128, 128, 128 ) = ?
DrawFillColour( color ) = ?
DrawFillRectangle( 50mm, 50mm, 50mm, 50mm ) = ?
color = DrawCreateColor( 128, 128, 128, 128 ) = ?
DrawFillColour( color ) = ?
DrawFillRectangle(25mm, 25mm, 50mm, 50mm ) = ?
DrawCreateDrawing
Creates a new drawing. A drawing must be created before any other drawing functions can be used.
Syntax
DrawCreateDrawing( width, height )
Parameters
width
Width of drawing
height
Height of drawing
Return Value
Numeric identifier that uniquely identifies the newly created drawing.
Remarks
The specified width and height of the drawing determine the scaling factors used when the drawing is output to the
document. The drawing will be scaled to 100% of the document page width unless the height of the drawing would be
too great to fit within the page height in which case the drawing is scaled to 100% of the document page height. The
width and height parameters do not restrict drawing operations to within the boundary specified, any drawing elements
drawn outside the width and height will cause the drawing to increase in size to contain those elements.
To output a drawing to the document use the Tedds field ShowDrawing which will display the currently active drawing in
the document. Once a drawing has been output no further drawing commands can be used on that drawing because the
drawing is automatically destroyed.
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawRectangle( 0mm, 0mm, 100mm, 100mm ) = ?
DrawCreatePath
Creates a new drawing path. A drawing path stores a sequence of lines, arcs and shapes. The entire sequence can be
drawn as a single shape using DrawPath or DrawFillPath. The sequence of lines, arcs and shapes can be partitioned into
separate figures. Paths are useful for creating complex filled shapes and for drawing the same shape more than once.
Syntax
DrawCreatePath( name )
Parameters
name is the optional name of the new path
Return Value
Numeric identifier that uniquely identifies the newly created path
Remarks
A path consists of one or more figures. As you draw lines and curves they will be added to the current path, those lines
and curves become part of a figure. You can start a new figure by calling the DrawPathStartFigure function. When you
draw a path, the lines and curves within an individual figure are connected by straight lines; the ending point of one line
or curve is connected to the starting point of the next line or curve. No connecting line is drawn between the end of one
figure and the start of the next figure.
Some shapes (for example, rectangles and ellipses) are intrinsically closed. When you add an intrinsically closed shape to
a path, that shape is in a figure by itself.
All draw functions for lines, arcs, ellipses, rectangles and polygons that are called after a path has been created will be
added to the current path instead of being drawn to the drawing canvas. Only when the path itself is drawn using
DrawPath or DrawFillPath will the drawing elements actually be drawn to the drawing canvas using the current draw
settings.
If you create multiple paths which you want to use repeatedly in your drawing you can set the active path by using
DrawSetActivePath.
If there is a current transformation sequence defined the transformation will not effect the lines, arcs and shapes added
to the path, the transformation sequence will only be applied when the path is actually drawn.
When you have finished using the current path you must call DrawDestroyPath so that all subsequent drawing functions
work as normal and are not added to the current path.
Example 1
Example 2
DrawCreateDrawing( 100mm, 100mm )=2.000
DrawLineColour(“lightblue”)=1.000
DrawGrid(-150mm,-150mm,300mm,300mm,10mm,10mm)=1.000
DrawLineColour(“default”)=1.000
DrawCreatePath( "I section" )=1.000
DrawLine( 0mm, 0mm, 0mm, 10mm, 45mm, 10mm, 45mm, 90mm, 0mm, 90mm,
0mm, 100mm, 100mm, 100mm, 100mm, 90mm, 55mm, 90mm, 55mm, 10mm,
100mm, 10mm, 100mm, 0mm ) = 1.000
DrawCreatePath( "C section" )=2.000
DrawLine( 0mm, 0mm, 0mm, 100mm, 100mm, 100mm, 100mm, 90mm, 10mm,
90mm, 10mm, 10mm, 100mm, 10mm, 100mm, 0mm ) = 1.000
DrawSetActivePath( 0 ) = 1.000
DrawCreateTransform
Creates a new drawing transformation. A drawing transformation must be created before any other drawing
transformation functions can be used.
Syntax
DrawCreateTransform( order )
Parameters
order Optional parameter that specifies how subsequent transformations are added to the active transformation, see
remarks
Return Value
1 if successful; otherwise 0
Remarks
Order Description
"Append" Transformation commands are added to the end of the overall transformation matrix
"Prepend" Transformation commands are added to the begining of the overall transformation matrix
A drawing transformation is applied to all subsequent drawing commands so that the co-ordinates used are
automatically modified by the drawing transformation. A drawing transformation consists of a sequence of
transformation commands that are combined to apply the overall transformation. Transformations are available for
rotation, scaling and translation. When you no longer want a transformation to be used ensure that you use the
DrawDestroyTransform function to destroy the current transformation sequence.
If previous drawing transformations already exist then the new transformation will inherit all previous transformations.
When the new drawing transformation is destroyed the previous drawing transformation will be restored.
To apply a rotation use the DrawTransformRotate function, to apply a scaling transformation use the
DrawTransformScale function and finally to apply a translation use the DrawTransformTranslate function. The sequence
of transformations is applied in the order that the transformation functions are called and there is no limit to the number
of transformations that are applied.
Example
DrawCreateDrawing( 300mm, 300mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(-150mm,-150mm,300mm,300mm,10mm,10mm)=?
Page 462 of 903
Tedds 2020 - Function and Field Reference
DrawLineColour(“default”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawCreateTransform()=?
DrawTransformRotate(45)=?
DrawLineColour(“salmon”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawTransformTranslate(100mm,0mm)=?
DrawLineColour(“green”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawTransformScale(0.5,0.5)=?
DrawLineColour(“blue”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawDestroyTransform()=?
DrawLineColour(“red”)=?
DrawLine(-10mm,0mm,10mm,0mm)=?
DrawLine(0mm,-10mm,0mm,10mm)=?
DrawCurve
Draws a curve using a cardinal spline using the specified co-ordinates with the current line colour, style and width.
Syntax
DrawCurve(tension, x1, y1, … x[n], y[n] )
Parameters
tension
determines the amount of bend on the spline, typically in the range 0.0 to 1.0 where zero draws a straight line
x1
y1
y co-ordinate that the cardinal spline passes through
Remarks
A cardinal spline is a curve which passes smoothly through the specified co-ordinates. Then tension value changes the
way the cardinal spline bends between each co-ordinate. When the tension value is zero the co-ordinates are connected
by straight lines.
If only a single co-ordinate is specified then a curve will be drawn from the last known co-ordinate to the specified co-
ordinate. The last known co-ordinate is the last co-ordinate used in a previous call to DrawCurve, DrawLine or the co-
ordinate specified to DrawMove.
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing() = 1.000
DrawCurve(0.6, 0mm, 0mm, 25mm, 7mm, 75mm, -7mm, 100mm, 0mm ) = 1.000
DrawCreateDrawing() = 2.000
x1 = 20mm; y1 = 50mm;
x2 = 100mm; y2 = 10mm;
x3 = 200mm; y3 = 100mm;
x4 = 300mm; y4 = 50mm;
x5 = 400mm; y5 = 80mm
DrawCurve(0.0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5) = 1.000
DrawLineColor("Blue") = 1.000
DrawCurve(0.6, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5) = 1.000
DrawLineColor("Red") = 1.000
DrawCurve(1.0, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5) = 1.000
DrawEllipseAlignment("Center", "Center") = 1.000
DrawFillColor("Green") = 1.000
EvalFor( "i", 1, "i <= 5", +1,
"DrawFillEllipse( x[i], y[i], 5mm, 5mm )" ) = 1.000
DrawDestroyDrawing
Destroys a drawing previously created using DrawCreateDrawing.
Syntax
DrawDestroyDrawing( id )
Parameters
id
Optional drawing identifier returned by DrawCreateDrawing, if not specified then the active drawing is destroyed.
Return Value
1 if successful; otherwise 0
Remarks
Destroys a drawing created by DrawCreateDrawing and frees all the system. resources associated with the drawing. This
function is only required if you have created a drawing that you do not want to output, when a drawing is output it is
automatically destroyed by TEDDS.
DrawDestroyPath
Destroys a drawing path previously created using DrawCreatePath.
Syntax
DrawDestroyPath( id )
DrawDestroyPath( name )
Parameters
name is the optional name of the path as specified to DrawCreatePath
id is the optional unique numeric identifier of the path as returned from DrawCreatePath. Use 0 to set no
active path.
Return Value
1 if successful; otherwise 0
Remarks
Destroys a drawing path created by DrawCreatePath. Once the current path is destroyed all drawing commands will
operate as normal and will not be added to a drawing path.
If a name or id parameter is not specified the current drawing path will be destroyed.
DrawDestroyTransform
Destroys the current transformation previously created using DrawCreateTransform.
Syntax
DrawDestroyTransform()
Return Value
1 if successful; otherwise 0
Remarks
Destroys the current transformation created by DrawCreateTransform. Once the current transformation is destroyed the
previously defined transformation will apply, if there is no previous transformation then all drawing commands will be
drawn with no transformations applied.
Example
width = 20
height = 50
DrawCreateDrawing( 100, 100 ) = ?
DrawLineColor( "red" ) = ?
DrawRectangle( 0, 0, width, height ) = ?
DrawCreateTransform() = ?
DrawTransformTranslate( width, 0 ) = ?
DrawLineColor( "green" ) = ?
DrawRectangle( 0, 0, width, height ) = ?
DrawCreateTransform() = ?
DrawTransformTranslate( width, 0 ) = ?
DrawLineColor( "blue" ) = ?
DrawRectangle( 0, 0, width, height ) = ?
DrawDestroyTransform() = ?
DrawFillColor( "red" ) = ?
DrawFillRectangle( 0, 0, width, height / 2 ) = ?
DrawDestroyTransform() = ?
DrawFillColor( "green" ) = ?
DrawDimensionAlignment
Sets the dimension alignment used by the DrawDimensionLine function. The alignment determines how the bounding
box of the dimension is positioned vertically relative to the co-ordinates of the line.
Syntax
DrawDimensionAlignment( alignmentName, margin )
Parameters
alignmentName
name of alignment type to use for aligning dimension vertically
alignmentId
numeric id of alignment type to use for aligning dimension vertically
margin
optional margin that offsets the entire dimension relative to the co-ordinates of the line. The margin is only
applicable when using either the “near” or “far” alignment options.
Return Value
1 if successful; otherwise 0
Remarks
The alignment is relationship between the bounding rectangle of the dimension and co-ordinates.
The following table lists the alignment types. The default alignment is centre.
Id Name Description
-1 “Default” Use default dimension alignment (centre).
0 “Near” Dimension is aligned so that the bottom left corner of the dimensions bounding rectangle is
nearest to the top of the line between the dimensions start and end co-ordinate.
1 “Centre” Dimension is aligned so that the dimensions bounding rectangle is centered about the line
“Center” between the dimensions start and end co-ordinate.
2 “Far” Dimension is aligned so that the bottom left corner of the dimensions bounding rectangle is the
height of the bounding box away from the line between the dimensions start and end co-
ordinate.
Example
DrawCreateDrawing( 1000mm, 50mm ) = ?
DrawDimensionAlignment( “centre” ) = ?
DrawDimensionLine( 0mm, 0mm, 1000mm, 0mm ) = ?
DrawLineColour( “red” ) = ?
DrawLine( -5mm, 0mm, 5mm, 0mm ) = ?
DrawLine( 0mm, -5mm, 0mm, 5mm ) = ?
DrawLine( 1000mm-5mm, 0mm, 1000mm+5mm, 0mm ) = ?
DrawLine( 1000mm, -5mm, 1000mm, 5mm ) = ?
DrawDimensionAlignment( “near” ) = ?
DrawDimensionAlignment( “far” ) = ?
DrawDimensionLine
Draws a dimension line between two or more co-ordinate using the current line colour, style and width and the current
font and font colour. Each end of the line is drawn using the current dimension line cap style.
Syntax
DrawDimensionLine( x0, y0, x1, y1, string1, xn, yn, stringn, … )
Parameters
x0
x co-ordinate for start of first dimension line.
y0
y co-ordinate for start of first dimension line.
x1
x co-ordinate for end of first dimension line.
y1
y co-ordinate for end of first dimension line.
string1
optional string that is drawn at the centre of the dimension line. If the string is not specified the string will be
automatically created based on the distance between the start and end co-ordinates and will be formatted according to
the DrawDimensionStringFormat settings. If the string is the name of a variable the text will be formatted according to
the DrawDimensionStringFormatVar settings
xn
optional x co-ordinate for end of the nth dimension line when drawing a continuous dimension.
yn
optional y co-ordinate for end of the nth dimension line when drawing a continuous dimension.
stringn
optional string that is drawn at the centre of the n th dimension line when drawing a continuous dimension.
Return Value
1 if successful; otherwise 0
Remarks
The DrawDimensionLine function can be used to easily indicate the dimensions of other elements on a drawing. If only
two pairs of co-ordinates are specified then a single dimension is drawn, if more than two pairs of co-ordinates are
specified then a continuous dimension is drawn.
The line is drawn relative to the co-ordinates based on the Dimension Alignment property which can be set using the
DrawDimensionAlignment function.
The location that the string is drawn relative to the dimension line depends on the Draw Dimension String Alignment
property which can be set using the DrawDimensionStringAlignment function.
The orientation of the string depends on the Draw Dimension String Orientation property which can be set using the
DrawDimensionStringOrientation function.
If the string is too large to draw within the space of the dimension then the Draw Dimension String Fit property is used to
determine how to draw the string, this property can be set using the DrawDimensionStringFit function.
Example
DrawCreateDrawing( 1000mm, 50mm ) = 1.000
DrawDimensionLine( 0mm, 0mm, 1000mm, 0mm ) = 1.000
x1 = 1000mm
DrawDimensionLine( 0mm, 0mm, 1000mm, 0mm, “x1” ) = 1.000
DrawDimensionLineCap
Sets the style of line cap drawn at the start and end of a dimension line drawn using the DrawDimensionLine function.
Syntax
DrawDimensionLineCap( styleName )
Parameters
styleName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the predefined line cap style names.
Example
DrawCreateDrawing( 200mm, 50mm ) = ?
DrawLineColor( “lightgrey” ) = ?
DrawLine( 0mm, -5mm, 0mm, 15mm ) = ?
DrawLine( 50mm, -5mm, 50mm, 15mm ) = ?
DrawLineColor( “Black” ) = ?
DrawDimensionLineCap( "AutoArrow" ) = ?
DrawDimensionLine( 0mm, 0mm, 50mm, 0mm ) = ?
DrawDimensionLine( 0mm, 10mm, 20mm, 10mm ) = ?
DrawDimensionLineCapSize
Sets the size of the line cap drawn at the start and the end of a dimension drawn using DrawDimensionLine.
Syntax
DrawDimensionLineCapSize( size )
Parameters
size
size of line cap or zero to use auto sizing (default)
Return Value
1 if successful; otherwise 0
Remarks
If the size specified is zero then the size of line caps will be calculated automatically based on the current font size.
Example
DrawCreateDrawing( 200mm, 50mm ) = 1.000
DrawLineColor( "lightgrey" ) = 1.000
DrawLine( 0mm, 0mm, 0mm, 40mm ) = 1.000
DrawLine( 50mm, 0mm, 50mm, 40mm ) = 1.000
DrawLineColor( "black" ) = 1.000
DrawLineWidth( .5mm ) = 1.000
DrawFont( "Arial", 5mm ) = 1.000
DrawDimensionLineCap( "Arrow" ) = 1.000
DrawDimensionLineCapSize( 2mm ) = 1.000
DrawDimensionLine( 0mm, 30mm, 50mm, 30mm ) = 1.000
DrawDimensionLineCapSize( 4mm ) = 1.000
DrawDimensionLine( 0mm, 20mm, 50mm, 20mm ) = 1.000
DrawDimensionLineCapSize( 8mm ) = 1.000
DrawDimensionLine( 0mm, 10mm, 50mm, 10mm ) = 1.000
DrawDimensionLineCapSize( 0mm ) = 1.000
DrawDimensionLine( 0mm, 0mm, 50mm, 0mm ) = 1.000
DrawDimensionLineIf
Draws a dimension line between two or more co-ordinate using the current line colour, style and width and the current
font and font colour. Each end of the line is drawn using the current dimension line cap style. The line is only drawn if the
condition expression evaluates to true.
Syntax
DrawDimensionLineIf( condition, x0, y0, x1, y1, string1, xn, yn, stringn, … )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x0
x co-ordinate for start of first dimension line.
y0
y co-ordinate for start of first dimension line.
x1
x co-ordinate for end of first dimension line.
y1
y co-ordinate for end of first dimension line.
string1
optional string that is drawn at the centre of the dimension line. If the string is not specified the string will be
automatically created based on the distance between the start and end co-ordinates and using the appropriate Tedds
base system units. Expression text format is not currently supported.
xn
optional x co-ordinate for end of the nth dimension line when drawing a continuous dimension.
yn
optional y co-ordinate for end of the nth dimension line when drawing a continuous dimension.
stringn
optional string that is drawn at the centre of the n th dimension line when drawing a continuous dimension.
Return Value
1 if successful; otherwise 0
Remarks
The DrawDimensionLine function can be used to easily indicate the dimensions of other elements on a drawing. If only
two pairs of co-ordinates are specified then a single dimension is drawn, if more than two pairs of co-ordinates are
specified then a continuous dimension is drawn.
The line is drawn relative to the co-ordinates based on the Dimension Alignment property which can be set using the
DrawDimensionAlignment function.
The location that the string is drawn relative to the dimension line depends on the Draw Dimension String Alignment
property which can be set using the DrawDimensionStringAlignment function.
The orientation of the string depends on the Draw Dimension String Orientation property which can be set using the
DrawDimensionStringOrientation function.
If the string is too large to draw within the space of the dimension then the Draw Dimension String Fit property is used to
determine how to draw the srting, this property can bset using the DrawDimensionStringFit function.
Example
length = 250mm; height = 250mm
DrawCreateDrawing( length, height ) = ?
DrawFont( “Arial”, 20mm, “regular” ) = ?
DrawFillRectangle( 0mm, 0mm, length, height ) = ?
DrawDimensionAlignment( “far” ) = ?
DrawDimensionLineIf( length > 10mm, 0mm, 0mm, length, 0mm ) = ?
DrawDimensionLineIf( height > 10mm, length, 0mm, length, height ) =
?
height = 9mm
DrawDimensionStringAlignment
Sets the text alignment used by the DrawDimensionLine function. The alignment determines how the text is positioned
vertically relative to the dimension line.
Syntax
DrawStringAlignment( lineAlignmentName )
DrawStringAlignment( lineAlignmentId )
Parameters
lineAlignmentName
lineAlignmentId
numeric id of alignment type to use for aligning text vertically
Return Value
1 if successful; otherwise 0
Remarks
The alignment is relationship between the bounding rectangle of the string to output and the dimension line itself.
Id Name Description
-1 “Default” Use default string alignment (centre)
0 “Near” String is aligned so that the bottom left corner of the strings bounding rectangle is nearest to
the top of the line between the dimensions start and end co-ordinate.
1 “Centre” String is aligned so that the strings bounding rectangle is centered about the line between the
“Center dimensions start and end co-ordinate.
2 “Far” String is aligned so that the bottom left corner of the strings bounding rectangle is the height of
the bounding rectangle away from the line between the dimensions start and end co-ordinate.
Example
DrawCreateDrawing( 1000mm, 50mm ) = ?
DrawDimensionStringAlignment( “near” ) = ?
DrawDimensionLine( 0mm, 0mm, 1000mm, 0mm ) = ?
Page 480 of 903
Tedds 2020 - Function and Field Reference
DrawDimensionStringAlignment( “centre” ) = ?
DrawDimensionStringAlignment( “far” ) = ?
DrawDimensionStringFit
Sets the option that determines when drawing dimension lines that have dimension strings that are too large to draw
within the space of the dimension how to draw the string.
Syntax
DrawDimensionStringFit( fitId )
DrawDimensionStringFit( fitName )
Parameters
fitId
fitName
Return Value
1 if successful; otherwise 0
Remarks
If automatic string fitting is enabled the direction and alignment of the dimension and the orientation and alignment of
the dimension string effect where the string will be drawn if it will not fit within the dimension.
The following table lists the string fit styles. The default fit is auto.
Id Name Description
-1 “Default” Use default fit (Auto)
0 “Hide” Do not draw string.
1 “Auto” Adjust orientation and alignment of string for a
best fit.
Example
x = 75mm; y = 150mm; z = 20mm
DrawCreateDrawing( x+y+z, 10mm ) = ?
DrawDimensionLineCap(“barautoarrow”,”barautoarrow”) = ?
DrawFont(“Arial”,10mm,”regular”) = ?
DrawDimensionStringFit( “Auto” ) = ?
DrawDimensionLine( 0mm, 0mm, x, 0mm, x+y, 0mm, x+y+z, 0mm ) = ?
DrawDimensionLineCap(“barautoarrow”,”barautoarrow”) = ?
DrawDimensionStringFit( “Hide” ) = ?
z = 10mm
DrawDimensionLineCap(“barautoarrow”,”barautoarrow”) = ?
DrawDimensionStringFit( “Auto” ) = ?
DrawDimensionStringAlignment( “near” )=?
DrawDimensionStringFit( “Auto” ) = ?
DrawDimensionLine(0mm, 0mm, 0mm, z ) = ?
DrawDimensionLine(x, z, x, 0mm ) = ?
DrawDimensionStringFormat
Sets the string format used when drawing dimensions with DrawDimensionLine for string values that are not specified.
Syntax
DrawDimensionStringFormat( format, precision, units, showUnits )
Parameters
format
TEDDS number format (Fixed, Scientific, Engineering, General) used to format value to.
precision
units
showUnits
if True show units appended to dimension value; otherwise just show length value
Return Value
1 if successful; otherwise 0
Remarks
When using the function DrawDimensionLine the string value to draw within the dimension is optional, if the string
value is not specified the string will be automatically created using the length of the dimension formatted according to
the DrawDimensionStringFormat settings.
Format Description
“f” Fixed
“s” Scientific
“e” Engineering
“g” General
The following table lists the unit options. the default is either mm or ft in according to the Tedds base system units.
Units Description
“mm” millimetres
“cm” centimetres
“m” metres
“in” inches
“ft” feet
“ft in” feet and inches (1ft 1in)
“’\” inches (1”)
“’ \”” feet an inches (1‘ 1“)
Example
x = 500mm; y = 150mm; z = 250mm
DrawCreateDrawing( x+y+z, 50mm ) = ?
DrawFont(“Arial”,50mm,”regular”) = ?
DrawDimensionLine( 0mm, 0mm, x, 0mm, x+y, 0mm, x+y+z, 0mm ) = ?
DrawDimensionStringFormatVar
Sets the string format used when drawing dimensions with DrawDimensionLine and the dimension text used is the name
of a variable.
Syntax
DrawDimensionStringFormatVar( format )
Parameters
format is the string format. Place holders indicate where to insert values in the string and in what format.
@ is replaced with the name of the variable specified for the dimension
units is the units to display, if the units are enclosed in () then the unit name will not be included
Example
L = 1000mm
DrawCreateDrawing( 1000mm, 50mm ) = 1.000
DrawDimensionStringFormatVar ( “@” ) = 1.000
DrawDimensionLine( 0mm, 0mm, L, 0mm, “L” ) = 1.000
DrawDimensionStringOrientation
Sets the option that determines when drawing dimension lines using the DrawDimensionLine function at what angle the
string is drawn.
Syntax
DrawDimensionStringOrientation( orientationId )
DrawDimensionStringOrientation( orientationName )
Parameters
orientationId
orientationName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the string orientation styles. The default orientation is parallel.
Id Name Description
-1 “Default” Use default orientation (Parallel)
0 “Horizontal” String is always drawn horizontally.
1 “Parallel” String is drawn parallel to dimension.
2 “Perpendicular” String is drawn perpendicular to dimension.
Example
DrawCreateDrawing( 1000mm, 1000mm ) = ?
DrawFont(“Arial”,75mm,”regular”) = ?
DrawDimensionStringOrientation( “horizontal” ) = ?
DrawDimensionLine( 0mm, 0mm, 0mm, 1000mm ) = ?
DrawDimensionLine( 0mm, 0mm, 750mm, 750mm ) = ?
DrawDimensionStringOrientation( “parallel” ) = ?
DrawDimensionStringOrientation( “perpendicular” ) = ?
DrawDimensionStringRotate
This function is deprecated please see DrawDimensionStringOrientation.
DrawEllipse
Draws the outline of an ellipse using the specified width and height. The ellipse will be drawn using the current line
colour, style and width.
Syntax
DrawEllipse( x1, y1, width, height )
Parameters
x1
x co-ordinate
y1
y co-ordinate
width
width of ellipse
height
height of ellipse
Return Value
1 if successful; otherwise 0
Remarks
The location that the ellipse is drawn relative to the co-ordinate is dependent on the Ellipse alignment property which
can be set using the DrawEllipseAlignment function. By default the co-ordinate is the bottom left co-ordinate of the
ellipses bounding rectangle.
To draw a circle ensure that both the width and height parameters use the same value.
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawEllipse( 0mm, 0mm, 100mm, 50mm ) = ?
DrawEllipseAlignment
Sets the ellipse alignment used by the DrawEllipse function. The alignment determines how the ellipse is positioned
relative to the output co-ordinate.
Syntax
DrawEllipseAlignment( horizontalAlignmentName, verticalAlignmentName )
Parameters
horizontalAlignmentName
horizontalAlignmentId
numeric id of alignment type to use for aligning ellipse horizontally
verticalAlignmentName
verticalAlignmentId
numeric id of alignment type to use for aligning ellipse vertically
Return Value
1 if successful; otherwise 0
Remarks
The alignment is the relationship between the bounding rectangle of the ellipse and the output co-ordinate.
The following table lists the alignment types. The default alignment is near, near which is the bottom left corner of the
bounding rectangle.
Id Name Description
-1 “Default” Use default ellipse alignment (near)
0 “Near” Ellipse is aligned so that the bottom left corner of the ellipses bounding rectangle is at
the output co-ordinate.
1 “Centre” Ellipse is aligned so that the centre of the ellipse is at the co-ordinate.
“Center”
2 “Far” Ellipse is aligned so that the top right corner of the ellipses bounding rectangle is at
the output co-ordinate.
Example
DrawCreateDrawing( 50, 50 ) = ?
DrawEllipseAlignment("near","near")=?
DrawEllipse( 0, 0, 50, 50 ) = ?
DrawLineColor( “red” ) = ?
DrawLine( -5, 0, 5, 0 ) = ?
DrawLine( 0, -5, 0, 5 ) = ?
DrawEllipseAlignment("Centre","Centre")=?
DrawEllipseAlignment("far","far")=?
DrawEllipseIf
Draws the outline of an ellipse using the width and height. The ellipse will be drawn using the current line colour, style
and width. The ellipse is only drawn if the condition expression evaluates to true.
Syntax
DrawEllipseIf( condition, x1, y1, width, height )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate
y1
y co-ordinate
width
width of ellipse
height
height of ellipse
Return Value
1 if successful; otherwise 0
Remarks
The location that the ellipse is drawn relative to the co-ordinate is dependent on the Ellipse alignment property which
can be set using the DrawEllipseAlignment function. By default the co-ordinate is the bottom left co-ordinate of the
ellipses bounding rectangle.
To draw a circle ensure that both the width and height parameters use the same value.
Example
width = 100mm
height = 50mm
DrawCreateDrawing( width, height ) = ?
width = 50mm
DrawFillColor / DrawFillColour
Sets the color used to fill rectangles, polygons, ellipses and paths.
Syntax
DrawFillColor( colourName, transparency )
DrawFillColor( colour )
DrawFillColour( colour )
Parameters
colourName name of a predefined color, see remarks.
red amount of red component for a custom color. Value can between 0 and 255 inclusive.
green amount of green component for a custom color. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom color. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive where 0 is completely
transparent and 255 is completely opaque. Default is opaque i.e. no transparency.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = 4.000
DrawFillColour( "red" ) = 1.000
Page 497 of 903
Tedds 2020 - Function and Field Reference
DrawFillColourBackground / DrawFillColorBackground
Sets the background colour used to fill rectangles, polygons, ellipses and paths when a fill style other than solid is used.
Syntax
DrawFillColorBackground( colorName )
DrawFillColourBackground( colorName )
DrawFillColorBackground( color )
DrawFillColourBackground( color )
Parameters
colorName name of a predefined color, see remarks.
red amount of red component for a custom color. Value can between 0 and 255 inclusive.
green amount of green component for a custom color. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom color. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
colour Colour value created using DrawCreateColor.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colours refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawFillColor / DrawFillColour
Sets the color used to fill rectangles, polygons, ellipses and paths.
Syntax
DrawFillColor( colourName, transparency )
DrawFillColor( colour )
DrawFillColour( colour )
Parameters
colourName name of a predefined color, see remarks.
red amount of red component for a custom color. Value can between 0 and 255 inclusive.
green amount of green component for a custom color. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom color. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive where 0 is completely
transparent and 255 is completely opaque. Default is opaque i.e. no transparency.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = 4.000
DrawFillColour( "red" ) = 1.000
Page 501 of 903
Tedds 2020 - Function and Field Reference
DrawFillColourBackground / DrawFillColorBackground
Sets the background colour used to fill rectangles, polygons, ellipses and paths when a fill style other than solid is used.
Syntax
DrawFillColorBackground( colorName )
DrawFillColourBackground( colorName )
DrawFillColorBackground( color )
DrawFillColourBackground( color )
Parameters
colorName name of a predefined color, see remarks.
red amount of red component for a custom color. Value can between 0 and 255 inclusive.
green amount of green component for a custom color. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom color. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
colour Colour value created using DrawCreateColor.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colours refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawFillEllipse
Fills an ellipse at the specified co-ordinate using the specified width and height. The ellipse will be drawn using the
current fill colour and style.
Syntax
DrawFillEllipse( x1, y1, width, height )
Parameters
x1
x co-ordinate
y1
y co-ordinate
width
width of ellipse
height
height of ellipse
Return Value
1 if successful; otherwise 0
Remarks
The location that the ellipse is drawn relative to the co-ordinate is dependent on the Ellipse alignment property which
can be set using the DrawEllipseAlignment function. By default the co-ordinate is the bottom left co-ordinate of the
ellipses bounding rectangle.
To draw a circle ensure that both the width and height parameters use the same value.
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawFillEllipse( 0mm, 0mm, 100mm, 50mm ) = ?
DrawFillEllipseIf
Fills an ellipse using the specified width and height. The ellipse will be drawn using the current fill colour and style. The
ellipse is only drawn if the condition expression evaluates to true.
Syntax
DrawFillEllipseIf( condition, x1, y1, width, height )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate
y1
y co-ordinate
width
width of ellipse
height
height of ellipse
Return Value
1 if successful; otherwise 0
Remarks
The location that the ellipse is drawn relative to the co-ordinate is dependent on the Ellipse alignment property which
can be set using the DrawEllipseAlignment function. By default the co-ordinate is the bottom left co-ordinate of the
ellipses bounding rectangle.
To draw a circle ensure that both the width and height parameters use the same value.
Example
width = 100mm
height = 50mm
DrawCreateDrawing( width, height ) = ?
width = 50mm
DrawFillMode
Sets the option that determines how the interior of polygons and paths are filled.
Syntax
DrawFillMode( fillModeId )
DrawFillMode( fillModeName )
Parameters
fillModeId numeric id of a predefined fill mode, see remarks.
Return Value
1 if successful; otherwise 0
Remarks
The interior of a path or polygon as drawn by DrawFillPolygon or DrawFillPath is filled using one of two modes: alternate
or winding. The mode determines how to fill the interior of a closed figure.
The default mode is Alternate. To determine the interiors of closed figures in the alternate mode, draw a line from any
arbitrary start point in the path to some point obviously outside the path. If the line crosses an odd number of path
segments, the starting point is inside the closed region and is therefore part of the fill. An even number of crossings
means that the point is not in an area to be filled. An open figure is filled by using a line to connect the last point to the
first point of the figure.
The Winding mode considers the direction of the path segments at each intersection. It adds one for every clockwise
intersection, and subtracts one for every counter clockwise intersection. If the result is nonzero, the point is considered
inside the fill area. A zero count means that the point lies outside the fill area.
A figure is considered clockwise or counter clockwise based on the order in which the segments of the figure are drawn.
Example
DrawCreateDrawing( 200, 100 ) = ?
DrawEllipseAlignment( "center", "center" ) = ?
DrawCreatePath() = ?
DrawEllipse( 50, 50, 100, 50 ) = ?
DrawEllipse( 50, 50, 50, 100 ) = ?
DrawFillMode("alternate")=?
DrawFillPath( 0, 0 ) = ?
DrawFillMode("winding")=?
DrawFillPath( 100, 0 ) = ?
DrawDestroyPath() = ?
DrawStringAlignment( "center", "center" ) = ?
DrawString( 50, 50, "Alternate" ) = ?
DrawString( 150, 50, "Winding" ) = ?
DrawFillOutline
Sets the option that determines when filling rectangles, polygons, ellipses and paths whether the outline of the shape is
also drawn.
Syntax
DrawFillOutline( drawOutline )
Parameters
drawOutline
if True (1) then draw an outline otherwise if False(0) do not draw an outline.
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm ) = 1.000
DrawFillPolygon( 0mm, 0mm, 0mm, 50mm, 50mm, 100mm, 100mm, 50mm,
100mm, 0mm ) = 1.000
DrawFillOutline( True ) = ?
DrawFillPath
Fills the interior of the current drawing path using the current fill colour and style. If a figure in the path is not closed, this
function treats the non closed figure as if it were closed by a straight line that connects the figure’s starting and ending
co-ordinates.
Syntax
DrawFillPath()
Parameters
offsetX
optional horizontal translation
offsetY
optional vertical translation
scaleX
optional horizontal scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
scaleY
optional vertical scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
angle
optional angle of rotation in degrees, anti-clockwise from the x-axis
Return Value
1 if successful; otherwise 0
Remarks
A path is created using DrawCreatePath, as you draw lines and curves they will be added to the current path which may
consist of one or more figures. When you fill a path, the lines and curves within each figure are connected by straight
lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No connecting line
is drawn between the end of one figure and the start of the next figure.
Internal regions of the path are filled alternately, you can determine whether a test point is inside or outside a closed
path as follows: Draw a line from the test point to a point that is distant from the path. If that line crosses the path an
odd number of times, the test point is inside the path; otherwise, the test point is outside the path.
When you have created all the elements within the path DrawFillPath must then be called to actually draw the filled
path. The path can be drawn any number of times by using repeated calls to DrawFillPath, the optional transformation
arguments allow you to translate, scale and rotate the path each time it is drawn.
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(0mm,0mm,100mm,100mm,10mm,10mm)=?
DrawCreatePath()=?
DrawLine(0mm,0mm,0mm,90mm)=?
DrawArcAlignment(“near”,”far”)=?
DrawArc(0mm,100mm,20mm,20mm,180,-90)=?
DrawLine(10mm,100mm,20mm,100mm,20mm,0mm,0mm,0mm)=?
DrawRectangle( 5mm, 5mm, 10mm, 80mm )=?
DrawFillPath()=?
DrawDestroyPath() = ?
DrawFillColour(“red”)=?
DrawFillPath()=?
DrawFillColour(“green”)=?
DrawFillPath( 40mm, 0mm, -1.0, 1.0 )=?
DrawFillColour(“blue”)=?
DrawFillPath( 60mm, 20mm, 0.5, 0.5 )=?
DrawFillColour(“purple”)=?
DrawFillPath( 0mm, 0mm, 1.0, 1.0, 135 )=?
DrawFillColour(“pink”)=?
DrawFillPath( 70mm, 0mm, 1.0, 1.0, 135 )=?
DrawFillPathIf
Fills the interior of the current drawing path using the current fill colour and style. If a figure in the path is not closed, this
function treats the non closed figure as if it were closed by a straight line that connects the figure’s starting and ending
co-ordinates. The path is only drawn if the condition expression evaluates to true.
Syntax
DrawFillPathIf( condition )
Parameters
condition
Expression that must evaluate to either True (1) or False(0)
offsetX
optional horizontal translation
offsetY
optional vertical translation
scaleX
optional horizontal scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
scaleY
optional vertical scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
angle
optional angle of rotation in degrees, anti-clockwise from the x-axis
Return Value
1 if successful; otherwise 0
Remarks
A path is created using DrawCreatePath, as you draw lines and curves they will be added to the current path which may
consist of one or more figures. When you fill a path, the lines and curves within each figure are connected by straight
lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No connecting line
is drawn between the end of one figure and the start of the next figure.
Internal regions of the path are filled alternately, you can determine whether a test point is inside or outside a closed
path as follows: Draw a line from the test point to a point that is distant from the path. If that line crosses the path an
odd number of times, the test point is inside the path; otherwise, the test point is outside the path.
Example
width = 20mm
height = 100mm
DrawCreateDrawing( width, height )=?
DrawLineColour(“lightblue”)=?
DrawGrid(0mm,0mm,100mm,100mm,10mm,10mm)=?
DrawCreatePath()=?
DrawLine(0mm,0mm,0mm,height-10mm)=?
DrawArcAlignment(“near”,”far”)=?
DrawArc(0mm,height,20mm,20mm,180,-90)=?
DrawLine(10mm,height,width,height,width,0mm,0mm,0mm)=?
DrawRectangle( 5mm, 5mm, width-10mm, height-20mm )=?
DrawFillPathIf(width >= 20mm)=?
DrawDestroyPath() = ?
width = 10mm
DrawFillPathIf(width >= 20mm)=?
DrawFillPattern
Sets a user defined style used to fill rectangles, polygons, ellipses and paths. Patterns repeat to fill shape.
Syntax
DrawFillPattern( width , height , pattern )
Parameters
width
sets the pixel width of the pattern
height
sets the pixel height of the pattern
pattern
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 50mm, 50mm ) = 1.000
DrawFillPattern( 12,1,”100010001000” ) = 1.000
DrawFillRectangle( 0mm, 0mm, 25mm, 25mm ) = 1.000
DrawFillPattern( 12,5, “
110001100011
101110011101
100011110001
101110011101
110001100011”) = 1.000
DrawFillRectangle( 0mm, 25mm, 25mm, 25mm ) = 1.000
DrawFillPattern( 20,20, “
10000000000000000001
01000000000000000010
00100000000000000100
00010000000000001000
00001000000000010000
00000100000000100000
00000010000001000000
00000001000010000000
00000000100100000000
10000000011000000001
10000000011000000001
00000000100100000000
00000001000010000000
00000010000001000000
00000100000000100000
00001000000000010000
00010000000000001000
00100000000000000100
01000000000000000010
10000000000000000001”) = 1.000
DrawFillRectangle( 25mm, 0mm, 25mm, 25mm ) = 1.000
DrawFillPattern( 12,1,”111111110000” ) = 1.000
DrawFillRectangle( 25mm, 25mm, 25mm, 25mm ) = 1.000
DrawFillPatternOrigin
Sets the origin of the fill pattern created by DrawFillPattern when drawing filled shapes.
Syntax
DrawFillPatternOrigin( x, y )
Parameters
x
x co-ordinate of origin.
y
y co-ordinate of origin.
Return Value
1 if successful; otherwise 0
Remarks
When a shape is drawn with a fill pattern created by DrawFillPattern the origin of that pattern is by default located at 0,
0. The pattern is drawn at this origin and then repeats in the x and y axis in both positive and negative directions. When a
shape such as a rectangle is filled using the pattern the part of the pattern that will be drawn is relative to the fill pattern
origin. Using DrawFillPatternOrigin you can modify this drawing origin. Normally you would modify the origin to the
same co-ordinate as the bottom left co-ordinate of the shape you are filling with the pattern which ensures that the fill
starts with the same part of the pattern relative to the shape regardless of the co-ordinates of the shape itself.
Example
DrawFillRectangle( 0, 0, 100mm, 100mm ) = 1.000
DrawFillRectangle( 100mm, 15mm, 100mm, 100mm ) = 1.000
DrawFillPolygon
Fills a polygon using the specified co-ordinates, the polygon will be closed automatically between the last and first co-
ordinates. The polygon will be drawn using the current fill colour and style.
Syntax
DrawFillPolygon( x1, y1, … x[n], y[n] )
Parameters
x1
x co-ordinate
y1
y co-ordinate
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawFillPolygon( 0mm, 0mm, 0mm, 50mm, 50mm, 100mm, 100mm, 50mm,
100mm, 0mm ) = ?
DrawFillPolygonIf
Fills a polygon using the specified co-ordinates, the polygon will be closed automatically between the last and first co-
ordinates. The polygon will be drawn using the current fill colour and style. The polygon is only drawn if the condition
expression evaluates to true.
Syntax
DrawFillPolygonIf( condition, x1, y1, … x[n], y[n] )
Parameters
condition
Expression that must evaluate to either 1 or 0
x1
x co-ordinate
y1
y co-ordinate
Return Value
1 if successful; otherwise 0
Example
length = 50mm
DrawFillPolygonIf
Fills a polygon using the specified co-ordinates, the polygon will be closed automatically between the last and first co-
ordinates. The polygon will be drawn using the current fill colour and style. The polygon is only drawn if the condition
expression evaluates to true.
Syntax
DrawFillPolygonIf( condition, x1, y1, … x[n], y[n] )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate
y1
y co-ordinate
Return Value
1 if successful; otherwise 0
Example
length = 50mm
DrawCreateDrawing( 2length, 2length ) = ?
DrawPolygonIf( length > 5mm, 0mm, 0mm, 0mm, length, length,
2length, 2length, length, 2length, 0mm ) = ?
DrawFillRectangle
Fill a rectangle using the specified width and height. The rectangle will be drawn using the current fill colour and style.
Syntax
DrawFillRectangle( x1, y1, width, height )
Parameters
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawFillRectangle( 0mm, 0mm, 100mm, 50mm ) = ?
DrawFillRectangleIf
Fill a rectangle using the specified width and height. The rectangle will be drawn using the current fill colour and style.
The rectangle is only drawn if the condition expression evaluates to true.
Syntax
DrawFillRectangleIf( condition, x1, y1, width, height )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
Return Value
1 if successful; otherwise 0
Example
width = 100mm
height = 50mm
DrawCreateDrawing( width, height ) = ?
DrawFillRectangleIf( width > height, 0mm, 0mm, width, height ) = ?
DrawFillStyle
Sets the style used to fill rectangles, polygons, ellipses and paths.
Syntax
DrawFillStyle( styleId )
DrawFillStyle( styleName )
Parameters
styleId
numeric identifier of a predefined style, see remarks.
styleName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the Id's and names of the predefined styles.
17 "80Percent" "80%"
18 "90Percent" "90%"
19 "LightDownwardDiagonal"
20 "LightUpwardDiagonal"
21 "DarkDownwardDiagonal"
22 "DarkUpwardDiagonal"
23 "WideDownwardDiagonal"
24 "WideUpwardDiagonal"
25 "LightVertical"
26 "LightHorizontal"
27 "NarrowVertical"
28 "NarrowHorizontal"
29 "DarkVertical"
30 "DarkHorizontal"
31 "DashedDownwardDiagonal"
32 "DashedUpwardDiagonal"
33 "DashedHorizontal"
34 "DashedVertical"
35 "SmallConfetti"
36 "LargeConfetti"
37 "ZigZag"
38 "Wave"
39 "DiagonalBrick"
40 "HorizontalBrick"
41 "Weave"
42 "Plaid"
43 "Divot"
44 "DottedGrid"
45 "DottedDiamond"
46 "Shingle"
47 "Trellis"
48 "Sphere"
49 "SmallGrid"
50 "SmallCheckerBoard"
51 "LargeCheckerBoard"
52 "OutlinedDiamond"
53 "SolidDiamond"
101 “WoodEndGrain”
102 “Concrete”
103 “Brick”
104 “Sand”
105 “Clay”
106 “Rubble”
107 "Silt"
108 "SiltySand"
109 "Gravel"
110 "Peat"
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawFillStyle( "70%" ) = ?
DrawFillRectangle( 0mm, 0mm, 50mm, 50mm ) = ?
DrawFillStyle( "weave" ) = ?
DrawFillRectangle( 0mm, 50mm, 50mm, 50mm ) = ?
DrawFillStyle( "DashedVertical" ) = ?
DrawFillRectangle( 50mm, 0mm, 50mm, 50mm ) = ?
DrawFillStyle( “ForwardDiagonal” ) = ?
DrawFillRectangle( 50mm, 50mm, 50mm, 50mm ) = ?
DrawFont
Sets the font used when drawing strings.
Syntax
DrawFont( name, size, styleId )
Parameters
name
name of font. Can be the name of any installed Windows TrueType font.
size
size of font, if dimensions of value are not L1 then size is assumed to be in points. A negative value would specify
an output font size.
styleId
numeric identifier font style, see remarks
styleName
name of font style, see remarks
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the available font styles.
Id Style Name
0 “Regular”
0 “Normal”
1 “Bold”
2 “Italic”
4 “Underline”
8 “Strikeout”
6 “Italic+Underline”
3 “Bold+Italic”
7 “Bold+Italic+Underline”
5 “Bold+Underline”
Example
DrawCreateDrawing( 50mm, 50mm )=1.000
DrawFont( "Arial", 1mm, 0 ) = 1.000
DrawString(0mm, 0mm, "Arial regular" ) = 1.000
DrawFont( "Arial", 1mm, 1 ) = 1.000
DrawString(0mm, 2mm, "Arial bold" ) = 1.000
DrawFont( "Arial", 1mm, 2 ) = 1.000
DrawString(0mm, 4mm, "Arial italic" ) = 1.000
DrawFont( "Arial", 1mm, 3 ) = 1.000
DrawString(0mm, 6mm, "Arial bold italic" ) = 1.000
DrawFont( "Arial", 1mm, 4 ) = 1.000
DrawString(0mm, 8mm, "Arial underline" ) = 1.000
DrawFont( "Arial", 1mm, 8 ) = 1.000
DrawString(0mm, 10mm, "Arial strikeout" ) = 1.000
DrawFont( "Arial", -12, 0 ) = 1.000
DrawString(0mm, 12mm, "Arial 12 point" ) = 1.000
DrawFont( "Arial", -12mm, 0 ) = 1.000
DrawString(0mm, 14mm, "Arial 12mm" ) = 1.000
DrawFontColor / DrawFontColour
Sets the color used for drawing strings.
Syntax
DrawFontColor( colourName )
DrawFontColour( colourName )
DrawFontColor( colour )
DrawFontColour( colour )
Parameters
colourName name of a predefined colour, see remarks.
red amount of red component for a custom colour. Value can between 0 and 255 inclusive.
green amount of green component for a custom colour. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom colour. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawFontColour( "red" ) = ?
DrawString( 0mm, 0mm, “Red” ) = ?
DrawFontColour( "green" ) = ?
DrawString( 0mm, 5mm, “Green” ) = ?
DrawFontColour( "blue" ) = ?
DrawString( 0mm, 10mm, “Blue” ) = ?
DrawFontColour( 192,128,0 ) = ?
DrawString( 0mm, 15mm, “Red = 192, Green = 128, Blue = 0” ) = ?
DrawFontColor / DrawFontColour
Sets the color used for drawing strings.
Syntax
DrawFontColor( colourName )
DrawFontColour( colourName )
DrawFontColor( colour )
DrawFontColour( colour )
Parameters
colourName name of a predefined colour, see remarks.
red amount of red component for a custom colour. Value can between 0 and 255 inclusive.
green amount of green component for a custom colour. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom colour. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawFontColour( "red" ) = ?
DrawString( 0mm, 0mm, “Red” ) = ?
DrawFontColour( "green" ) = ?
DrawString( 0mm, 5mm, “Green” ) = ?
DrawFontColour( "blue" ) = ?
DrawString( 0mm, 10mm, “Blue” ) = ?
DrawFontColour( 192,128,0 ) = ?
DrawString( 0mm, 15mm, “Red = 192, Green = 128, Blue = 0” ) = ?
DrawGetActiveDrawing
Returns the currently active drawing identifier.
Syntax
DrawGetActiveDrawing()
Return Value
Numeric identifier that uniquely identifies a drawing previously created using DrawCreateDrawing.
Remarks
Most drawing functions accept a drawing identifier, if the drawing identifier is not specified then the active drawing is
used.
DrawGrid
Draws gridlines using the width and height at the specified co-ordinate. The grid lines will be drawn using the current line
colour, style and width.
Syntax
DrawGrid( x1, y1, width, height, gridSpacingX, gridSpacingY )
Parameters
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
gridSpacingX
spacing of each grid line along the x axis
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawLineColour(“lightblue”)=?
DrawGrid( -100mm, -50mm, 200mm, 100mm, 10mm, 10mm ) = ?
DrawLineColour(“red”)=?
DrawLine(-10mm,0mm,10mm,0mm)=?
DrawLine(0mm,-10mm,0mm,10mm)=?
DrawLineColour(“default”)=?
DrawEllipse(0mm,0mm,100mm,50mm)=?
DrawGridIf
Draws gridlines using the width and height at the specified co-ordinate. The grid lines will be drawn using the current line
colour, style and width. The grid is only drawn if the condition expression evaluates to true.
Syntax
DrawGridIf( condition, x1, y1, width, height, gridSpacingX, gridSpacingY )
Parameters
condition
Expression that must evaluate to either 1 or 0
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
gridSpacingX
spacing of each grid line along the x axis
gridSpacingY
spacing of each grid line along the y axis
Return Value
1 if successful; otherwise 0
Example
size = 50mm
DrawCreateDrawing( size, size ) = ?
DrawLineColour(“lightblue”)=?
DrawGridIf( size <= 50mm, -size, -size, 2size, 2size, 10mm, 10mm )
= ?
DrawRectangle(-size, -size, 2size, 2size)=?
DrawLineColour(“red”)=?
DrawLine(-10mm,0mm,10mm,0mm)=?
DrawLine(0mm,-10mm,0mm,10mm)=?
DrawLineColour(“default”)=?
DrawEllipse(0mm,0mm,size,size)=?
size = 75mm
DrawLabel
Draws a label with a pointer between two co-ordinates using the current line colour, style and width and the current font
and font colour. Each end of the line is drawn using the current label line cap style.
Syntax
DrawLabel( x1, y1, x2, y2, string )
Parameters
x1
x co-ordinate for start line.
y1
y co-ordinate for start line.
x2
x co-ordinate for end of line.
y3
y co-ordinate for end of line.
string
string that is drawn at the start of the line.
Return Value
1 if successful; otherwise 0
Remarks
The DrawLabel function can be used to easily indicate other elements on a drawing.
The location that the string is drawn relative to the line depends on the direction and rotation of the line.
Example
DrawCreateDrawing(60mm,60mm)=?
DrawLabel(0mm,20mm,0mm,10mm,”top”) =?
DrawLabel(20mm,0mm,10mm,0mm,”right”) =?
DrawLabel(0mm,-20mm,0mm,-10mm,”bottom”)=?
DrawLabel(-20mm,0mm,-10mm,0mm,”left”)=?
DrawLabel(20mm,20mm,10mm,10mm,”topright”) =?
DrawLabel(20mm,-20mm,10mm,-10mm,”bottomright”) =?
DrawLabel(-20mm,-20mm,-10mm,-10mm,”bottomleft”)=?
DrawLabel(-20mm,20mm,-10mm,10mm,”topleft”)=?
DrawLineColor(“lightblue”)=?
DrawRectangle(-10mm,-10mm,20mm,20mm)=?
DrawRectangle(-20mm,-20mm,40mm,40mm)=?
DrawLabelIf
Draws a label with a pointer between two co-ordinates using the current line colour, style and width and the current font
and font colour. Each end of the line is drawn using the current label line cap style. The label is only drawn if the
condition expression evaluates to true.
Syntax
DrawLabelIf( condition, x1, y1, x2, y2, string )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate for start line.
y1
y co-ordinate for start line.
x2
x co-ordinate for end of line.
y3
y co-ordinate for end of line.
string
string that is drawn at the start of the line.
Return Value
1 if successful; otherwise 0
Remarks
The DrawLabel function can be used to easily indicate other elements on a drawing.
The location that the string is drawn relative to the line depends on the direction and rotation of the line.
Example
draw = True
DrawCreateDrawing(60mm,60mm)=?
DrawLabelIf(draw,0mm,20mm,0mm,10mm,”top”) =?
DrawLabelIf(draw,20mm,0mm,10mm,0mm,”right”) =?
DrawLabelIf(draw,0mm,-20mm,0mm,-10mm,”bottom”)=?
DrawLabelIf(draw,-20mm,0mm,-10mm,0mm,”left”)=?
draw = False
DrawLabelIf(draw,20mm,20mm,10mm,10mm,”topright”) =?
DrawLabelIf(draw,20mm,-20mm,10mm,-10mm,”bottomright”) =?
DrawLabelIf(draw,-20mm,-20mm,-10mm,-10mm,”bottomleft”)=?
DrawLabelIf(draw,-20mm,20mm,-10mm,10mm,”topleft”)=?
DrawLineColor(“lightblue”)=?
DrawRectangle(-10mm,-10mm,20mm,20mm)=?
DrawRectangle(-20mm,-20mm,40mm,40mm)=?
DrawLabelLineCap
Sets the style of line cap drawn at the start and end of a label line drawn using the DrawLabel function.
Syntax
DrawLabelLineCap( styleName )
Parameters
styleName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the predefined line cap style names.
Example
DrawCreateDrawing( 200mm, 50mm ) = 1.00
DrawLineWidth( 0.01mm ) = 1.00
DrawLabelLineCap( “none”, "arrow" ) = 1.00
DrawLabel( 0mm, 0mm, 20mm, 0mm, “none to arrow” ) = 1.00
DrawLabelStringOrientation
Sets the option that determines when drawing a label using the DrawLabel function at what angle the labels string is
drawn.
Syntax
DrawLabelStringOrientation( orientationId )
DrawLabelStringOrientation( orientationName )
Parameters
orientationId
orientationName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the string orientation styles. The default orientation is horizontal.
Id Name Description
-1 “Default” Use default orientation (Horizontal)
0 “Horizontal” String is always drawn horizontally.
1 “Parallel” String is drawn parallel to line.
2 “Perpendicular” String is drawn perpendicular to line.
4 "Vertical" String is always drawn vertically.
Example
DrawCreateDrawing(60mm,60mm)=?
DrawLabelStringOrientation( "horizontal" ) = ?
DrawLabel(0mm,20mm,0mm,10mm,”top”) =?
DrawLabel(20mm,0mm,10mm,0mm,”right”) =?
DrawLabel(0mm,-20mm,0mm,-10mm,”bottom”)=?
DrawLabel(-20mm,0mm,-10mm,0mm,”left”)=?
DrawLabel(20mm,20mm,10mm,10mm,”topright”) =?
DrawLabel(20mm,-20mm,10mm,-10mm,”bottomright”) =?
DrawLabel(-20mm,-20mm,-10mm,-10mm,”bottomleft”)=?
DrawLabel(-20mm,20mm,-10mm,10mm,”topleft”)=?
DrawLineColor(“lightblue”)=?
DrawRectangle(-10mm,-10mm,20mm,20mm)=?
DrawRectangle(-20mm,-20mm,40mm,40mm)=?
DrawLabelStringOrientation( "vertical" ) = ?
DrawLabelStringOrientation( "parallel" ) = ?
DrawLabelStringOrientation( "perpendicular" ) = ?
DrawLine
Draws a line using the specified co-ordinates with the current line colour, style and width.
Syntax
DrawLine(x1, y1, … x[n], y[n] )
Parameters
x1
x co-ordinate
y1
y co-ordinate
Remarks
If only a single co-ordinate is specified then a line will be drawn from the last known co-ordinate to the specified co-
ordinate. The last known co-ordinate is the last co-ordinate used in a previous call to DrawLine or the co-ordinate
specified to DrawMove.
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing() = 1.000
DrawLine(0mm, 0mm, 100mm, 0mm ) = 1.000
DrawCreateDrawing() = 2.000
DrawLine(0mm, 0mm, 100mm, 0mm, 100mm, 50mm, 90mm, 50mm, 90mm, 10mm,
0mm, 10mm ) = 1.000
DrawLineCap
Sets the line cap drawn at the start and the end of a line drawn using DrawLine or DrawArc.
Syntax
DrawLineCap( startName, endName )
Parameters
startName
name of a predefined line cap style for the start of the line, see remarks.
endName
optional name of a predefined line cap style for the end of the line, see remarks. If endName is not specified then
the same line cap is used at the start and end of the line.
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the predefined styles.
Example
DrawCreateDrawing( 200mm, 50mm ) = 1.00
DrawLineCapSize( 4mm ) = 1.00
DrawLineCap( "none" ) = 1.00
DrawLine( 0mm, 0mm, 50mm, 0mm ) = 1.00
DrawLineCap( "bar" ) = 1.00
DrawLine( 0mm, 5mm, 50mm, 5mm ) = 1.00
DrawLineCap( "arrow" ) = 1.00
DrawLine( 0mm, 10mm, 50mm, 10mm ) = 1.00
DrawLineCap( "barinternalarrow" ) = 1.00
DrawLine( 0mm, 15mm, 50mm, 15mm ) = 1.00
DrawLineCap( "externalarrow" ) = 1.00
DrawLine( 0mm, 20mm, 50mm, 20mm ) = 1.00
DrawLineCap( "barexternalarrow" ) = 1.00
DrawLine( 0mm, 25mm, 50mm, 25mm ) = 1.00
DrawLineCap( "square" ) = 1.00
DrawLine( 0mm, 30mm, 50mm, 30mm ) = 1.00
DrawLineCap( "circle" ) = 1.00
DrawLine( 0mm, 35mm, 50mm, 35mm ) = 1.00
DrawLineCapAlignment
Sets the alignment of the line cap drawn at the start and end of a line drawn using the DrawLine function.
Syntax
DrawLineCapAlignment( styleName )
DrawLineCapAlignment( styleId )
Parameters
styleId
numeric id of alignment style
styleName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the alignment styles.
Example
DrawCreateDrawing( 200mm, 50mm ) = ?
DrawLineColor( "lightgrey" ) = ?
DrawLine( 0mm, 0mm, 0mm, 40mm ) = ?
DrawLine( 50mm, 0mm, 50mm, 40mm ) = ?
DrawLineWidth( .5mm ) = ?
DrawLineColor( "black" ) = ?
DrawLineWidth( .5mm ) = ?
Page 551 of 903
Tedds 2020 - Function and Field Reference
DrawLineCapSize( 4mm ) = ?
DrawLineCap( "square" ) = ?
DrawLineCapAlignment( “near” ) = ?
DrawLine( 0mm, 30mm, 50mm, 30mm ) = ?
DrawLineCapAlignment( 1 ) = ?
DrawLine( 0mm, 20mm, 50mm, 20mm ) = ?
DrawLineCapAlignment( “far” ) = ?
DrawLine( 0mm, 10mm, 50mm, 10mm ) = ?
DrawLineCapSize
Sets the size of the line cap drawn at the start and the end of a line drawn using DrawLine.
Syntax
DrawLineCapSize( size )
Parameters
size
size of line cap
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 200mm, 50mm ) = ?
DrawLineColor( "lightgrey" ) = ?
DrawLine( 0mm, 0mm, 0mm, 40mm ) = ?
DrawLine( 50mm, 0mm, 50mm, 40mm ) = ?
DrawLineWidth( .5mm ) = ?
DrawLineColor( "black" ) = ?
DrawLineWidth( .5mm ) = ?
DrawLineCap( "square" ) = ?
DrawLineCapSize( 2mm ) = ?
DrawLine( 0mm, 30mm, 50mm, 30mm ) = ?
DrawLineCapSize( 4mm ) = ?
DrawLine( 0mm, 20mm, 50mm, 20mm ) = ?
DrawLineCapSize( 8mm ) = ?
DrawLine( 0mm, 10mm, 50mm, 10mm ) = ?
DrawLabelLineCapSize
Sets the size of the line cap drawn at the start and end of a label line drawn using the DrawLabel function.
Syntax
DrawLabelLineCapSize( size )
Parameters
size
Return Value
1 if successful; otherwise 0
Remarks
If the size specified is zero then the size of line caps will be calculated automatically based on the current font size.
Example
DrawCreateDrawing( 200mm, 50mm ) = 1.000
DrawLineWidth( 0.01mm ) = 1.000
DrawLabelLineCap( "circle", "arrow" ) = 1.000
DrawLabelLineCapSize( 1mm ) = 1.000
DrawLabel( 0mm, 0mm, 20mm, 0mm, "1 mm" ) = 1.000
DrawLabelLineCapSize( 2mm ) = 1.000
DrawLabel( 0mm, 10mm, 20mm, 10mm, "2 mm" ) = 1.000
DrawLabelLineCapSize( 0mm ) = 1.000
DrawLabel( 0mm, 20mm, 20mm, 20mm, "auto size" ) = 1.000
DrawFont( "Calibri", 9 ) = 1.000
DrawLabel( 0mm, 30mm, 20mm, 30mm, "auto size, 9pt font" ) = 1.000
DrawLineColor / DrawLineColour
Sets the color used for drawing lines and outlines of rectangles, polygons, ellipses and paths.
Syntax
DrawLineColor( colourName )
DrawLineColour( colourName )
DrawLineColor( colour )
DrawLineColour( colour )
Parameters
colourName name of a predefined colour, see remarks.
red amount of red component for a custom colour. Value can between 0 and 255 inclusive.
green amount of green component for a custom colour. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom colour. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
colour Color value created using DrawCreateColor.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawLineColour( "red" ) = ?
DrawLine( 0mm, 0mm, 50mm, 0mm ) = ?
DrawLineColour( "green" ) = ?
DrawLine( 0mm, 5mm, 50mm, 5mm ) = ?
DrawLineColour( "blue" ) = ?
DrawLineColor / DrawLineColour
Sets the color used for drawing lines and outlines of rectangles, polygons, ellipses and paths.
Syntax
DrawLineColor( colourName )
DrawLineColour( colourName )
DrawLineColor( colour )
DrawLineColour( colour )
Parameters
colourName name of a predefined colour, see remarks.
red amount of red component for a custom colour. Value can between 0 and 255 inclusive.
green amount of green component for a custom colour. Value can between 0 and 255 inclusive.
blue amount of blue component for a custom colour. Value can between 0 and 255 inclusive.
transparency optional amount of transparency. Value can be between 0 and 255 inclusive
where 0 is completely transparent and 255 is completely opaque. Default is opaque i.e.
no transparency.
colour Color value created using DrawCreateColor.
Return Value
1 if successful; otherwise 0
Remarks
For details of the pre-defined system colors refer to the DrawCreateColor documentation.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawLineColour( "red" ) = ?
DrawLine( 0mm, 0mm, 50mm, 0mm ) = ?
DrawLineColour( "green" ) = ?
DrawLine( 0mm, 5mm, 50mm, 5mm ) = ?
DrawLineColour( "blue" ) = ?
DrawLineIf
Draws a line between two co-ordinates using the current line colour, style and width. The line is only drawn if the
condition expression evaluates to true.
Syntax
DrawLineIf( condition, x1, y1, x2, y2 )
Parameters
condition
Expression that must evaluate to either True (1) or False(0)
x1
y1
y co-ordinate for start of line
x2
y2
y co-ordinate for end of line
Return Value
1 if successful; otherwise 0
Example
length = 100mm
DrawCreateDrawing( length, length ) = ?
DrawLineIf( length > 10mm, 0mm, 0mm, length, 0mm ) = ?
DrawLineStyle
Sets the style used when drawing lines and outlines for rectangles, polygons and ellipses.
Syntax
DrawLineStyle( styleId )
DrawLineStyle( styleName )
Parameters
styleId
numeric identifier of a predefined style, see remarks.
styleName
dash, dot
repeating pattern for length of dash and length of dot
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the predefined styles.
Example
DrawCreateDrawing( 200mm, 50mm ) = ?
DrawLineStyle( “DashStyleSolid” ) = ?
DrawLineWidth
Sets the width used when drawing lines and outlines for rectangles, polygons and ellipses.
Syntax
DrawLineWidth( width )
Parameters
width
width of line. Specify a negative number for fixed pixel width and positive number for a measured width.
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 250mm, 40mm ) = 1.000
DrawLineWidth( 0.1mm ) = 1.000
DrawLine( 0mm, 0mm, 250mm, 0mm ) = 1.000
DrawLineWidth( 1mm ) = 1.000
DrawLine( 0mm, 10mm, 250mm, 10mm ) = 1.000
DrawLineWidth( 5mm ) = 1.000
DrawLine( 0mm, 20mm, 250mm, 20mm ) = 1.000
DrawLineWidth( 10mm ) = 1.000
DrawLine( 0mm, 30mm, 250mm, 30mm ) = 1.000
DrawLineWidth( -1 ) = 1.000
DrawLine( 0mm, 40mm, 250mm, 40mm ) = 1.000
DrawLineWidth( -2 ) = 1.000
DrawLine( 0mm, 50mm, 250mm, 50mm ) = 1.000
DrawLineWidth( -3 ) = 1.000
DrawLine( 0mm, 60mm, 250mm, 60mm ) = 1.000
DrawLineWidth( -4 ) = 1.000
DrawLine( 0mm, 70mm, 250mm, 70mm ) = 1.000
DrawMeasureStringHeight
Measures the height of a string drawn using the current font.
Syntax
DrawMeasureStirngHeight( string )
Parameters
string
text to measure
Return Value
height of string
Remarks
Measuring strings can be useful when attempting to layout drawing elements so that strings do not overlap one another.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
expression = “A1=100mm2”
DrawStringAlignment( “center”, “center” ) = ?
DrawString( 0mm, 0mm, expression) = ?
width = DrawMeasureStringWidth(expression)=?
height = DrawMeasureStringHeight(expression)=?
DrawRectangle(-width/2,-height/2,width,height)=?
DrawMeasureStringWidth
Measures the width of a string drawn using the current font.
Syntax
DrawMeasureStirngWidth( string )
Parameters
string
text to measure
Return Value
width of string
Remarks
Measuring strings can be useful when attempting to layout drawing elements so that strings do not overlap one another.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
expression = “A1=100mm2”
DrawStringAlignment( “center”, “center” ) = ?
DrawString( 0mm, 0mm, expression) = ?
width = DrawMeasureStringWidth(expression)=?
height = DrawMeasureStringHeight(expression)=?
DrawRectangle(-width/2,-height/2,width,height)=?
DrawMove
Sets the last known drawing co-ordinate.
Syntax
DrawMove(x, y)
Parameters
x x co-ordinate
y y co-ordinate
Remarks
When a subsequent call to DrawLine only specifies a single co-ordinate a line is drawn from the last known co-ordinate
to the specified co-ordinate. This is useful if you want to use the DrawLine function to plot a line graph by using an
iterative loop.
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing() = 1.000
DrawMove(0mm, 0mm) = 1.000
DrawLine(50mm, 0mm) = 1.000
DrawMove(100mm, 0mm) = 1.000
DrawLine(150mm, 0mm) = 1.000
DrawPath
Draws the outline of the current drawing path using the current line colour, style and width.
Syntax
DrawPath()
Parameters
offsetX
optional horizontal translation
offsetY
optional vertical translation
scaleX
optional horizontal scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
scaleY
optional vertical scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
angle
optional angle of rotation in degrees, anti-clockwise from the x-axis
Return Value
1 if successful; otherwise 0
Remarks
A path is created using DrawCreatePath, as you draw lines and curves they will be added to the current path which may
consist of one or more figures. When you draw a path, the lines and curves within each figure are connected by straight
lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No connecting line
is drawn between the end of one figure and the start of the next figure.
Some shapes (for example, rectangles and ellipses) are intrinsically closed. When you add an intrinsically closed shape to
a path, that shape is in a figure by itself.
When you have created all the elements within the path DrawPath must then be called to actually draw the path. The
path can be drawn any number of times by using repeated calls to DrawPath, the optional transformation arguments
allow you to translate, scale and rotate the path each time it is drawn.
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(0mm,0mm,100mm,100mm,10mm,10mm)=?
DrawCreatePath()=?
DrawLine(0mm,0mm,0mm,90mm)=?
DrawArcAlignment(“near”,”far”)=?
DrawArc(0mm,100mm,20mm,20mm,180,-90)=?
DrawLine(10mm,100mm,20mm,100mm,20mm,0mm,0mm,0mm)=?
DrawLineColour(“red”)=?
DrawPath()=?
DrawDestroyPath() = ?
DrawLineColour(“red”)=?
DrawPath()=?
DrawLineColour(“green”)=?
DrawPath( 40mm, 0mm, -1.0, 1.0 )=?
DrawLineColour(“blue”)=?
DrawPath( 60mm, 20mm, 0.5, 0.5 )=?
DrawLineColour(“purple”)=?
DrawPath( 0mm, 0mm, 1.0, 1.0, 135 )=?
DrawLineColour(“pink”)=?
DrawPath( 70mm, 0mm, 1.0, 1.0, 135 )=?
DrawPathIf
Draws the outline of the current drawing path using the current line colour, style and width. The path is only drawn if
the condition expression evaluates to true.
Syntax
DrawPathIf( condition )
Parameters
condition
Expression that must evaluate to either True (1) or False(0)
offsetX
optional horizontal translation
offsetY
optional vertical translation
scaleX
optional horizontal scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
scaleY
optional vertical scale factor, use 1.0 for original scale, use -1.0 to mirror about the axis
angle
optional angle of rotation in degrees, anti-clockwise from the x-axis
Return Value
1 if successful; otherwise 0
Remarks
A path is created using DrawCreatePath, as you draw lines and curves they will be added to the current path which may
consist of one or more figures. When you draw a path, the lines and curves within each figure are connected by straight
lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No connecting line
is drawn between the end of one figure and the start of the next figure.
Some shapes (for example, rectangles and ellipses) are intrinsically closed. When you add an intrinsically closed shape to
a path, that shape is in a figure by itself.
When you have created all the elements within the path DrawPath must then be called to actually draw the path. The
path can be drawn any number of times by using repeated calls to DrawPath, the optional transformation arguments
allow you to translate, scale and rotate the path each time it is drawn.
Example
width = 20mm
height = 100mm
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(0mm,0mm,100mm,100mm,10mm,10mm)=?
DrawCreatePath()=?
DrawLine(0mm,0mm,0mm,height-10mm)=?
DrawArcAlignment(“near”,”far”)=?
DrawArc(0mm,height,20mm,20mm,180,-90)=?
DrawLine(10mm,height,width,height,width,0mm,0mm,0mm)=?
DrawLineColour(“red”)=?
DrawPathIf(width >= 20mm)=?
DrawDestroyPath() = ?
width = 10mm
DrawPathIf(width >= 20mm)=?
DrawPathStartFigure
Starts a new figure within the current drawing path. A drawing path must be created using DrawCreatePath before this
function can be used.
Syntax
DrawPathStartFigure()
Return Value
1 if successful; otherwise 0
Remarks
A path consists of one or more figures. As you draw lines and curves they will be added to the current path, those lines
and curves become part of a figure. When you draw a path, the lines and curves within an individual figure are connected
by straight lines; the ending point of one line or curve is connected to the starting point of the next line or curve. No
connecting line is drawn between the end of one figure and the start of the next figure.
Some shapes (for example, rectangles and ellipses) are intrinsically closed. When you add an intrinsically closed shape to
a path, that shape is in a figure by itself.
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(0mm,0mm,150mm,150mm,10mm,10mm)=?
DrawLineColour(“default”)=?
DrawCreatePath()=?
DrawLine(0mm,100mm,0mm,0mm)=?
DrawLine(10mm,100mm,10mm,00mm)=?
DrawLineColour(“green”)=?
DrawPath()=?
DrawDestroyPath() = ?
DrawCreatePath()=?
DrawLine(20mm,100mm,20mm,0mm)=?
DrawPathStartFigure()=?
DrawLine(30mm,100mm,30mm,0mm)=?
DrawLineColour(“blue”)=?
DrawPath()=?
DrawDestroyPath() = ?
DrawPolygon
Draws the outline of a polygon using the specified co-ordinates, a closing line will be drawn automatically between the
last and first co-ordinates. The polygon will be drawn using the current line colour, style and width.
Syntax
DrawPolygon( x1, y1, … x[n], y[n] )
Parameters
x1
x co-ordinate
y1
y co-ordinate
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawPolygon( 0mm, 0mm, 0mm, 50mm, 50mm, 100mm, 100mm, 50mm, 100mm,
0mm ) = ?
DrawRectangle
Draws the outline of a rectangle using the width and height at the specified co-ordinate. The rectangle will be drawn
using the current line colour, style and width.
Syntax
DrawRectangle( x1, y1, width, height )
Parameters
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 50mm ) = ?
DrawRectangle( 0mm, 0mm, 100mm, 50mm ) = ?
DrawRectangleIf
Draws the outline of a rectangle using the width and height at the specified co-ordinate. The rectangle will be drawn
using the current line colour, style and width. The rectangle is only drawn if the condition expression evaluates to true.
Syntax
DrawRectangleIf( condition, x1, y1, width, height )
Parameters
condition
Expression that must evaluate to either 1 or 0
x1
y1
y co-ordinate of bottom left corner
width
width of rectangle
height
height of rectangle
Return Value
1 if successful; otherwise 0
Example
width = 100mm
height = 50mm
DrawCreateDrawing( width, height ) = ?
DrawRectangleIf( width > height, 0mm, 0mm, width, height ) = ?
DrawSaveCalcItem
Saves a drawing to a Calc Library Item.
Syntax
DrawSaveCalcItem( FileName, ItemName, id )
Parameters
FileName
Name of the Calc Library to save the drawing to.
ItemName
Name of the Calc Item to save the drawing to.
id
Optional drawing identifier returned by DrawCreateDrawing, if not specified then the active drawing is used.
Return Value
1 if successful; otherwise 0
Remarks
When this function is finished the drawing is automatically destroyed and the drawing is no longer valid.
DrawSaveEMF
Saves a drawing to a file in the Windows Enhanced Metafile format.
Syntax
DrawSaveEMF( FileName, id )
Parameters
FileName
Full path to the location where the file should be saved to.
id
Optional drawing identifier returned by DrawCreateDrawing, if not specified then the active drawing is used.
Return Value
1 if successful; otherwise 0
Remarks
When this function is finished the drawing is automatically destroyed and the drawing is no longer valid.
DrawSetActiveDrawing
Set the currently active drawing.
Syntax
DrawSetActiveDrawing( id )
Parameters
id
Return Value
1 if successful; otherwise 0
Remarks
Most drawing functions accept a drawing identifier, if the drawing identifier is not specified then the active drawing is
used.
DrawSetActivePath
Sets the currently active drawing path to a path created by DrawCreatePath.
Syntax
DrawSetActivePath( name )
DrawSetActivePath( id )
Parameters
name is the name of the path as specified to DrawCreatePath
id is the unique numeric identifier of the path as returned from DrawCreatePath. Use 0 to set no active
path.
Return Value
1 if successful; otherwise 0
Remarks
By using DrawSetActivePath you can create a number of different paths which can then be activated as and when
required for drawing multiple instances of the same path.
Example
DrawString
Draws text at the specified co-ordinate using the current font, font colour and string alignment properties.
Syntax
DrawString( x1, y1, string, angle )
Parameters
x1
x co-ordinate
y1
y co-ordinate
string
text to draw
angle
optional angle of rotation in degrees, anti-clockwise from the x-axis
Return Value
1 if successful; otherwise 0
Remarks
The location that the string is drawn relative to the co-ordinate is dependent on the String Alignment property which can
be set using the DrawStringAlignment function. By default the co-ordinate is the bottom left co-ordinate of the strings
bounding rectangle.
The rotation of the string is dependent on the String Orientation property which can be set using the
DrawStringOrientation function. By default the specified angle will be used however the angle may be modified
according to the orientation property.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawString( 0mm, 0mm, “A1 = 100 mm2” ) = ?
DrawStringAlignment
Sets the text alignment used by the DrawString function. The alignment determines how the text is positioned relative to
the output co-ordinate.
Syntax
DrawStirngAlignment( textAlignmentName, lineAlignmentName )
Parameters
textAlignmentName
textAlignmentId
numeric id of alignment type to use for aligning text horizontally
lineAlignmentName
lineAlignmentId
numeric id of alignment type to use for aligning text vertically
Return Value
1 if successful; otherwise 0
Remarks
The alignment is relationship between the bounding rectangle of the string and the drawing co-ordinate.
Id Name Description
-1 “Default” Use default string alignment (Near)
0 “Near” string is aligned so that the bottom left corner of the strings bounding rectangle is nearest to
the drawing co-ordinate.
1 “Centre” String is aligned so that the strings bounding rectangle is centred about the drawing co-
“Center” ordinate.
2 “Far” String is aligned so that the bottom left corner of the strings bounding rectangle is the height of
the bounding rectangle away from drawing co-ordinate.
Example 1
DrawCreateDrawing( 50, 50 ) = ?
DrawLineColour(“red”)=?
DrawLine( -1, 0, 1, 0 ) = ?
DrawLine( 0, -1, 0, 1 ) = ?
DrawStringAlignment("near","near")=?
DrawString(0, 0, "near, near" ) = ?;
Example 2
DrawStringAlignment("centre","centre")=?
Example 3
DrawStringAlignment("far","far")=?
DrawStringIf
Draws text at the specified co-ordinate using the current font, font colour and string alignment properties. The line is
only drawn if the condition expression evaluates to true.
Syntax
DrawStirngIf( condition, x1, y1, string )
Parameters
condition
Expression that must evaluate to either True (1) or False (0)
x1
x co-ordinate
y1
y co-ordinate
string
text to draw
Return Value
1 if successful; otherwise 0
Remarks
The location that the string is drawn relative to the co-ordinate is dependent on the String Alignment property which can
be set using the DrawStringAlignment function. By default the co-ordinate is the bottom left co-ordinate of the strings
bounding rectangle.
Example
x = 1mm
y = 0mm
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawStringIf( x > y, x, y, “A1 = 100 mm2” ) = ?
DrawStringOrientation
Sets the option that determines when drawing strings using the DrawString function at what angle the string is drawn.
Syntax
DrawStringOrientation( orientationId )
DrawStringOrientation( orientationName )
Parameters
orientationId
orientationName
Return Value
1 if successful; otherwise 0
Remarks
The following table lists the string orientation styles. The default orientation is parallel. When the Horizontal and Vertical
options are used any angle specified to the DrawString function will be ignored.
Id Name Description
-1 "Default" Use default orientation (parallel)
0 "Horizontal" String is always drawn horizontally.
1 "Parallel" String is drawn parallel to angle.
4 "Vertical" String is always drawn vertically
Example
DrawCreateDrawing( 1000mm, 1000mm ) = 1.000
DrawFont("Arial",75mm,"regular") = 1.000
DrawStringOrientation( "default" ) = 1.000
DrawString( 0mm, 0mm, "Default", 45 ) = 1.000
DrawStringOrientation( "horizontal" ) = 1.000
Example which ensures when a rotation transformation is used to replicate a shape the text
remains horizontal
DrawCreateDrawing( 1000mm, 1000mm ) = 2.000
DrawFont("Arial",25mm,"regular") = 1.000
DrawStringAlignment( "center", "center" ) = 1.000
$_drawShape = ReturnArg(
DrawCreateTransform(),
DrawTransformRotate( shapeRotation ),
DrawPolygon( 0mm, 0mm, 0mm, 200mm, 100mm, 200mm, 200mm, 100mm,
200mm, 0mm ),
DrawString( 100mm, 100mm, shapeName ),
DrawDestroyTransform() )
Right
shapeRotation = 0
shapeName = "Right"
_drawShape = 1.000
Left
shapeRotation = 90
shapeName = "Left"
_drawShape = 1.000
DrawTransformRotate
Adds a rotation to the current drawing transformation with the option to rotate about a specified co-ordinate. A drawing
transformation must be created using DrawTransformCreate before this function can be used.
Syntax
DrawTransformRotate( angle, x, y )
Parameters
angle
angle of rotation in degrees from the x-axis
optional x co-ordinate for the point about which the rotation takes place
y
optional y co-ordinate for the point about which the rotation takes place
Return Value
1 if successful; otherwise 0
Remarks
If a co-ordinate is not specified then the rotation is about the drawing origin (0,0).
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(-150mm,-150mm,300mm,300mm,10mm,10mm)=?
DrawLineColour(“default”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawCreateTransform()=?
DrawTransformRotate(45)=?
DrawLineColour(“salmon”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawDestroyTransform()=?
DrawCreateTransform()=?
DrawTransformScale
Adds a scaling transformation to the current drawing transformation. A drawing transformation must be created using
DrawTransformCreate before this function can be used.
Syntax
DrawTransformScale( scaleX, scaleY )
Parameters
scaleX
scaleY
vertical scale factor
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(-150mm,-150mm,300mm,300mm,10mm,10mm)=?
DrawLineColour(“default”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawCreateTransform()=?
DrawTransformScale(0.5,0.5)=?
DrawLineColour(“salmon”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawDestroyTransform()=?
DrawLineColour(“red”)=?
DrawLine(-10mm,0mm,10mm,0mm)=?
DrawLine(0mm,-10mm,0mm,10mm)=?
DrawTransformTranslate
Adds a translation to the current drawing transformation. A drawing transformation must be created using
DrawTransformCreate before this function can be used.
Syntax
DrawTransformTranslate( offsetX, offsetY )
Parameters
offsetX
horizontal translation
offsetY
vertical translation
Return Value
1 if successful; otherwise 0
Example
DrawCreateDrawing( 100mm, 100mm )=?
DrawLineColour(“lightblue”)=?
DrawGrid(-150mm,-150mm,300mm,300mm,10mm,10mm)=?
DrawLineColour(“default”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawCreateTransform()=?
DrawTransformTranslate(-50mm,-50mm)=?
DrawLineColour(“salmon”)=?
DrawRectangle(0mm, 0mm, 100mm, 100mm )=?
DrawDestroyTransform()=?
DrawLineColour(“red”)=?
DrawLine(-10mm,0mm,10mm,0mm)=?
DrawLine(0mm,-10mm,0mm,10mm)=?
Engineering functions
Classify_I_5950:2000
Returns the section classification for an I section in accordance with BS5950:2000.
Syntax
Classify_5950:2000( Shape_Code, fab_type, py , b, T, d, t, A, F, Mx )
Classify_I_5950:2000( fab_type, py , b, T, d, t, A, F, Mx )
Parameters
Shape_Code is the section shape (must be set to “I” for an I section)
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section)
Classify_C_5950:2000
Returns the section classification for a channel section in accordance with BS5950:2000.
Syntax
Classify_5950:2000( Shape_Code, fab_type, py , B, T, d, t, A, F, Mx )
Classify_C_5950:2000( fab_type, py , B, T, d, t, A, F, Mx )
Parameters
Shape_Code is the section shape (must be set to “C” for a channel section)
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section)
Classify_HR_5950:2000
Returns the section classification for a rectangular hollow section in accordance with BS5950:2000.
Syntax
Classify_5950:2000(Shape_Code, fab_type, py , Beff , t, Deff , t, A, F, Mx)
Parameters
Shape_Code is the section shape (must be set to “HR” for a square or rectangular hollow section)
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section, “CR” or “Cold Rolled” indicates a cold formed section)
Beff is the effective width of section (full width - 3 * wall thickness for hot finished sections or full width - 5 *
wall thickness for cold formed sections)
Deff is the effective depth of section (full width - 3 * wall thickness for hot finished sections or full width - 5 *
wall thickness for cold formed sections)
Classify_A_5950:2000
Returns the section classification for an angle section in accordance with BS5950:2000.
Syntax
Classify_5950:2000( Shape_Code, py , B, t, D F, Mx )
Classify_A_5950:2000( py , B, t, D F, Mx )
Parameters
Shape_Code is the section shape (must be set to “A” for an angle section)
Classify_T_5950:2000
Returns the section classification for a tee section in accordance with BS5950:2000.
Syntax
Classify_5950:2000( Shape_Code, fab_type, py , b, T, D, t )
Classify_T_5950:2000( fab_type, py , b, T, D, t )
Parameters
Shape_Code is the section shape (must be set to “T” for a tee section)
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section)
Classify_HC_5950:2000
Returns the section classification for a circular hollow section in accordance with BS5950:2000.
Syntax
Classify_5950:2000( Shape_Code, py , D, t, F, Mx )
Classify_HC_5950:2000( py , D, t, F, Mx )
Parameters
Shape_Code is the section shape (must be set to “HC” for circular hollow sections)
Py_5950:2000
Returns the yield strength in accordance with BS5950:2000.
Syntax
Py_5950:2000( Grade, T )
Parameters
Grade is the steel grade (“Grade 40”, “40”, “FE 360”, “S 275”, “Grade 43”, “43”, “FE 430” “S 355”, “Grade 50”,
“50”, “FE 510” “S 460”, “Grade 55”, “55”)
T is the appropriate thickness of the section, usually that of the thickest part (T must be greater than 0 mm
and less than 100 mm for Grade 40 and S 460 grades and must be greater than 0 mm and less than 150 mm for the other
grades)
US_5950:2000
Returns the ultimate tensile stress from Table 5 of BS EN 10025 : 1990 + Amendment 1 : 1993.
Syntax
Us_5950:2000( Grade )
Parameters
Grade is the section grade (“S 275”, 43, “Grade 43”, “Fe430” for steel grade S 275, “S 355”, 50, “Grade 50”, “Fe
510” for steel grade S 355, “S 460”, 55, “Grade 55” for steel grade S 460)
Pbs_5950:2000
Returns the bearing strength of parts connected by ordinary bolts in clearance holes in accordance with Table 31 of BS
5950-1: 2000.
Syntax
Pbs_5950:2000( Grade )
Parameters
Grade is the section grade (“S 275”, 43, “Grade 43”, “Fe430” for steel grade S 275, “S 355”, 50, “Grade 50”, “Fe
510” for steel grade S 355, “S 460”, 55, “Grade 55” for steel grade S 460)
Pbg_5950:2000
Returns the bearing strength of parts connected by parallel shank friction grip fasteners in accordance with of BS 5950-1:
2000. Note pbg = 1.5 x pbs
Syntax
Pbg_5950:2000( Grade )
Parameters
Grade is the section grade ( “S 275”, 43, “Grade 43”, “Fe430” for steel grade S 275, “S 355”, 50, “Grade 50”, “Fe
510” for steel grade S 355, “S 460”, 55, “Grade 55” for steel grade S 460)
Pw_5950:2000
Returns the weld design strength for various grades of steel and electrode types in accordance with Table 37 of BS 5950-
1: 2000.
Syntax
Pw_5950:2000( Grade, electrode_classification )
Parameters
Grade is the section grade ( “S 275”, 43, “Grade 43”, “Fe430” for steel grade S 275, “S 355”, 50, “Grade
50”, “Fe 510” for steel grade S 355, “S 460”, 55, “Grade 55” for steel grade S 460)
Classify_5950
Returns the section classification for an I section in accordance with BS5950:1990.
Syntax
Classify_5950("I", fab_type, py, B/2, T, d, t, A, P, Mx)
Parameters
"I" is the parameter for an I section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section)
Classify_5950
Returns the section classification for a channel section in accordance with BS5950:1990.
Syntax
Classify_5950( "C", fab_type, py, B, T, d, t, A, P, Mx )
Parameters
"C" is the parameter for a channel section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section “W” or “Welded” indicates a welded
section)
Classify_5950
Returns the section classification for a rectangular hollow section in accordance with BS5950:1990.
Syntax
Classify_5950( "HR", fab_type, py, B-3*t, t, D-3*t, t, A, P, Mx )
Parameters
"HR" is the parameter for a rectangular hollow section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section, “W” or “Welded” indicates a welded
section)
Classify_5950
Returns the section classification for an angle section in accordance with BS5950:1990.
Syntax
Classify_5950( "A", py, B, t, D )
Parameters
"A" is the parameter for an angle section
Classify_5950
Returns the section classification for a Tee section in accordance with BS5950:1990.
Syntax
Classify_5950( "T", fab_type, py, B/2, T, D, t )
Parameters
"T" is the parameter for a tee section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section, “W” or “Welded” indicates a welded
section)
Classify_5950
Returns the section classification for a circular Hollow section in accordance with BS5950:1990.
Syntax
Classify_5950( "HC", py, D, t )
Parameters
"HC" is the parameter for a circular hollow section
Py_5950( Grade, T )
Py_5950
Returns the yield strength in accordance with BS5950:1990.
Syntax
Py_5950( Grade, T )
Parameters
Grade is the steel grade (“Grade 40”, “40”, “FE 360”, “Grade 43”, “43”, “FE 430”, “Grade 50”, “50”, “FE 510”,
“Grade 55”, “55”)
T is the appropriate thickness of the section, usually that of the thickest part (T must be greater than 0 mm
and less than 100 mm)
Us_5950( Grade )
Us_5950
Returns the ultimate tensile strength from Table 6 of BS 5950 : Part 1 : 1990.
Syntax
Us_5950( Grade )
Parameters
Grade is the section grade (43, “Grade 43”, “Fe430” for steel grade 43, 50, “Grade 50”, “Fe 510” for steel grade
50, 55, “Grade 55” for steel grade 55)
Pbs_5950( Grade )
Pbs_5950
Returns the bearing strength of parts connected by ordinary bolts in clearance holes in accordance with Table 33 of BS
5950 : Part 1 : 1990.
Syntax
Pbs_5950( Grade )
Parameters
Grade is the section grade (43, “Grade 43”, “Fe430” for steel grade 43, 50, “Grade 50”, “Fe 510” for steel grade
50, 55, “Grade 55” for steel grade 55)
Pbg_5950(Grade)
Pbg_5950
Returns the bearing strength of parts connected by parallel shank friction grip fasteners in accordance with Table 34 of
BS 5950 : Part 1 : 1990.
Syntax
Pbg_5950(Grade)
Parameters
Grade is the section grade (43, “Grade 43”, “Fe430” for steel grade 43, 50, “Grade 50”, “Fe 510” for steel grade
50, 55, “Grade 55” for steel grade 55)
Pw_5950
Returns the weld design strength for various grades of steel and electrode types in accordance with Table 36 of BS 5950 :
Part 1 : 1990.
Syntax
Pw_5950( Grade, electrode_strength )
Parameters
Grade is the section grade (43, “Grade 43”, “Fe430” for steel grade 43, 50, “Grade 50”, “Fe 510” for
steel grade 50, 55, “Grade 55” for steel grade 55)
Classify_EC3
Returns the section classification for an I section in accordance with EC3.
Syntax
Classify_EC3("I", fab_type, fy, b/2, tf, d, tw, h, Wel.y, A, NSd, My.Sd)
Parameters
"I" is the parameter for an I section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section, “W” or “Welded” indicates a welded
section)
Classify_EC3
Returns the section classification for a Rectangular Hollow section in accordance with EC3.
Syntax
Classify_EC3("HR", fab_type, fy, b-3*t, t, h-3*t, t, h, Wel.y, A, NSd, My.Sd)
Parameters
"HR" is the parameter for a rectangular hollow section
fab_type is the type of fabrication (“R” or “Rolled” indicates a rolled section, “W” or “Welded” indicates a welded
section)
Classify_EC3
Returns the section classification for a Circular section in accordance with EC3.
Syntax
Classify_EC3( "HC", fy, d, t )
Parameters
Fy_EC3
Returns the yield strength in accordance with EC3
Syntax
Fy_EC3( Grade, t )
Parameters
Grade is the steel grade (“Fe 360”, “S 235”, “Fe 430”, “S 275”, “Fe 510”, “S 355”)
t is the the appropriate thickness of the section, usually that of the thickest part (t must be greater than 0
mm and less than 100 mm)
Ec_5400
Returns the short term loading - modulus of elasticity for concrete in accordance with Table 3 of BS5400:Part 4-1990.
Syntax
Ec_5400( fcu )
Parameters
fcu is the characteristic strength (or cube strength of concrete at the age considered)
Return Value
Modulus of elasticity for concrete.
Example
ec_5400( 35 N/mm2 ) = 29500 N/mm2
Vtmin_5400
Returns the minimum ultimate torsion shear stress for which reinforcement is required in accordance with Table 10 of
BS5400:Part 4-1990.
Syntax
Vtmin_5400( fcu )
Parameters
fcu is the characteristic strength (or cube strength of concrete at the age considered)
Return Value
Minimum ultimate torsion shear stress.
Example
vtmin_5400( 35 N/mm2 ) = 0.395 N/mm2
Sigmay_5400:2006
Returns the plate nominal yield stress in accordance with BS5400 Part 3-2000 and BD13/06.
Syntax
Sigmay_5400:2006( grade, thickness )
Parameters
grade is the section steel grade (235, 275, 355, 450) or ("S235", "S275", "S355", "S450")
Return Value
Plate nominal yield stress.
Example
sigmay_5400:2006( "S235", 20mm ) = 225 N/mm2
sigmay_5400:2006( 355, 100mm ) = 315 N/mm2
Taulimit_5400:2006
Returns the limiting shear strength in accordance with Appendix G.8 of BS 5400 : Part 3.
Syntax
Taulimit_5400:2006( , mfw, )
Parameters
is the panel aspect ratio
mfw is
is
Return Value
Limiting shear strength.
Example
taulimit_5400:2006( 1.2, 0.012, 35.2 ) = 1.000
I_finplate
Returns the inertia of a fin plate with up to 10 holes.
Syntax
I_finplate( thickness, length, bolts, diameter, pitch )
Parameters
thickness is the thickness of the fin plate.
Return Value
Inertia of fin plate.
Example
I_finplate( 15mm, 400mm, 3, 22mm, 100mm ) = 73360070.000mm4
F_NDS_Cfb
Returns the size factor for bending, CFB.
Syntax
F_NDS_CFb(Type, Species, Grade, bnom, dnom)
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
F_NDS_CFc
Returns the size factor for compression, CFC.
Syntax
F_NDS_CFc(Type, Species, Grade, bnom, dnom)
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
F_NDS_Cft
Returns the size factor for tension, CFT.
Syntax
F_NDS_CFt(Type, Species, Grade, bnom, dnom)
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
F_NDS_CFu
Returns the flat use factor, CFU.
Syntax
F_NDS_CFu( Type, bnom, dnom )
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
F_NDS_CL
Returns the beam stability factor, CL.
Syntax
F_NDS_CL( bnom, dnom, RB, FbE, Fb )
Parameters
bnom is the nominal width of timber
FbE Kbe E’/RB2 (This value must be calculated in the document and passed into the function)
Fb is the tabulated design value multiplied by all factors except Cfu, CV and CL (This value must be calculated
in the document and passed into the function)
F_NDS_CP
Returns the column stability factor, CP.
Syntax
F_NDS_CP(Type, bnom, dnom, lex, ley, Fc*, FcEmajor, FcEminor)
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
Fc* is the tabulated design value multiplied by all factors except CP (This value must be calculated in the
document and passed into the function)
FcEmajor is the KcE E’/(lemajoraxis/dnom)2 (This value must be calculated in the document and passed into the
function)
FcEminor is the KcE E’/(leminoraxis/dnom)2 (This value must be calculated in the document and passed into the
function)
F_NDS_CV
Returns the volume factor, CV.
Syntax
F_NDS_CV( Type, Lv, b, d )
Parameters
Type is the type of timber, e.g. "Standard Dressed Sawn Lumber"
Remarks
For this function the value of KL is assumed to be 1.0 (the value for uniform loads, continuous spans and cantilevers).
The function will yield a non-conservative result if there is only a single concentrated load in the middle of a simple span.
This is unusual since there is usually significant uniform load due to the weight of the beam.
F_NDS_RB
Returns the slenderness ratio, RB.
Syntax
F_NDS_RB( le, b, d )
Parameters
le is the effective length of the member
Import/Export
SaveSectionVarsCalcItem
Save variables in the active Calc Section to a Calc Item in a Calc Library.
Syntax
SaveSectionVarsCalcItem( fileName, itemName, options, variable1, variable[n], …)
Paramaters
fileName is the full path to the Calc Library.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
An item saved with this function can be calculated by Tedds using the EvalCalcItem function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem1") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem2", 0, "a") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem3", 1+2+4) = 1.000
SaveSectionVarsTextFile
Save variables in the active Calc Section to a text file.
Syntax
SaveSectionVarsTextFile( fileName, options, variable1, variable[n], …)
Paramaters
filename is the full path to the text file.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
A file saved with this function can be calculated by Tedds using the EvalFile function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveSectionVarsTextFile( "c:\TeddsOutputVariables1.txt" ) = 1.000
SaveSectionVarsTextFile( "c:\TeddsOutputVariables2.txt", 0, "a" ) =
1.000
SaveSectionVarsTextFile( "c:\TeddsOutputVariables3.txt", 1+2+4 ) =
1.000
SaveVerifySectionVarsCalcItem
Save Verify expressions for variables in the active Calc Section to a Calc Item in a Calc Library.
Syntax
SaveVerifySectionVarsCalcItem( fileName, itemName, options, variable1, variable[n], …)
Paramaters
fileName is the full path to the Calc Library.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
This function creates a Calc Item that includes expressions to verify the values of variables are the same as they were
when the item was created. A verification item is useful for testing, start by running a calculation then create the
verification item, make changes to the calculation then calculate the verification item to verify that the results of the
calculation have not changed. An item saved with this function can be calculated by Tedds using the EvalCalcItem
function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveVerifySectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveVerifySectionVarsCalcItem1") = 1.000
a = 2m
EvalCalcItem("$(UserLbrDir)Test.lbr",
"SaveVerifySectionVarsCalcItem1") = 1.000
Look at results in Progress Log to view verification failure
SelectFile
Shows a standard user interface for selecting a file.
Syntax
SelectFile( fileName, open, filter )
Parameters
fileName is the full path to the selected Calc Library file, can be an empty string if no file is selected.
open is the parameter that specifies whether an item is being selected for opening (True(1)) or saving
(False(0)).
filter is the optional file filter which determines the type of files that can be selected.
Return Value
Returns the full path of the selected file, if the user Cancels the user interface the original fileName value is returned.
Remarks
If the filter parameter is omitted the default file filter will be used which allows any file to be selected. To limit selection
to specific file types the filter string must be formatted as a pair of values that are the description of the file format and
the filter for that format separated by a '|' character; for example "Text files|*.txt". To allow the user to select multiple
file formats concatenate all the filters into a single string; for example "Text files|*.txt|Comma separated files|*.csv"
Example
SelectFile( "", True, "Text Files|*.txt" ) = "c:\temp\file.txt"
Locale functions
GetLocale
Returns the current locale identifier as a string.
Syntax
GetLocale()
Example
getlocale() = "GB"
Log
LogText
Adds text to the progress log.
Syntax
LogText( text )
Parameters
text is the text message to add to the Progress Log.
Example
L = 4 m
LogText( "The value of L is "+string(L,”f0”,”m”)+” m" ) = 1.000
LogText(if(L<0m,”Error – a negative length has been entered”,
”Length – OK”)) = 1.000
Logic functions
And
Returns the result of a logical AND operation. The expression evaluates to True if all conditions are True.
Syntax
And( condition1, condition[n], … )
Parameters
condition1 is the first condition.
Example
a = 4; b = 3
c = 6; d = 5
and(a>b, c>d) = ? ; returns True(1), because both conditions are
True
and(a>b, c>10) = ? ; returns False(0), because one condition is
False
Equal/_Eq
Compares two values for equality using a specified tolerance.
Syntax
Equal( value1, value2, tolerance )
Parameters
value1 is the first numeric value to compare.
Return Value
Returns True(1) if values are equal to within the specified tolerance, otherwise returns False(0).
Example
_Eq( 1m, 1000mm ) = 1.000
_Eq( 1m, 992mm ) = 0.000
_Eq( 1m, 992mm, 10mm ) = 1.000
EqualsOneOf
Compares a value to a list of other values returning True(1) if any of those values are equal to the value.
Syntax
EqualsOneOf( value, value1,…value[n])
Parameters
value is the value to compare.
Return Value
Returns True(1) if at least one of the values is equal, otherwise returns False(0).
Example
EqualsOneOf( 1, 5, 4, 3, 2, 1 ) = 1.000
EqualsOneOf( 25, 5, 26, 13, 67, 12 ) = 0.000
EqualsOneOf("c", "a", "b", "c", "d", "e" ) = 1.000
EqualsOneOf("z", "a", "b", "c", "d", "e" ) = 0.000
GreaterOrEqual/_Ge
Compares two values to determine if one value is greater than or equal to another.
Syntax
GreaterOrEqual( value1, value2, tolerance )
Parameters
value1 is the first numeric value to compare.
Return Value
Returns True(1) if value1 is greater than or equal to value2 to within the specified tolerance, otherwise returns False(0).
Example
_Ge( 1m, 1000mm ) = 1.000
GreaterOrEqual( 992mm, 1m ) = 0.000
_Ge( 992mm, 1m, 10mm ) = 1.000
GreaterThan/_Gt
Compares two values to determine if one value is greater than another.
Syntax
GreaterThan( value1, value2, tolerance )
Parameters
value1 is the first numeric value to compare.
Return Value
Returns True(1) if value1 is greater than value2 to within the specified tolerance, otherwise returns False(0).
Example
_Gt( 1001mm, 1000mm ) = 1.000
GreaterThan( 1m, 992mm ) = 1.000
_Gt( 1m, 992mm, 10mm ) = 0.000
If
Returns one value if a condition you specify evaluates to True (1) and another value if it evaluates to False (0).
Syntax
If( logicalTest, valueIfTrue, valueIfFalse )
Parameters
logicalTest is any value or expression that can be evaluated to True (1) or False (0).
valueIfTrue is the value returned if logicalTest is True (1). valueIfTrue can be another expression.
valueIfFalse is the value returned if logicalTest is False (0). valueIfFalse can be another expression.
Examples
x = -5
if( x < 0, “value is negative”, “value is positive” ) = "value is
negative"
if( x < 0, -1, 1 ) = -1.000
IfElseIf
Calculates two or more expressions and conditionally returns one result.
Syntax
IfElseIf( condition1, trueExpression1, condition[n], trueExpression[n], falseExpression, … )
Parameters
condition1 is the first conditional expression that should equal True(1) or False(0), all other values are
treated as False.
condition[n] is the nth conditional expression that should equal True(1) or False(0), all other values are
treated as False.
Remarks
Multiple conditions can be used, each with a matching expression result if the condition is met. The statement must have
an odd number of arguments, the last on being the false expression result.
Example
L = 34ft + 2m + 8in
IfElseIf(L>15m, ”More than 15 m”, L>10m, “More than 10 m”, L>5m,
"More than 5 m", "5 m or less") = "More than 10 m"
LessOrEqual/_Ge
Compares two values to determine if one value is less than or equal to another.
Syntax
LessOrEqual( value1, value2, tolerance )
Parameters
value1 is the first numeric value to compare.
Return Value
Returns True(1) if value1 is less than or equal to value2 to within the specified tolerance, otherwise returns False(0).
Example
_Le( 1m, 1000mm ) = 1.000
LessOrEqual( 1m, 992mm ) = 0.000
_Le( 1m, 992mm, 10mm ) = 1.000
LessThan/_Lt
Compares two values to determine if one value is less than another.
Syntax
LessThan( value1, value2, tolerance )
Parameters
value1 is the first numeric value to compare.
Return Value
Returns True(1) if value1 is less than value2 to within the specified tolerance, otherwise returns False(0).
Example
_Lt( 1001mm, 1000mm ) = 0.000
LessThan( 992mm, 1m ) = 1.000
_Lt( 992mm, 1m, 10mm ) = 0.000
Not
Returns the opposite of a True(1) or False(0) value.
Syntax
Not( value )
Parameters
value is the value to return the logical opposite of.
Return Value
Returns True(1) if the value parameter is False(0); otherwise returns False(0).
Remarks
Values that are non-zero will be treated as True(1).
Example
Not(1) = 0.000
Not(0) = 1.000
A = 0;B = 100
Not(A>B) = 1.000
Not(A<B) = 0.000
Or
Returns the result of a logical OR operation. The expression evaluates to True if one of the conditions is True.
Syntax
Or( condition1, condition[n], … )
Parameters
condition1 is the first condition.
Example
a = 4; b = 3
c = 6; d = 5
or(a>b, c>10) = ? ; returns True(1), because one condition is True
or(a>5, c>10) = ? ; returns False(0), because both conditions are
False
Select
Returns a value by comparing a value with a sequence of known values and selecting the associated result.
Syntax
Select( value, case1, result1, case[n], result[n], …, defaultResult )
Parameters
value is the value to compare for equality.
Example
Colour = “blue”
Select(
Colour,”red”,0,”yellow”,1,”green”,2,”blue”,3,”pink”,4,”black”,5,
-1 ) = 3.000
Message
Message
Shows a message box
Syntax
Message( message, title, show ).
Parameters
message is the text message to show
show is the optional flag that determines if the message is displayed, Hide(0) or Show(1).
Example
L = 4 m
Message("The value of L is "+string(L,”f0”,”m”)+” m”, "Length") =
1.000
Message(if(L<0m,”Error – a negative length has been entered”,”Length
– OK”), "Length", if(L<0m,Show,Hide)) = 0.000
WaitMessage
Shows a message window that can be used to keep the user informed about the progress of a lengthy calculation.
Syntax
WaitMessage( message ).
Parameters
message is the optional text message to show. If omitted the wait window is closed
Remarks
When the WaitMessage function is called the wait window will be shown and the function will immediately return so
that subsequent calculations can continue. The wait window will remain visible until the window is explicitly closed or
the current document finishes calculating . To close the wait window call the function with no parameters, you should
always do this as soon as your lengthy calculation has completed to ensure that the wait window does not remain visible
indefinitely.
Example
WaitMessage("Calculating item 1 of 2") = ?
Pause(1000) = ?
WaitMessage("Calculating item 2 of 2") = ?
Pause(1000) = ?
WaitMessage() = ?
Miscellaneous
ClearCalcItemUsage
Clears the record of the Calc Items which have been calculated during the active calculation session.
Syntax
ClearCalcItemUsage()
Remarks
Each time a Calc Item is calculated a record is kept of the total number of times that item has been calculated and the
total elapsed time calculating that item during the active calculation session. Calling this function will clear all of that
data. The data is automatically cleared when the active calculation session has finished calculating.
Example
<< Insert a call to a library calculation here >>
LogCalcItemUsage() = ?
ClearCalcItemUsage() = ?
<< Insert a call to a library calculation here >>
LogCalcItemUsage() = ?
GetCountry
Returns the users current default country setting as a two character string. This setting is defined in the Tedds Regional
Calc Options dialog.
Syntax
GetCountry()
Return Value
Returns the current default country identifier as a two character string code as defined by ISO 3166-1
Ireland - IE
United States - US
Canada - CA
Australia - AU
Singapore - SG
Malaysia - MY
Hong kong - HK
China - CN
Japan - JP
France - FR
Germany - DE
Finland - FI
Denmark - DK
Spain - ES
Example
GetCountry() = "GB"
GetLanguage
Returns the current user interface language setting as a string identifier.
Syntax
GetLanguage()
Return Value
Returns the user interface language identifier as a two character string code ("EN" = English, "FR" = French, "DE" =
German, "ES" = Spanish).
Example
GetLanguage() = "EN"
GetTeddsAppName
Returns the name of the Tedds application calculating the current document.
Syntax
GetTeddsAppName()
Return Value
Application name as a string ("TEDDS", "TEDDS for Word", "TEDDS Lite").
GetTimer
Returns the numeric value of the timer.
Syntax
GetTimer()
Return Value
Timer value in seconds.
Remarks
The timer is reset to zero when Tedds starts calculating or when the ResetTimer function is called. By resetting the timer
and querying the result of the GetTimer function before and after a sequence of calculations are performed it is possible
to calculate how long the calculations took. This method of measurement can be useful for analysing the performance of
long or iterative calculations in order to improve performance.
Example
start = GetTimer()
1 + 1 = 2.000
Pause(1000) = 1.000; Simulate a lengthy calculation using the Pause
function
end = GetTimer()
Time to calculate; end-start = 1.014 s
LogCalcItemUsage
Outputs to the Progress Log a summary of the Calc Items which have been calculated during the active calculation
session.
Syntax
LogCalcItemUsage()
Remarks
Each time a Calc Item is calculated a record is kept of the total number of times that item has been calculated and the
total elapsed time calculating that item during the active calculation session. When LogCalcItemUsage is called it will
output to the progress log a summary of the recorded information included the average elapsed time for calculating each
Calc Item. This information can be used to assess the performance of a calculation in order to optimise specific Calc
Items.
Example
<< Insert a call to a library calculation here >>
LogCalcItemUsage() = ?
Pause
Pause the Tedds calculation process for a specified period of time.
Syntax
Pause( time )
Parameters
time is the time to pause in milliseconds.
Example
Pause( 5000 ) = 1.000; Pause for 5 seconds
ProgressText
Sets the status text displayed in the Tedds progress window.
Syntax
ProgressText( text )
Parameters
text is the text to display in the progress window.
Example
ProgressText( "This is the progress text" ) = 1.000
Pause( 3000 ) = 1.000; Pause so you can read the text in the
progress window
ResetTimer
Resets to zero the timer.
Syntax
ResetTimer()
Remarks
The timer is reset to zero when Tedds starts calculating.
SubCall
Calculates a Tedds field Call Statement as if it were a function. Because the field is calculated as a function no output will
be added to the Tedds document.
Syntax
Subcall( fieldName, paramater1, paramater2, … )
Parameters
fieldName is the name of the field to call as a function.
paramater1, parameter2 is the list of parameters normally passed to the Tedds field.
Remarks
The subcall function can be used to call a Tedds field, usually from a user interface. The format is to use the field name
that is being called as the first parameter, followed by the normal parameters for that field e.g.
This would typically be used to call a data list or data table from a button in a user interface.
Example
An example of calling a data list;
subcall("DataList",steel_section_dlist,"Universal
Columns","254(254(89))","Column
section","","Current_Section","Current_Page","Show","No") = ?
ToHex
Returns a value as a hexadecimal formatted string.
Syntax
ToHex( value )
Parameters
value Value to convert to hexadecimal. If the value is a string the value returned for each character is the ASCII
character code in hexadecimal format.
Example
ToHex( 1 ) = "0x1"
ToHex( "a" ) = "0x61"
SectionAddAngle
Adds an angle section to the current section model.
Syntax
SectionAddAngle( x1, y1, depth, upstandThickness, width, outstandThickness )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of angle (D)
upstandThickness
thickness of the upstand flange (t)
width
width of angle (Bb)
outstandThickness
thickness of the outstand flange (Tb)
angle of rotation of the angle about alignment co-ordinate (Default is no rotation)
density
density of angle (Default is 1000 kg/m3)
Return Value
1 if successful; otherwise 0
Remarks
The location that the angle is drawn relative to the co-ordinate is dependent on the shape alignment property which can
be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddAngle( 0mm, 0mm, 100mm, 10mm, 100mm, 10mm ) = 1.000
SectionAddBoxSection
Adds a box section to the current section model.
Syntax
SectionAddBoxSection( x1, y1, depth, width, thickness )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of section (D)
width
width of the section (B)
thickness
thickness of the section (t)
angle of rotation of section about alignment co-ordinate (Default is no rotation)
density
density of section (Default is 1000 kg/m3)
rmr
relative modular ratio of section (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the section is drawn relative to the co-ordinate is dependent on the shape alignment property which
can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddBoxSection( 0mm, 0mm, 100mm, 100mm, 20mm ) = 1.000
SectionAddChannelSection
Adds a channel section to the current section model.
Syntax
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, widthBottom, thicknessBottom )
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, widthBottom, thicknessBottom, , density )
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, widthBottom, thicknessBottom, , density,
rmr )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of channel section (D)
webThickness
thickness of the web (t)
widthTop
width of the top flange (Bt)
thicknessTop
thickness of the top flange (Tt)
widthBottom
width of the bottom flange (Bb)
angle of rotation of channel section about alignment co-ordinate (Default is no rotation)
density
density of channel section (Default is 1000 kg/m3)
rmr
relative modular ratio of channel section (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the channel section is drawn relative to the co-ordinate is dependent on the shape alignment property
which can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddChannelSection( 0mm, 0mm, 100mm, 10mm, 70mm, 10mm, 70mm,
10mm ) = 1.000
SectionAddCircle
Adds a circle to the current section model.
Syntax
SectionAddCircle( x1, y1, diameter )
Parameters
x1
x co-ordinate
y1
y co-ordinate
diameter
diameter of circle
density
density of circle (Default is 1000 kg/m3)
rmr
relative modular ratio of circle (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the circle is drawn relative to the co-ordinate is dependent on the shape alignment property which can
be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass of the circle.
Example
SectionCreate() = 1.000
SectionAddCircle( 0mm, 0mm, 100mm ) = 1.000
SectionDestroy() = 1.000
SectionAddCircularSection
Adds a circular section to the current section model.
Syntax
SectionAddCircularSection( x1, y1, diameter, thickness )
Parameters
x1
x co-ordinate
y1
y co-ordinate
diameter
diameter of section (D)
thickness
thickness of the section (t)
density
density of section (Default is 1000 kg/m3)
rmr
relative modular ratio of section (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the section is drawn relative to the co-ordinate is dependent on the shape alignment property which
can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddCircularSection( 0mm, 0mm, 100mm, 20mm ) = 1.000
SectionAddHoleCircle
Adds a circular hole to the current section model.
Syntax
SectionAddHoleCircle( x1, y1, diameter )
Parameters
x1
x co-ordinate
y1
y co-ordinate
diameter
diameter of circle
density
density of circle (Default is -1000 kg/m3)
rmr
relative modular ratio of circle (Default is -1.0)
Return Value
1 if successful; otherwise 0
Remarks
The model will not validate that the hole has been placed on top of an existing shape. It is also necessary to ensure that
the density and relative modular ratio provided when the hole is added are the negative of the density and relative
modular ratio of the parent shape.
The location that the circle is drawn relative to the co-ordinate is dependent on the shape alignment property which can
be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass of the circle.
SectionAddHoleRectangle
Adds a rectangular hole to the current section model.
Syntax
SectionAddHoleRectangle( x1, y1, length, width )
Parameters
x1
x co-ordinate
y1
y co-ordinate
length
length of hole
width
width of hole
angle of rotation of hole about alignment co-ordinate (Default is no rotation)
density
density of hole (Default is -1000 kg/m3)
rmr
relative modular ratio of rectangle (Default is -1.0)
Return Value
1 if successful; otherwise 0
Remarks
The model will not validate that the hole has been placed on top of an existing shape. It is also necessary to ensure that
the density and relative modular ratio provided when the hole is added are the negative of the density and relative
modular ratio of the parent shape.
To draw a square ensure that both the length and width parameters use the same value.
SectionAddDoubleAngle
Adds a double angle section to the current section model.
Syntax
SectionAddAngle( x1, y1, depth, thickness, width, gap )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of angles (D)
thickness
thickness of the angles (t)
width
width of angles (B)
gap
gap between the angles (g)
angle of rotation of the angles about alignment co-ordinate (Default is no rotation)
density
density of angle (Default is 1000 kg/m3)
rmr
relative modular ratio of angle (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the angle is drawn relative to the co-ordinate is dependent on the shape alignment property which can
be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddDoubleAngle( 0mm, 0mm, 100mm, 10mm, 100mm, 10mm ) = 1.000
SectionAddISection
Adds a I section to the current section model.
Syntax
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, offsetTop, widthBottom, thicknessBottom,
offsetBottom )
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, offsetTop, widthBottom, thicknessBottom,
offsetBottom, )
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, offsetTop, widthBottom, thicknessBottom,
offsetBottom, , density )
SectionAddISection( x1, y1, depth, webThickness, widthTop, thicknessTop, offsetTop, widthBottom, thicknessBottom,
offsetBottom, , density, rmr )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of I section (D)
webThickness
thickness of the web (t)
widthTop
width of the top flange (Bt)
thicknessTop
thickness of the top flange (Tt)
widthBottom
width of the bottom flange (Bb)
thicknessBottom
thickness of the bottom flange (Tb)
offestBottom
offset of the bottom flange (b b)
angle of rotation of I section about alignment co-ordinate (Default is no rotation)
density
density of I section (Default is 1000 kg/m3)
rmr
relative modular ratio of I section (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the I section is drawn relative to the co-ordinate is dependent on the shape alignment property which
can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
SectionAddRectangle
Adds a rectangle to the current section model.
Syntax
SectionAddRectangle( x1, y1, length, width )
Parameters
x1
x co-ordinate
y1
y co-ordinate
length
length of rectangle
width
width of rectangle
angle of rotation of rectangle about alignment co-ordinate (Default is no rotation)
density
density of rectangle (Default is 1000 kg/m3)
rmr
relative modular ratio of rectangle (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the rectangle is drawn relative to the co-ordinate is dependent on the shape alignment property which
can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass of the
rectangle.
Example
SectionCreate() = 1.000
SectionAddRectangle( 0mm, 0mm, 100mm, 50mm ) = 1.000
SectionAddTee
Adds a tee section to the current section model.
Syntax
SectionAddTee( x1, y1, depth, webThickness, widthFlange, thicknessFlange, offsetFlange )
SectionAddTee( x1, y1, depth, webThickness, widthFlange, thicknessFlange, offsetFlange, , density, rmr )
Parameters
x1
x co-ordinate
y1
y co-ordinate
depth
depth of tee (D)
webThickness
thickness of the web (t)
widthFlange
width of the top flange (Bt)
thicknessFlange
thickness of the top flange (Tt)
offsetFlange
offset of the top flange (bt)
angle of rotation of tee about alignment co-ordinate (Default is no rotation)
rmr
relative modular ratio of tee (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the tee is drawn relative to the co-ordinate is dependent on the shape alignment property which can be
set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass.
Example
SectionCreate() = 1.000
SectionAddTee( 0mm, 0mm, 100mm, 10mm, 70mm, 10mm, 35mm ) = 1.000
SectionAddTriangle
Adds a triangle to the current section model.
Syntax
SectionAddTriangle( x1, y1, length, width )
Parameters
x1
x co-ordinate
y1
y co-ordinate
length
length of triangle
width
width of triangle
angle of rotation of triangle about alignment co-ordinate (Default is no rotation)
density
density of triangle (Default is 1000 kg/m3)
rmr
relative modular ratio of triangle (Default is 1.0)
Return Value
1 if successful; otherwise 0
Remarks
The location that the triangle is drawn relative to the co-ordinate is dependent on the shape alignment property which
can be set using the SectionSetShapeAlignment function. By default the co-ordinate is the centre of mass of the triangle.
Example
SectionCreate() = 1.000
SectionAddTriangle( 0mm, 0mm, 100mm, 50mm ) = 1.000
SectionCreate
Creates a new section properties model. A section properties model must be created before any other section property
functions can be used.
Syntax
SectionCreate()
Return Value
1 if successful; otherwise 0
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionDestroy
Destroys the current section model and all it’s associated properties.
Syntax
SectionDestroy()
Return Value
1 if successful, otherwise 0.
Remarks
Destroys the current section properties model created by SectionCreate and frees all the system resources associated
with the model.
SectionGetAngleOfRotation
Returns the combined angle of rotation to the principle axis of the current section properties model. A section properties
model must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetAngleOfRotation()
Return Value
Returns the combined angle of rotation to the principle axis of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetArea
Calculates and returns the area of the current section properties model. A section properties model must be created
using SectionCreate before any other section property functions can be used.
Syntax
SectionGetArea()
Return Value
Returns the area of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetCombinedCentroidX
Returns the x coordinate of the combined centroid of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetCombinedCentroidX()
Return Value
Returns the x coordinate of the combined centroid of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetCombinedCentroidY
Returns the y coordinate of the combined centroid of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetCombinedCentroidY()
Return Value
Returns the y coordinate of the combined centroid of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetElasticModulusXX
Returns the elastic modulus about centroid XX of the current section properties model. A section properties model must
be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetElasticModulusXX()
Return Value
Returns the elastic modulus about centroid XX of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetElasticModulusYY
Returns the elastic modulus about centroid YY of the current section properties model. A section properties model must
be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetElasticModulusYY()
Return Value
Returns the elastic modulus about centroid YY of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetEqualAreaAxisX
Returns the x coordinate of the equal area axis of the current section properties model. A section properties model must
be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetEqualAreaAxisX()
Return Value
Returns the x coordinate of the equal area axis of the current model.
Remarks
This function only returns a value if the section model is made up purely of rectangles at 90
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetEqualAreaAxisY
Returns the y coordinate of the equal area axis of the current section properties model. A section properties model must
be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetEqualAreaAxisY()
Return Value
Returns the y coordinate of the equal area axis of the current model.
Remarks
This function only returns a value if the section model is made up purely of rectangles at 90
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetMajorRadiusOfGyration
Returns the major axis radius of gyration about the centroid of the current section properties model. A section properties
model must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetMajorRadiusOfGyration()
Return Value
Returns the major axis radius of gyration about the centroid of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetMajorSecondMoment
Returns the major axis principle second moment of area of the current section properties model. A section properties
model must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetMajorSecondMoment()
Return Value
Returns the major axis principle second moment of area of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetMinorRadiusOfGyration
Returns the minor axis radius of gyration about the centroid of the current section properties model. A section
properties model must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetMinorRadiusOfGyration()
Return Value
Returns the minor axis radius of gyration about the centroid of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetMinorSecondMoment
Returns the minor axis principle second moment of area of the current section properties model. A section properties
model must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetMinorSecondMoment()
Return Value
Returns the minor axis principle second moment of area of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetPlasticModulusXX
Returns the plastic modulus at the equal area axis XX of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetPlasticModulusXX()
Return Value
Returns the plastic modulus at the equal area axis XX of the current model.
Remarks
This function only returns a value if the section model is made up purely of rectangles at 90
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetPlasticModulusYY
Returns the plastic modulus at the equal area axis YY of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetPlasticModulusYY()
Return Value
Returns the plastic modulus at the equal area axis YY of the current model.
Remarks
This function only returns a value if the section model is made up purely of rectangles at 90
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetRadiusOfGyrationXX
Returns the radius of gyration about centroid XX of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetRadiusOfGyrationXX()
Return Value
Returns the radius of gyration about centroid XX of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetRadiusOfGyrationYY
Returns the radius of gyration about centroid YY of the current section properties model. A section properties model
must be created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetRadiusOfGyrationYY()
Return Value
Returns the radius of gyration about centroid YY of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetSecondMomentXX
Returns the second moment of area XX of the current section properties model. A section properties model must be
created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetSecondMomentXX()
Return Value
Returns the second moment of area XX of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetSecondMomentYY
Returns the second moment of area YY of the current section properties model. A section properties model must be
created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetSecondMomentYY()
Return Value
Returns the second moment of area YY of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionGetTotalMass
Returns the total mass per unit length of the current section properties model. A section properties model must be
created using SectionCreate before any other section property functions can be used.
Syntax
SectionGetTotalMass()
Return Value
Returns the total mass per unit length of the current model.
Remarks
The section properties function library is a collection of Tedds functions for analysing the properties of an engineering
section. The functions provide an alternative to the Tedds Section Properties Tool which is accessible from the Section
Properties Calculation in the Tedds Engineering Library Index.
Once a section properties model has been created use the SectionAdd… functions to create the desired section. Once a
section has been created the required properties can be requested using the SectionGet… functions.
SectionSetShapeAlignment
Sets the shape alignment used by the SectionAdd… functions. The alignment determines how the shape is positioned
relative to the output co-ordinate.
Syntax
SectionSetShapeAlignment() – Sets the shape alignment to default setting (Centre of Mass)
Parameters
verticalAlignmentName
name of alignment type to use for aligning shape vertically
verticalAlignmentId
numeric id of alignment type to use for aligning shape vertically
horizontalAlignmentName
horizontalAlignmentId
numeric id of alignment type to use for aligning shape horizontally
Return Value
1 if successful, otherwise 0.
Remarks
The alignment is the relationship between the bounding rectangle of the shape and the output co-ordinate.
The following table lists the alignment types. The default alignment is the centre of mass of the shape.
Id Name Description
-1 “Default” Use default alignment (Centre Of Mass)
“CentreOfMass”
“CenterOfMass”
0 “Near” Shape is aligned so that the bottom left corner of the bounding rectangle is at the
output co-ordinate.
1 “Centre” Shape is aligned so that the centre is at the output co-ordinate.
“Center”
2 “Far” Shape is aligned so that the top right corner of the bounding rectangle is at the
output co-ordinate.
Example
SectionCreate() = 1.000
SectionSetShapeAlignment() = 1.000
SectionAddCircle( 0mm, 0mm, 200mm ) = 1.000
SectionDestroy() = 1.000
Settings
GetBendingMomentFace
Returns the current value of the setting which determines on which face of an analysis element the bending moment is
drawn in analysis calculations.
Syntax
GetBendingMomentFace()
Return Value
Analysis calculations will draw bending moment diagrams showing positive bending relative to the local y-axis of the
analysis element (1) or inverted relative to the local y-axis of the analysis element(-1).
Remarks
The return value of this function can often be used directly in a drawing transformation to ensure that any drawing
elements which should be relative to the moment drawing are drawn on the correct face of the analysis element. The
value can be used to scale a drawing in the y axis by a factor of 1, i.e. no effect or -1 to flip the drawing in the y-axis.
DrawCreateTransform() = ?
DrawTransformScale(1, GetBendingMomentFace()) = ?
... do drawing stuff relative to moment diagram
DrawDestroyTransform() = ?
GetDebug
Returns the state of the debug mode option.
Syntax
GetDebug()
Remarks
Debug mode changes how some functions and calculations behave in order to assist the diagnosis of errors (bugs) when
writing custom calculations. Some calculations may alter their behaviour when debug mode is enabled, therefore debug
mode should always be disabled when producing final output calculations.
Additional warnings are shown in the progress log for common programming issues that may be errors.
If an expression error is reported whilst a calculations user interface is visible the error dialog will include the option
to Continue calculating.
If an expression error is reported whilst a calculations user interface is visible the error dialog will not include the
option to Continue calculating.
Return Value
Debug mode (0 = disabled, 1 = enabled).
GetSketchAlignment
Returns the current sketch alignment setting.
Syntax
GetSketchAlignment()
Return Value
Sketch alignment (0=Left,1=Centre,2=Right).
Remarks
The sketch alignment applies to Active Sketches and Calc Items stored in the Enhanced Metafile format. Sketch are
output to the document and aligned relative to the page width.
GetSketchScaleHeight
Returns the current sketch scale height setting.
Syntax
GetSketchScaleHeight()
Return Value
Sketch scale height as a percentage.
Remarks
The sketch scale height applies to Active Sketches and Calc Items stored in the Enhanced Metafile format. Sketches are
output to the document and scaled to a percentage of the document page height.
GetSketchScaleWidth
Returns the current sketch scale width setting.
Syntax
GetSketchScaleWidth()
Return Value
Sketch scale width as a percentage.
Remarks
The sketch scale width applies to Active Sketches and Calc Items stored in the Enhanced Metafile format. Sketches are
output to the document and scaled to a percentage of the document page width.
GetTolerance
Returns the current tolerance used when comparing values for equality.
Syntax
GetTolerance()
Return Value
The current tolerance used for comparing values for equality.
Example
GetTolerance() = 1.010-15
ListAddIns
Returns a list of all the loaded Tedds Add Ins.
Syntax
ListAddIns()
Return Value
A string listing all the Tedds Add Ins.
ListFields
Returns a list of all the available Tedds fields.
Syntax
ListFields()
Return Value
A string listing all the Tedds fields.
ListFunctions
Returns a list of all the available Tedds functions.
Syntax
ListFunctions()
Return Value
A string listing all the Tedds functions.
MinTolerance
Returns the minimum tolerance allowed when comparing values for equality.
Syntax
MinTolerance()
Return Value
The minimum tolerance allowed for comparing values for equality.
Example
MinTolerance() = 2.2204460492503110-16
SetDebug
Enables or disables debugging mode.
Syntax
SetDebug( enable )
Parameters
enable enable or disable debug mode (0 = disable, 1 = enable)
Remarks
Debug mode changes how some functions and calculations behave in order to assist the diagnosis of errors (bugs) when
writing custom calculations. Some calculations may alter their behaviour when debug mode is enabled, therefore debug
mode should always be disabled when producing final output calculations.
Additional warnings are shown in the progress log for common programming issues that may be errors.
If an expression error is reported whilst a calculations user interface is visible the error dialog will include the option
to Continue calculating.
If an expression error is reported whilst a calculations user interface is visible the error dialog will not include the
option to Continue calculating.
Return Value
The previous value of this option before it is modified.
SetDebugTrace
Enables or disables debug tracing.
Syntax
SetDebugTrace( enable )
Parameters
enable if True (1) debug tracing is enabled for all subsequent expressions, if False (0) debug tracing is disabled for
all subsequent expressions.
Return Value
Returns the current value of this setting before the new value is applied, True (1) if enabled; otherwise False (0).
Remarks
When calculating is in progress, tracing will log messages that help you to monitor the execution sequence of your
calculations, to detect malfunctions. The messages that tracing produces appear in the Progress Log window therefore
the Progress Log must be enabled to read the messages.
When tracing is enabled during complex calculations a significant number of messages may be shown which will effect
both calculation performance and the ease with which you can find the relevant messages to the problem you are trying
to resolve. It is therefore recommended that tracing is only enabled for small sections of your calculations at a time.
The SetDebugTrace function returns the current value of the setting before the value is applied so that you can save the
current setting and subsequently restore the setting to its former state. This approach ensures that if your expressions
are called from other calculations which are also using the SetDebugTrace function the current setting will always be
maintained.
Example
LogText( "Example 1: Trace all expressions..." ) = ?
_savedDebugTrace = SetDebugTrace(True) = ?
y1 = 12
y2 = 22
y3 = 32
EvalFor( "x", 4, "x <= 10", +1, "SetVar(\"y[x]\", x2)" ) = ?
y11 = 112
y12 = 122
y13 = 132
SetDebugTrace(_savedDebugTrace) = ?
SetDecimalSymbol
Sets the character used in expressions to represent the decimal separator in a numeric value.
Syntax
SetDecimalSymbol( decimalSymbol )
Parameters
decimalSymbol decimal symbol character
Return Value
The current list decimal symbol character.
Remarks
The decimal symbol cannot be assigned the same character as either the List Separator or the Expression Delimiter, refer
to the functions SetListSeparator and SetExpressionDelimiter for more details.
When a document is calculated the default decimal symbol is determined by the Tedds setting "Calculating\Regional
Settings\Number and expression format\Decimal symbol".
Example
a = 1.2 + 1.3 = 2.500
SetDecimalSymbol( "," ) = ""
a = 2,500
a = 1,2 + 1,3 = 2,500
SetDimAnal
Sets the option which determines whether unit dimension checks are performed.
Syntax
SetDimAnal( dimAnalysis )
Parameters
dimAnalysis if True (1) then unit dimension checks will be performed, if False (0) unit dimension checks will not be
performed
Return Value
True (1) if successful; otherwise False (0).
Remarks
When expressions are calculated and this option is enabled the mathematical operations and results will be checked to
ensure that they are dimensionally correct according to the units used. SetDimAnal can be used to disable this checking.
Disabling dimensional checking is not recommended, calculations in the Tedds Engineering Library may not work
correctly if this option is disabled. Dimensional checking is an integral and fundamental part of the functionality of Tedds,
only disable this option if you understand the implications. If you need to disable this option for a specific expression in a
calculation it is recommended that you re-enable the option immediately after the expression in question.
When a document is calculated this option will default to the Tedds setting "Calculating\General\Perform dimensional
checks".
Example
SetDimAnal( True ) = 1.000
1m * 2 = ? m2<Error: specified result units do not match dimensions of expression2*1 m^(1) <> 1*1 m^(2)>
1m * 2 = 2.000 m2
SetErrorMode
Sets the option which determines how calculation errors are reported.
Syntax
SetErrorMode( errorMode )
Parameters
errorMode if 0 then errors are only reported in the document output, if 1 errors are reported in the document
output and the user will be prompted to acknowledge the error.
Return Value
True (1) if successful; otherwise False (0).
Remarks
When a document is calculated this option will default to the Tedds setting "Calculating\General\Prompt on calculation
error"
Example
x = 1
y = 0
errorMode = SetErrorMode( 0 )
z = x / y = ?<Error: divide by zero>
SetErrorMode( errorMode ) = 0.000
SetVarIf( GetExpressionError() == 111, “z”, -1 ) = -1.000
z = -1.000
SetErrorOnUndefinedVar
Sets the option which determines whether an error will be reported if an undefined variable is used.
Syntax
SetErrorOnUndefinedVar( errorOnUndefinedVar )
Parameters
errorOnUndefinedVar if True (1) then in the event of an undefined variable an error will be reported, if False (0) the
user will be prompted to enter a value for the undefined variable.
Return Value
True (1) if successful; otherwise False (0).
Remarks
When a document is calculated this option will default to the Tedds setting "Calculating\General\Error on undefined
variable".
Example
SetErrorOnUndefinedVar( False ) = 1.000
abc = ?
SetErrorOnUndefinedVar( True ) = 1.000
xyz = ?
SetFormats
Sets the default numerical format and precision used for showing intermediate and final results.
Syntax
SetFormats( intFormat, intPrecision, finalFormat, finalPrecision )
Parameters
intFormat is the numerical format (F=Fixed, E=Engineering, G=General, S=Scientific) to use for intermediate results
finalFormat is the numerical format (F=Fixed, E=Engineering, G=General, S=Scientific) to use for final results
Return Value
True (1) if successful; otherwise False (0).
Remarks
The default numerical format and precision is only used for output result fields which have not explicitly specified the
format and precision to use.
When a document is calculated these options will default to the Tedds settings "Calculating\Results".
pi = 3.1415926536
pi = 3.1
SetListSeparator
Sets the character used in expressions to separate a list of items, typically used for the parameters of a function call.
Syntax
SetListSeparator( listSeparator )
Parameters
listSeparator list separator character, note the chosen character must be used exclusively as the list separator it cannot
be used in any other context within an expression.
Return Value
The current list separator character.
Remarks
When a document is calculated the default list separator is determined by the Tedds setting "Calculating\Regional
Settings\Number and expression format\List separator".
Example
Sum( 1,2,3 ) = 6.000
SetListSeparator( "|" ) = ""
Sum( 1|2|3 ) = 6.000
SetShowDataGraphs
Sets the option which determines whether the Data Graph functions will show the Data Graph user interface.
Syntax
SetShowDataGraphs( showDataGraphs )
Parameters
showDataGraphs if True (1) then the Data Graphs user interface will be shown, if False (0) the Data Graphs will be
processed silently without any user interaction required.
Return Value
True (1) if successful; otherwise False (0).
Remarks
When using a calculation which requires making a selection from a Data Graphs, there may be circumstances when you
want to run that calculation without requiring any user interaction. Using SetShowDataGraphs you can force all Data
Graphs to be processed silently without showing the normal Data Graphs user interface.
When a document is calculated this option will default to the Tedds setting "Calculating\General\Show Data Graphs".
SetShowDataLists
Sets the option which determines whether the Data List functions will show the Data List user interface.
Syntax
SetShowDataLists( showDataLists )
Parameters
showDataList if True (1) then the Data List user interface will be shown, if False (0) the Data List will be processed
silently without any user interaction required.
Return Value
True (1) if successful; otherwise False (0).
Remarks
When using a calculation which requires making a selection from a Data List, there may be circumstances when you want
to run that calculation without requiring any user interaction. Using SetShowDataLists you can force all Data Lists to be
processed silently without showing the normal Data List user interface.
When a document is calculated this option will default to the Tedds setting "Calculating\General\Show Data Lists".
SetShowDataTables
Sets the option which determines whether the Data Table functions will show the Data Table user interface.
Syntax
SetShowDataTables( showDataTables )
Parameters
showDataTables if True (1) then the Data Table user interface will be shown, if False (0) the Data Table will be
processed silently without any user interaction required.
Return Value
True (1) if successful; otherwise False (0).
Remarks
When using a calculation which requires making a selection from a Data Table, there may be circumstances when you
want to run that calculation without requiring any user interaction. Using SetShowDataTables you can force all Data
Tables to be processed silently without showing the Data Table user interface.
When a document is calculated this option will default to the Tedds setting "Calculating\General\Show Data Tables".
SetSketchAlignment
Sets the alignment used when sketches are output to the document.
Syntax
SetSketchAlignment( alignment )
alignment sketch alignment relative to the document page (0=Left, 1=Centre/Center, 2=Right)
Return Value
True (1) if successful; otherwise False (0).
Remarks
The sketch alignment applies to Active Sketches, Calc Items stored in the Enhanced Metafile format and any field or
function that outputs a sketch.
SetSketchScale
Sets the maximum width and height that sketches will be output to the document, as a percentage of the page size.
Syntax
SetSketchScale( maxWidth, maxHeight )
maxWidth the maximum width sketches are allowed to be as a percentage of the document page width
maxHeight the maximum height sketches are allowed to be as a percentage of the document page height
Return Value
True (1) if successful; otherwise False (0).
Remarks
The sketch scale applies to Active Sketches, Calc Items stored in the Enhanced Metafile format and any field or function
that outputs a sketch. Sketches are output to the document and scaled to a percentage of the document page width and
height.
SetTolerance
Sets the tolerance used when comparing numerical values for equality.
Syntax
SetTolerance( tolerance )
Parameters
tolerance sets the tolerance used when comparing numerical values for equality
Return Value
True (1) if successful; otherwise False (0).
Remarks
When a document is calculated the default tolerance is 0.000000000000001.
Warning! - This function can seriously impact the results of your calculations, we strongly recommend that you do not
change the tolerance setting unless you fully understand the consequences because this settings will affect the results of
every subsequent numerical comparison. If you want to make numerical comparisons using a specific tolerance use one
of the functions Equal, LessOrEqual, LessThan, GreaterOrEqual or GreaterThan which allow you to specify the tolerance
for an individual comparison.
Example
SetTolerance( MinTolerance() ) = 0.000
1.0000000001 == 1.0 = 0.000
SetTolerance( 0.000001 ) = 0.000
1.0000000001 == 1.0 = 1.000
String functions
Str
Returns a number as a string.
Syntax
Str( value )
Parameters
value is the value to convert to a string
Return Value
Returns the value parameter as a string using the format f0.
Example
CurrentSpan = 2
Str( CurrentSpan ) = "2"
Str should only be used when the number being converted to a string is known to be an integer, otherwise accuracy will
be lost as the number will be rounded.
StrCompare
Compares two strings for equality. The function can perform case sensitive and case insensitive comparisons.
Syntax
StrCompare( string1, string2, caseInsensitive)
Parameters
string1 is the first string for comparison.
caseInsensitive is optional, if True case is ignored. If omitted or False then a case sensitive comparison will be performed.
Return Value
If string1 is less than string2 (string1 would appear first in a dictionary) then -1 is returned
If string1 is greater than string2 (String2 would appear first in a dictionary) then 1 is returned.
Examples
StrCompare(“abcd”, “efgh”, True) = -1.000
StrCompare(“abcd”, “ABCD”, True) = 0.000
StrCompare(“efgh”, “abcd”, True) = 1.000
For case sensitive comparisons only, uppercase letters are considered to be less than lowercase letters
StrDecode
Decodes a string converting specially encoded characters and non printable characters to their non encoded equivalents.
Syntax
StrDecode( string )
Parameters
string string to decode.
Return Value
Returns decoded version of the string.
Remarks
When defining a string some characters for example a tab character must be encoded via a special sequence of
characters. The StrDecode function converts an existing string and replaces specially encoded characters and non
printable characters with their non encoded equivalents.
When a string is defined Tedds automatically decodes any special characters, the StrDecode function allows you to
retrieve the decoded version of the string for use with other functions that require a decoded string.
Character Encoded
Tab \t
Newline \n
" \"
\ \\
Example
StrDecode( "Wall direction \"South\"" ) = "Wall direction "South""
StrEncode
Encodes a string by converting special characters and non printable characters to their encoded equivalents.
Syntax
StrEncode( string )
Parameters
string string to encode.
Return Value
Returns encoded version of the string.
Remarks
When defining a string some characters for example a tab character must be encoded via a special sequence of
characters. The StrEncode function converts an existing string and replaces special characters and non printable
characters with their encoded equivalents.
When a string is defined Tedds automatically decodes any special characters, the StrEncode function allows you to
retrieve the encoded version of the string for use with other functions that require an encoded string. For example when
displaying a string in a user interface quotes must be encoded in order to ensure they are displayed correctly.
Character Encoded
Tab \t
Newline \n
" \"
\ \\
Example
s = "Wall direction \"South\"" = "Wall direction "South""
StrEncode( s ) = "Wall direction \"South\""
StrEnd
Returns a new string based on the end of a string.
Syntax
StrEnd( string, length )
Parameters
string is the string
length is the maximum number of characters to return from the end of the string.
Return Value
Returns a string.
Example
StrEnd(“abcde”, 1) = "e"
StrEnd(“abcde”, 2) = "de"
StrEnd(“abcde”, 4) = "bcde"
StrEndsWith
Determines whether the end of a string matches the specified string.
Syntax
StrEndsWith( string1, string2 )
Parameters
string1 is the first string to compare.
Return Value
Returns True if the string2 parameter matches the end of string1; otherwise returns False.
Remarks
This function is case sensitive.
Example
StrEndsWith(“abcd”, “d”) = 1.000
StrEndsWith(“abcd”, “cd”) = 1.000
StrEndsWith(“abcd”, “abcd”) = 1.000
StrEndsWith(“abcd”, “ab”) = 0.000
StrEndsWith(“abcd”, “CD”) = 0.000
StrEndsWith(“abcd”, “cd ”) = 0.000
StrFirstIndexOf
Returns the position of the first occurrence of a character or string in a string.
Syntax
StrFirstIndexOf( string1, string2, startPosition, length )
Parameters
string1 is the string to search.
startPosition is optional and determines the first character in the string to start the search from. If startPosition is
omitted the search will start from the beginning of the string.
length is optional and determines how many characters within string1 are searched, from startPosition
to startPosition+length. If the parameter is missing the search will continue to the end of the string.
Return Value
Returns the position of the first occurrence of string2 in string 1 after startPosition. If string2 is not found within length
characters then -1 is returned.
Example
StrFirstIndexOf (“abcde”, “c”) = 3.000
StrFirstIndexOf (“abcde”, “cd”) = 3.000
StrFirstIndexOf (“abcde”, “cd”, 1) = 3.000
StrFirstIndexOf (“abcde”, “cd”, 4) = -1.000
StrFirstIndexOf (“abcde”, “cd”, 1, 2) = -1.000
StrFirstIndexOf (“abcde”, “cd”, 1, 3) = 3.000
StrFormat
Returns a formatted string that may include any number of values.
Syntax
StrFormat( format, value1, value2, … )
StrFormat( format )
Parameters
format is the string format. Place holders indicate where to insert values in the string and in what
format.
value1 is the first value that can be inserted into the string
value[n] is the nth value that can be inserted into the string
Return Value
Formatted string
Remarks
The format string is used to define what the resulting string will look like. To indicate where the values are to be inserted
use placeholders as follows. (Values can be either numerical or strings)
A = 5; B = 10
Result = StrFormat(“The value of A = [1]. The value of B = [2]. The
value of A + B = [1] + [2] = [3]”, A, B, A+B)
Result = "The value of A = 5. The value of B = 10. The value of A +
B = 5 + 10 = 15"
Each value in the parameter list can be used any number of times, or not at all.
C = 5m
To display C in scientific mode to 3 decimal places in inches use [<n> , S3, in]
D = 5kg
To display D in default format/precision in lbs use [ , , lbs]
A = 5; B = 10
Result = StrFormat(“The value of A = [1]. The value of B = [2]. The
value of A + B = [1] + [2] = [3]”, A, B, A+B)
Result = "The value of A = 5. The value of B = 10. The value of A +
B = 5 + 10 = 15"
With named placeholders
A = 5; B = 10; C = A + B
Result = StrFormat(“The value of A = [A]. The value of B = [B]. The
value of A + B = [A] + [B] = [C]”)
Result = "The value of A = 5. The value of B = 10. The value of A +
B = 5 + 10 = 15"
To include a square bracket in the text insert a '\' character before the bracket
C = 5m
To display C in scientific mode to 3 decimal places in inches use [<n> , S3, in]
D = 5kg
To display D in default format/precision in lbs use [ , , lbs]
StrFromChar
Returns a string for the specified ASCII character code.
Syntax
StrFromChar( value )
Parameters
value is the numeric ASCII character code to convert to a string
Return Value
Returns the ASCII value as a string.
Remarks
The American Standard Code for Information Interchange (ASCII) is the specification that defines how a character is
represented numerically. Computers can only understand numbers so text in Tedds is actually stored as ASCII encoded
characters. StrFromChar and the corresponding function StrToChar allow you to convert between string characters and
ASCII numeric codes.
Example
StrFromChar( 65 ) = "A"
StrFromChar( 97 ) = "a"
StrIndexOf
Returns the position of the nth occurrence of a string in a string.
Syntax
StrIndexOf( string1, string2, occurence )
Parameters
string1 is the string to search.
Return Value
Returns the position of the nth occurrence of string2 in string 1. If the nth occurrence of string2 is not found within
string1 then -1 is returned.
Example
StrIndexOf (“abcabcabc”, “c”, 1) = 3.000
StrIndexOf (“abcabcabc”, “c”, 2) = 6.000
StrIndexOf (“abcabcabc”, “c”, 3) = 9.000
StrIndexOf (“abcabcabc”, “c”, 4) = -1.000
StrIndexOf (“abcabcabc”, “abc”, 2) = 4.000
String
Returns a number as a string using the specified format and precision.
Syntax
String( value, format, units )
Parameters
value is the value to format as a string
format is the optional format (F=Fixed, E=Engineering, G=General, S=Scientific) and precision (0-15) to
use. If omitted the default Tedds format and precision are used (normally F3).
units is the optional units to use. If omitted base units will be used.
Example
a = 3.5
string(a,”f1”) = "3.5"
a = 3.5 m
string(a,”f1”) = "3.5"
a = 3.5 ft
string(a,”f1”) = "1.1"
a = 3.5 ft
string(a,”f1”, “ft”) = "3.5"
Remarks
The String function is often used when concatenating a value to a string.
L = 14 m
“The value of L is “ +string(L,”f0”,”m”)+ “ m” = "The value of L is 14
m"
StrInsert
Returns a new string with a string inserted at the specified position.
Syntax
StrInsert( string1, string2, insertPosition)
Paramaters
string1 is the string to insert a string into.
Return Value
Returns the result of inserting string2 into string1.
Example
StrInsert(“abcd”, “x”, 1) = "xabcd"
StrInsert(“abcd”, “x”, 3) = "abxcd"
StrInsert(“abcd”, “x”, 5) = "abcdx"
StrLastIndexOf
Returns the position of the last occurrence of a character or string in a string.
Syntax
StrLastIndexOf ( string1, string2, startPosition, length )
Parameters
string1 is the string to search.
startPosition is optional and determines the first character in the string to start the search from. If startPosition is
omitted the search will start from the end of the string.
length is optional and determines how many characters within string1 are searched, from startPosition
to startPosition-length. If the parameter is missing the search will continue to the begining of the string.
Return Value
Returns the position of the last occurrence of string2 in string 1 after startPosition. If string2 is not found within length
characters then -1 is returned.
Example
StrLastIndexOf (“abcde”, “c”) = 3.000
StrLastIndexOf (“abcde”, “cd”) = 3.000
StrLastIndexOf (“abcde”, “cd”, 1) = -1.000
StrLastIndexOf (“abcde”, “cd”, 4) = 3.000
StrLastIndexOf (“abcde”, “cd”, 5, 2) = -1.000
StrLastIndexOf (“abcde”, “cd”, 5, 3) = 3.000
StrLength
Returns the number of characters in a string.
Syntax
StrLength( string )
Parameters
string is the string to count the number of characters in.
Return Value
Number of characters.
Example
StrLength(“abcd”) = 4.000
StrLength(“”) = 0.000
StrPadLeft
Returns a string padded on the left side with a character or string so that the new string is of the required length.
Syntax
StrPadLeft( string1, maxLength, string2 )
Paramaters
string1 is the string to pad.
Return Value
Padded string.
Example
StrPadLeft(“abcde”, 1) = "abcde"
StrPadLeft(“abcde”, 5) = "abcde"
StrPadLeft(“abcde”, 10) = " abcde"
StrPadLeft(“abcde”, 20) = " abcde"
StrPadLeft(“abcde”, 10, “@”) = "@@@@@abcde"
StrPadLeft(“abcde”, 10, “<>”) = "<><><abcde"
StrPadLeft(“abcde”, 10, “XYZ”) = "XYZXYabcde"
StrPadRight
Returns a string padded on the right side with a character or string so that the new string is of the required length.
Syntax
StrPadRight( string1, maxLength, string2 )
Paramaters
string1 is the string to pad.
Return Value
Padded string.
Example
StrPadRight(“abcde”, 1) = "abcde"
StrPadRight(“abcde”, 5) = "abcde"
StrPadRight(“abcde”, 10) = "abcde "
StrPadRight(“abcde”, 20) = "abcde "
StrPadRight(“abcde”, 10, “@”) = "abcde@@@@@"
StrPadRight(“abcde”, 10, “<>”) = "abcde<><><"
StrPadRight(“abcde”, 10, “XYZ”) = "abcdeXYZXY"
StrRemove
Returns a string with the specified number of characters removed from a specified position in a string.
Syntax
StrRemove( string, startPosition, count )
Paramaters
string is the string to remove characters from.
Return Value
string
Example
StrRemove(“abcde”, 1, 1) = "bcde"
StrRemove(“abcde”, 1, 2) = "cde"
StrRemove(“abcde”, 4, 1) = "abce"
StrRemove(“abcde”, 4, 2) = "abc"
StrReplace
Returns a string replacing all instances of the specified substrings within the string.
Syntax
StrReplace( string, stringRemove1, StringReplace1, stringRemove2, stringReplace2, … )
Paramaters
string is the original string.
Remarks
To remove a specific character or substring completely, replace it with an empty string.
Return Value
String.
Example
StrReplace("abcde", "a", "z") = "zbcde"
StrReplace("abcde", "ab", "z") = "zcde"
StrReplace("abcde", "a", "yz") = "yzbcde"
StrReplace("abcdeabcdeabcde", "a", "z") = "zbcdezbcdezbcde"
StrReplace("abcdeabcdeabcde", "a", "") = "bcdebcdebcde"
StrReplace("abcde", "a", "A", "b", "B", "c", "C", "d", "D", "e", "E"
) = "ABCDE"
StrStart
Returns the start of a string.
Syntax
StrStart( string, length )
Paramaters
string is the string
length is the maximum number of characters to return from the start of the string.
Return Value
String
Example
StrStart(“abcde”, 1) = "a"
StrStart(“abcde”, 2) = "ab"
StrStart(“abcde”, 4) = "abcd"
StrStartsWith
Determines if a string starts with a specified string.
Syntax
StrStartsWith( string1, string2 )
Paramaters
string1 is the string to check
Return Value
Returns True if the parameter string 1 starts with the parameter string2; otherwise returns False.
Remarks
This function is case sensitive.
Example
StrStartsWith(“abcd”, “a”) = 1.000
StrStartsWith(“abcd”, “ab”) = 1.000
StrStartsWith(“abcd”, “abcd”) = 1.000
StrStartsWith(“abcd”, “cd”) = 0.000
StrStartsWith(“abcd”, “AB”) = 0.000
StrStartsWith(“abcd”, “ ab”) = 0.000
StrSubstring
Returns a sub string from a string.
Syntax
StrSubstring( string, startPosition, length )
Paramaters
string is the string to return a sub string from.
length is the optional maximum number of characters to return, if omitted the string from startPosition to the
end of the string is returned.
Return Value
Sub string
Example
StrSubstring(“abcde”, 1, 1) = "a"
StrSubstring(“abcde”, 1, 2) = "ab"
StrSubstring(“abcde”, 4, 2) = "de"
StrSubstring(“abcde”, 2) = "bcde"
StrToChar
Returns the first character of a string as an ASCII character code.
Syntax
StrToChar( value )
Parameters
value is the string to convert to an ASCII character code
Return Value
Returns the value parameter as an ASCII character code.
Remarks
The American Standard Code for Information Interchange (ASCII) is the specification that defines how a character is
represented numerically. Computers can only understand numbers so text in Tedds is actually stored as ASCII encoded
characters. StrToChar and the corresponding function StrFromChar allow you to convert between string characters and
ASCII numeric codes.
Example
StrToChar( "A" ) = 65.000
StrToChar( "a" ) = 97.000
StrToLower
Returns a string in lowercase.
Syntax
StrToLower( string )
Paramaters
string is the string to return in lowercase.
Example
StrToLower(“ABCDE”) = "abcde"
StrToLower(“AbCdE”) = "abcde"
StrToUpper
Returns a string in uppercase.
Syntax
StrToUpper( string )
Paramaters
string is the string to return in uppercase.
Example
StrToUpper(“abcde”) = "ABCDE"
StrToUpper(“AbCdE”) = "ABCDE"
StrTrim
Returns a string with characters removed from the left and right of a string.
Syntax
StrTrim( string, trimCharacters )
Paramaters
string is the string to trim.
trimCharacters is the optional string of characters that are to be trimmed from the string, if omitted spaces are trimmed.
Example
StrTrim(“ a b c d e ”) = "a b c
d e"
StrTrim(“.zxy.yz..abcde..zzxy.”, “.xyz”) = "abcde"
StrTrimEnd
Returns a string with characters removed from the end of the string.
Syntax
StrTrimEnd( string, trimCharacters )
Paramaters
string is the string to trim.
trimCharacters is the optional string of characters that are to be trimmed from the string, if omitted spaces are trimmed.
Example
StrTrimEnd(“ a b c d e ”) = " a b c
d e"
StrTrimEnd(“.abcde..zzxy.”, “.xyz”) = ".abcde"
StrTrimStart
Returns a string with characters removed from the start of the string.
Syntax
StrTrimStart( string, trimCharacters )
Paramaters
string is the string to trim.
trimCharacters is the optional string of characters that are to be trimmed from the string, if omitted spaces are trimmed.
Example
StrTrimStart(“ a b c d e ”) = "a b c d
e "
StrTrimStart(“.zxy.yz..abcde.”, “.xyz”) = "abcde."
StringList
Returns a string containing a list of values separated by the current list separator character.
Syntax
StringList( format, units, value1, value[n], …)
Paramaters
format is the optional format (F=Fixed, E=Engineering, G=General, S=Scientific) and precision (0-15) to
use. If omitted the default Tedds format and precision are used (normally F3).
units is the optional units to use for each value. If omitted base units will be used.
value1 is the first element to add to the list. If the value is a number the number is converted to a string using
the f0 format.
Return Value
String list where each element is separated using the current locales list separator character.
Remarks
If any of the specified parameters are an empty string value they will not be included in the list.
Example
StringList( “F0”, “”, 1.1, 2, 3.6 ) = "1,2,4"
StringListRange
Returns a string containing a list of values for a specified range separated by the current list separator character.
Syntax
StringListRange( format, units, count, start, step )
Paramaters
format is the optional format (F=Fixed, E=Engineering, G=General, S=Scientific) and precision (0-15) to
use. If omitted the default Tedds format and precision are used (normally F3).
units is the optional units to use for each value. If omitted base units will be used.
step is the optional stepping value to use between each element, if omitted 1 is used.
Return Value
String list where each element is separated using the current locales list separator character.
Example
StringListRange( “F1”, “”, 5 ) = "1.0,2.0,3.0,4.0,5.0"
StringListRange(“F1”, “m”, 5, 0mm, 200mm ) = "0.0,0.2,0.4,0.6,0.8"
StringListRange(“F1”, “in”, 5, 0in, 1ft ) =
"0.0,12.0,24.0,36.0,48.0"
StrList
Returns a string containing a list of values separated by the current list separator character.
Syntax
StrList( value1, value[n],…)
Paramaters
Value1 is the first element in the list. If the value is a number the number is converted to a string using zero
decimal places.
Return Value
String list where each element is separated using the current locales list separator character.
Remarks
If any of the specified parameters are an empty string value they will not be included in the list.
Example
StrList( 1, 2, 3 ) = "1,2,3"
StrList( “a”, “b”, “c” ) = "a,b,c"
StrList( “a”, “”, “c”, “”, “e” ) = "a,c,e"
A = 1.1
B = 2.0
C = 3.6
StrList( A,B,C ) = "1,2,3"
StrListAdd
Adds item(s) to the end of an existing string list and returns the concatenated string list.
Syntax
StrListAdd( list, value1, value[n],…)
Paramaters
list is the existing string list.
value1 is the first element to be appended to the list. If the value is a number the number is converted to a string using
the fixed format to zero decimal places.
Return Value
String list where each element is separated using the current locales list separator character.
Remarks
Values are added to the list in the order specified.
Example
list = StrList( 1, 2, 3 ) = "1,2,3"
list = StrListAdd( list, 4 ) = "1,2,3,4"
list = StrListAdd( list, 5, 6, 7 ) = "1,2,3,4,5,6,7"
list = StrListAdd( list, "h", "i", "j" ) = "1,2,3,4,5,6,7,h,i,j"
A = 1.1
B = 2.0
C = 3.6
list = StrListAdd( list, A, B, C ) = "1,2,3,4,5,6,7,h,i,j,1,2,4"
StrListCount
Returns the number of items in a string list.
Syntax
StrListCount( list )
Paramaters
list is the string list.
Return Value
The number of items in the string list, where each element is separated using the current locales list separator character.
Example
list = StrList( "a", "b", "c" ) = "a,b,c"
StrListCount( list ) = 3
list = StrListAdd( list, 4, 5, 6 ) = "a,b,c,4,5,6"
StrListCount( list ) = 6
StrListFind
Finds the index of a string in a string list.
Syntax
StrListFind( list, find, startIndex )
Paramaters
list is the string list.
startIndex is the optional 1 based index of the first item to start searching in the list, if omitted the search starts at
the first item.
Return Value
The 1 based index of the next item found in the string list which matches the find string. If the string is not found then
zero is returned.
Example
list = StrList( "a", "b", "c", "d", "e", "f", "a" ) = "a,b,c,d,e,f,a"
StrListFind( list, "b" ) = 2.000
StrListFind( list, "e" ) = 5.000
StrListFind( list, "a" ) = 1.000
StrListFind( list, "a", 2 ) = 7.000
StrListFind( list, "z" ) = 0.000
StrListGet
Returns one or more items from a string list.
Syntax
StrListGet( list, index, count )
Paramaters
list is the string list.
count is the optional number of items to return. If omitted one item will be returned, if -1 all items from index to the end
of the listwill be returned.
Return Value
A string if one item is returned or a string list if more than one item is returned.
Example
list = StrList( 1, 2, 3, 4, 5, 6 ) = "1,2,3,4,5,6"
StrListGet( list, 1 ) = "1"
StrListGet( list, 5 ) = "5"
StrListGet( list, 3, 2 ) = "3,4"
StrListInsert
Inserts one or more items into an existing string list at the specified index and returns the concatenated string list.
Syntax
StrListInsert( list, index, value1, value[n],…)
Paramaters
list is the existing string list.
index is the 1 based index of the position where the first item will be inserted
value1 is the first element to be inserted into the list. If the value is a number the number is converted to a string using
the fixed format to zero decimal places.
Return Value
String list where each element is separated using the current locales list separator character.
Remarks
Values are inserted into the list in the order specified.
Example
list = StrList( 1, 2, 3, 4, 5, 6, 7, 8, 9 ) = "1,2,3,4,5,6,7,8,9"
list = StrListInsert( list, 1, "a" ) = "a,1,2,3,4,5,6,7,8,9"
list = StrListInsert( list, 3, "c" ) = "a,1,c,2,3,4,5,6,7,8,9"
list = StrListInsert( list, 4, "d", "e" ) = "a,1,c,d,e,2,3,4,5,6,7,8,9"
StrListRange
Returns a string containing a list of values for a specified range separated by the current list separator character.
Syntax
StrListRange( count, start, step )
Paramaters
count is the number of elements to add to the list.
step is the optional stepping value to use between each element, if omitted 1 is used.
Return Value
String list where each element is separated using the current locales list separator character.
Example
StrListRange( 5 ) = "1,2,3,4,5"
StrListRange( 5, 0 ) = "0,1,2,3,4"
StrListRange( 5, 0, 2 ) = "0,2,4,6,8"
StrListRemove
Removes one or more items from an existing string list at the specified index and returns the new string list.
Syntax
StrListRemove( list, index, count )
Paramaters
list is the existing string list.
index is the 1 based index of the first item in the list to be removed
count is the optional number of items to remove from the string list, If omitted one item will be removed, if -1 all items
from index to the end of the list will be removed.
Return Value
New string list with items removed.
Example
list = StrList( 1, 2, 3, 4, 5, 6, 7, 8, 9 ) = "1,2,3,4,5,6,7,8,9"
list = StrListRemove( list, 1 ) = "2,3,4,5,6,7,8,9"
list = StrListRemove( list, 2, 2 ) = "2,5,6,7,8,9"
list = StrListRemove( list, 4, -1 ) = "2,5,6"
StrListRemoveEmpty
Removes all empty items from an existing string list and returns the new string list.
Syntax
StrListRemoveEmpty( list )
Paramaters
list is the existing string list.
Return Value
New string list with empty items removed.
Example
StrListRemoveEmpty( "a,,c,d" ) = "a,c,d"
StrListRemoveEmpty( ",,3,4,5" ) = "3,4,5"
StrListRemoveEmpty( "a1,b1,," ) = "a1,b1"
StrListReplace
Replaces one or more items in a string list at the specified index and returns the new string list.
Syntax
StrListReplace( list, index, value1, value[n], … )
Paramaters
list is the existing string list.
index is the 1 based index of the first item in the list to be replaced
value1 is the first item to be replaced in the list. If the value is a number the number is
converted to a string using the fixed format to zero decimal places.
value[n] is the nth item to be replaced in the list.
Return Value
New string list with items replaced.
Example
list = StrList( 1, 2, 3, 4, 5, 6, 7, 8, 9 ) = "1,2,3,4,5,6,7,8,9"
list = StrListReplace( list, 1, "a" ) = "a,2,3,4,5,6,7,8,9"
list = StrListReplace( list, 3, "c" ) = "a,2,c,4,5,6,7,8,9"
list = StrListReplace( list, 6, "f", "g", "h" ) = "a,2,c,4,5,f,g,h,9"
StrListSort
Sorts the items in a string list according to the specified criteria and returns the sorted string list.
Syntax
StrListSort( list, ascending, ignoreCase, ignoreFormatting, digitsNumerically )
Paramaters
list is the string list to sort.
ascending is optional and determines whether items are sorted in ascending (True) or descending order (False). If
the parameter is omitted the items will be sorted in ascending order.
ignoreCase is optional and determines whether to ignore upper and lower case (True) or not (False) when sorting the
items. If the parameter is omitted the items will be sorted ignoring the case.
ignoreFormatting is optional and determines whether to ignore (True) the formatting (superscript, subscript,
Greek) of characters or not (False).
digitsNumerically is optional and determines whether to sort digits numerically (True) or lexically (False).
If the parameter is omitted items will be sorted in numerical order.
Remarks
When digits are not sorted numerically they are sorted lexically. The sort looks at the underlying ASCII character code
and sorts digits from lowest to highest for each character. This unusual order reflects the numerical sequence of codes
used to indicate different numbers and letters. This order has several effects:
numbers sort out of arithmetical sequence: 1, 10, 11, 120, 13, 2 instead of 1,2,10,11,13,120.
sequential numbers in strings do not sort sequentially: Chapter 1, Chapter 11, Chapter 2 not Chapter 1, Chapter 2,
Chapter 11.
When sorting items numerically values in scientific format will not be sorted in their numeric order.
Example
list = StrList( "50", "1", "100", "a", "10", "A", "1.1", "-1.1",
"Z", "z", "a_{z}", "a_{b}", "a_{A}", "\61", "\61_{a}", "0", "-
100", "\61_{\61}", "-5", "50" )
Default sort, ascending, ignore case, ignore formatting, sort digits numerically
StrListSort( list ) = "-100,-5,-1.1,0,1,1.1,10,50,50,100,a,A,,aA,a,,ab,az,Z,z"
Sort descending
StrListToString
Converts a string list to a single string with the list separators removed.
Syntax
StrListToString( list )
Paramaters
list is the existing string list.
Return Value
New string with all the list separators removed.
Example
list = StrList( "m", "a", "t", "h", "s" ) = "m,a,t,h,s"
StrListToString( list ) = "maths"
StrListTrimItems
Trims each item in a string list, removing the specified characters from the left and right end of each item.
Syntax
StrListTrimItems( list, trimLeft, trimRight )
Paramaters
list is the existing string list.
trimLeft is the optional string to remove from the left side of each item, the default is a single space character " "
trimRight is the optional string to remove from the right side of each item, the default is trimLeft
Return Value
New string list with items trimmed.
Example
list = StrList( "+ red +", " blue ", "- green - ", " * yellow -+*"
)
= "+ red +, blue ,- green - , yellow -+"
list = StrListTrimItems( list ) = "+ red +,blue,- green -, yellow -+"
list = StrListTrimItems( list, "- " ) = "+ red +,blue,green, yellow -+"
list = StrListTrimItems( list, "+ ", "*-+ " ) = "red,blue,green, yellow"
StrListWrapItems
Inserts the specified strings before the left side and after the right side of each item in a string list.
Syntax
StrListWrapItems( list, left, right )
Paramaters
list is the existing string list.
right is the optional string to insert on the right side of each item, the default is the left value
Return Value
New string list with each item wrapped.
Example
list = StrList( "red", "blue", "green", "yellow" ) =
"red,blue,green,yellow"
list = StrListWrapItems( list, "-" ) = "-red-,-blue-,-green-,-yellow-"
list = StrListWrapItems( list, "++", "**" ) = "++-red-,++-blue-,++-
green-,++-yellow-"
Testing functions
GetVerifyFailedCount
Returns the number of Verify tests that have failed.
Syntax
GetVerifyFailedCount()
Return Value
The total number of verification tests that have failed.
Remarks
The verification counters are used in conjunction with the Tedds Verify field to verify the expected result of an
expression. This counter records how many verification tests have failed.
GetVerifyPassedCount
Returns the number of Verify tests that have passed.
Syntax
GetVerifyPassedCount()
Return Value
The total number of verification tests that have passed successfully.
Remarks
The verification counters are used in conjunction with the Tedds Verify field to verify the expected result of an
expression. This counter records how many verification tests have passed.
GetVerifyTotalCount
Returns the value of the verify counter.
Syntax
GetVerifyTotalCount()
Return Value
The total number of verification tests that have been calculated.
Remarks
The verification counters are used in conjunction with the Tedds Verify field to verify the expected result of an
expression. This counter records how many verification tests have been performed.
ResetVerifyCounters
Resets to zero the verification counters.
Syntax
ResetVerifyCounters()
Remarks
The verification counters are used in conjunction with the Tedds Verify field to verify the expected result of an
expression. The counters record how many verification test has been performed, how many test passed and how many
tests failed. This function resets all the counters to zero.
Verify
Verifies if the result of an expression is True(1).
Syntax
Verify( expression )
Parameters
Return Value
Returns True(1) if verification passed; otherwise False(0).
Remarks
The verification functions are used to test the expected result of an expression. When the Verify function is called the
verify counter is incremented as well as the counter for the returned result (VerifyPassed or VerifyFailed). The value of
the counters can be returned by using the functions GetVerifyTotalCount, GetVerifyPassedCount and
GetVerifyFailedCount.
When the Verify function returns False(0) i.e. a failed verification a Warning message will be added to the Progress Log.
Example
ResetVerifyCounters() = 1.000
Verify( Equal(1m, 1000mm) ) = 1.000
Verify( Equal(1m, 999mm) ) = 0.000
Verify( Equal(1m, 3.281ft, 1mm) ) = 1.000
3 verification tests were performed, 2 passed, 1 failed
VerifyEqual
Verifies if two values are equal.
Syntax
VerifyEqual( value1, value2, tolerance )
Parameters
Return Value
Returns True(1) if verification passed; otherwise False(0).
Remarks
The verification functions are used to test the expected result of a value. When the VerifyEqual function is called the
verify counter is incremented as well as the counter for the returned result (VerifyPassed or VerifyFailed). The value of
the counters can be returned by using the functions GetVerifyTotalCount, GetVerifyPassedCount and
GetVerifyFailedCount.
When the VerifyEqual function returns False(0) i.e. a failed verification, a Warning message will be added to the Progress
Log.
Example
ResetVerifyCounters() = 1.000
VerifyEqual( 1m, 1000mm ) = 1.000
VerifyEqual( 1m, 999mm ) = 0.000
VerifyEqual( 1m, 3.281ft, 1mm ) = 1.000
3 verification tests were performed, 2 passed, 1 failed
Unit functions
AddUnit
Adds a new unit to the Tedds unit database.
Syntax
AddUnit( name, mass, length, time, degrees, multiplier)
Parameters
name is the name of the unit.
Return Value
True if unit was added successfully; otherwise False.
Remarks
The unit database is installed as a read only file to prevent units from accidentally being overwritten, to use the AddUnit
function you must first change the file permissions of the unit database to provide write access.
Example
Addunit( “ft”,0,1,0,0, 0.3048 ) = ?
Would add the unit ft with length to the power 1 and a base units multiplier of length (m) by 0.3048.
Note that ft already exists as a unit so this would return an error if added again.
GetBaseUnits
Returns the current base units setting.
Syntax
GetBaseUnits()
Return Value
Base units (0=SI units,1=US units).
GetUnit
Returns the properties of a unit.
Syntax
GetUnit( name )
Parameters
name is the name of the unit.
Return Value
String value listing the name, mass, length, time, degrees and unit multiplier.
Example
Getunit(“ft”) = "ft",0,1,0,0,0.304800
ListAllUnits
Returns the properties of all of the units available in the unit database.
Syntax
ListAllUnits()
Return Value
String value listing the name, mass, length, time, degrees and unit multiplier for each unit.
Example
ListAllUnits() =
"$",0,0,0,0,1.000000;
"%",0,0,0,0,0.010000;
"A",0,0,-1,0,1.000000;
"BTU",1,2,-2,0,1055.060000;
"C",0,0,0,1,1.000000;
"Cday",0,0,1,1,86400.000000;
"F",-1,-2,2,0,1.000000;
etc.
RemoveUnit
Removes a unit from the unit database.
Syntax
RemoveUnit( name )
Parameters
name is the name of the unit to remove.
Return Value
True if unit was removed successfully; otherwise False.
Remarks
The unit database is installed as a read only file to prevent units from accidentally being overwritten, to use the AddUnit
function you must first change the file permissions of the unit database to provide write access.
ShowDims
Returns the dimensions of a value.
Syntax
ShowDims( value )
Parameters
value is the value to return the dimensions of.
Example
a = 3 ft
Showdims(a) = L^1, M^0, T^0, D^0
User Interface
CalcWindow
In debug mode shows the Calculation window which allows expressions to be typed and executed during the calculation
process.
Syntax
CalcWindow()
Remarks
This function only works when Debug mode is enabled, when debug mode is disabled the function does nothing.
Return Value
True (1) if window was shown; otherwise returns False (0).
VariablesWindow
In debug mode shows the Variable Manager window.
Syntax
VariablesWindow()
Remarks
This function only works when Debug mode is enabled, when debug mode is disabled the function does nothing.
Return Value
True (1) if window was shown; otherwise returns False (0).
Variable functions
ClearVarModified
Removes the modified attribute from a list of named variables.
Syntax
ClearVarModified(name1, name[n], …)
Paramaters
name1 is the name of the first variable to clear the modified attribute. Named placeholders can be used within
the variable name, see remarks.
name[n] is the name of the nth variable to clear the modified attribute
Remarks
When you start calculating a document the modified attribute for every variable in that document will be disabled. As
each variable is modified either directly through a calculations user interface or as the result of an assignment in a
calculation the modified attribute on that variable will be enabled. The ClearVarModified function can be used to
remove the modified attribute from a specific variable.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a = 100
VarModified("a") = 1.000
ClearVarModified( "a" ) = 1.000
VarModified("a") = 1.000
a = 50
VarModified("a") = 1.000
CopyVar
Copies the value and attributes from one variable to another variable.
Syntax
CopyVar( fromName1, toName1, fromName[n], toName[n], … )
Parameters
fromName[n] is the name of the variable to copy the value and attributes from. Named placeholders
can be used within the variable name, see remarks.
toName[n] is the name of the variable to copy the value and attributes to. Named placeholders can
be used within the variable name, see remarks.
Remarks
CopyVar is useful for copying large sets of variables in a single operation. It is also essential if you want to preserve the
attributes of a variable when making a copy of tha variable, if you used a simple assignment a1 = a, then the value will be
copied but the attributes of the original variable "a" would not be copied to "a1".
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
Returns the total number of variables that were successfully copied.
Example
a = 50
CopyVar("a", "a1") = ?
a1 = ?
b = 25
c = 75
CopyVar("a", "a1", "b", "b1", "c", "c1") = ?
a1 = ?
Page 814 of 903
Tedds 2020 - Function and Field Reference
b1 = ?
c1 = ?
Using placeholders
a = 100
b = 200
index = 1
CopyVar("a", "a[index]", "b", "b[index]") = ?
index = 2
CopyVar("a", "a[index]", "b", "b[index]") = ?
a1 = ?
b1 = ?
a2 = ?
b2 = ?
DeleteVarsInAllSections
Delete each occurrence of the named variables in the document section and in all Calc Sections.
Syntax
DeleteVarsInAllSections( varName1, … varName[n] )
Parameters
varName[n] is the name of a variable to delete. Named placeholders can be used within the variable name, see
remarks.
Remarks
If no parameters are specified then all the variables in the document and Calc Sections will be deleted.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a1 = 1;a2 = 2;b1 = 3;b2 = 4
listvarsinsection()=
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a1”, “b1”) = 1.000
listvarsinsection()=
a2 = 2.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a2”, “b2”) = 1.000
listvarsinsection()=
Using placeholders
Count = 1.000000;
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
DeleteVarsInAllSections(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 1.000000;
a2 = 2.000000;
b2 = 4.000000;
Count = 2
DeleteVarsInAllSections(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 2.000000;
DeleteVarsInSectionExcept
Deletes all variables in the current calc section except those named in the parameter list.
Syntax
DeleteVarsInSectionExcept( varName1,…varName[n] )
Parameters
varName[n]
Name of each variable that should not be deleted. Named placeholders can be used within the variable name, see
remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a1 = 1;a2 = 2;b1 = 3;b2 = 4
listvarsinsection()=
a1 = 1.000000;
a2 = 2.000000;
b1 = 3.000000;
b2 = 4.000000;
deletevarsinsectionexcept (“a2”)=1.000
listvarsinsection()=
a2 = 2.000000;
Using placeholders
b1 = 3.000000;
b2 = 4.000000;
deletevarsinsectionexcept (“Count”, “a[Count]”)=1.000
listvarsinsection()=
Count = 2.000000;
a2 = 2.000000;
DeleteVarsInSection
Deletes named variables from the current Calc Section, or the document section if the expression is not in a calc section.
Syntax
DeleteVarsInSection( varName1, … varName[n] )
Parameters
varName[n] is the name of a variable to delete. Named placeholders can be used within the variable name, see
remarks.
Remarks
If no parameters are specified then all variables in the current Calc Section will be deleted.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Examples
a1 = 2; b1 = 6; a2 = 4; b2 = 8
listvarsinsection()=
a1 = 2.000000;
a2 = 4.000000;
b1 = 6.000000;
b2 = 8.000000;
deletevarsinsection(“a1”, “b1”) = 1.000
listvarsinsection()=
a2 = 4.000000;
b2 = 8.000000;
deletevarsinsection(“a2”, “b2”) = 1.000
listvarsinsection()=
Using placeholders
Count = 1; a1 = 2; b1 = 6; a2 = 4; b2 = 8
listvarsinsection()=
Count = 1.000000;
Page 820 of 903
Tedds 2020 - Function and Field Reference
a1 = 2.000000;
a2 = 4.000000;
b1 = 6.000000;
b2 = 8.000000;
deletevarsinsection(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 1.000000;
a2 = 4.000000;
b2 = 8.000000;
Count = 2
deletevarsinsection(“a[Count]”, “b[Count]”) = 1.000
listvarsinsection()=
Count = 2.000000;
GetDocumentVar
Returns the value of a document variable or returns a default value if the variable does not exist.
Syntax
GetDocumentVar( name, default )
Parameters
name is the name of the variable. Named placeholders can be used within the variable name, see remarks.
default is the optional value to return if the variable does not exist.
Remarks
If the default value parameter is not specified the function will error if the variable does not exist.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
The value of the variable or the default value if the variable does not exist.
Examples
a1 = 1; a2 = 2; a3 = 3
GetDocumentVar(“a1”, 10) = 1.000
GetDocumentVar(“a2”, 10) = 2.000
GetDocumentVar(“a3”, 10) = 3.000
Using placeholders
Count = 1
GetDocumentVar(“a[Count]”, 10) = 1.000
Count = 2
GetDocumentVar(“a[Count]”, 10) = 2.000
Count = 3
GetExpr
Returns the value of a variable as an expression.
Syntax
GetExpr( varName )
Parameters
varName is the name of the variable. Named placeholders can be used within the variable name, see
remarks.
Remarks
The GetExpr function is useful if you need to display a variables expression instead of the result of the expression.
Typically this function would be used in conjunction with one of the string formatting functions (Str, StrFormat) to create
a string that includes the expression.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
The variables value as an expression.
Example
$area = r2
r = 3m
StrFormat( "[1] = [2,g2,m2]", GetExpr("area"), area ) = "r2 = 28.27
m2"
GetSectionVar
Returns the value of a Calc Section variable, if the variable does not exist then the specified default value is returned.
Syntax
GetSectionVar( sectionId, varName, [defaultValue] )
Paramaters
sectionId is the numeric section Id that uniquely identifies the section to get the value from. Use 0 to get the value
of a variable in the document section.
varName is the name of the variable. Named placeholders can be used within the variable name, see remarks.
defaultValue is the optional default value to return if the variable does not exist.
Remarks
The defaultValue parameter is optional but if it is not specified GetSectionVar will error if the variable does not exist.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
Value of variable or default value if variable does not exist.
Example
a1 = 1; a2 = 2; a3 = 3
getsectionvar( 0, “a1”, “undefined” ) = 1.000
getsectionvar( 0, “a2”, “undefined” ) = 2.000
getsectionvar( 0, “a3”, “undefined” ) = 3.000
getsectionvar( 0, “a4”, “undefined” ) = "undefined"
Using placeholders
Count = 1
getsectionvar( 0, “a[Count]”, “undefined” ) = 1.000
Page 825 of 903
Tedds 2020 - Function and Field Reference
Count = 2
getsectionvar( 0, “a[Count]”, “undefined” ) = 2.000
Count = 3
getsectionvar( 0, “a[Count]”, “undefined” ) = 3.000
Count = 4
getsectionvar( 0, “a[Count]”, “undefined” ) = "undefined"
GetVar
Returns the value of a variable or a default value if it does not exist.
Syntax
GetVar( name, default )
Parameters
name is the name of the variable. Named placeholders can be used within the variable name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
the value of the variable named by parameter name, of the default value if the variable does not exist.
Example
a1 = 1; a2 = 2; a3 = 3
GetVar(“a1”, “undefined” ) = 1.000
GetVar(“a2”, “undefined” ) = 2.000
GetVar(“a3”, “undefined” ) = 3.000
GetVar(“a4”, “undefined” ) = "undefined"
Using placeholders
Count = 1
GetVar(“a[Count]”, “undefined” ) = 1.000
Count = 2
GetVar(“a[Count]”, “undefined” ) = 2.000
Count = 3
GetVarAttributes
Returns the attributes of a variable as a string.
Syntax
GetVarAttributes( varName )
Parameters
varName is the name of the variable. Named placeholders can be used within the variable name, see
remarks.
Remarks
Each variable has a set of attributes which affect the behaviour of that variable.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
The attributes of the variable as a string where each character in the string denotes that attribute as being enabled.
Example
SetVar( "a", 54, "ht" ) = ?
SetVar( "b", 30, "r" ) = ?
GetVarAttributes( "a" ) = ?
GetVarAttributes( "b" ) = ?
Increment
Increments the value of a variable by a specified amount or 1 if no amount is specified.
Syntax
Increment( variableName, [increment])
Parameters
variableName is the name of the variable to increment. Named placeholders can be used within the variable
name, see remarks.
Remarks
If increment is a negative value the value of the variable variableName will be decremented.
If the variable variableName has units, the value will be incremented in base units unless the increment units are
specified.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Examples
a = 2
increment(“a”) = 1.000
a = 3.000
increment(“a”,10) = 1.000
a = 13.000
b = 2 ft
increment(“b”) = 1.000
b = 5.281 ft
increment(“b”,10 ft) = 1.000
b = 15.281 ft
Count = 1
c1 = 2 ft
increment(“c[Count]”) = 1.000
c1 = 5.281 ft
increment(“c[Count]”,10 ft) = 1.000
c1 = 15.281 ft
InitializeVar
Assigns a value to a variable if it doesn't already exist.
Syntax
InitVar( name, value, attributes )
Parameters
name is the name of the variable to assign a value to. Named placeholders can be used within the
variable name, see remarks.
attributes is optional and specifies the attributes of the new variable, see Remarks
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Variable attributes – Variable attributes include Temporay ‘t’, Hidden ‘h’, and promoted ‘p’. These attributes can be
assigned to the variable individually or grouped so InitializeVar(“x”, 2m, “th”) would initialize a temporary hidden
variable x with a value of 2m. Temporary variables are deleted from the variable store when Tedds has finished
calculating the current document. Hidden variables are not shown by default in the variable manager unless you choose
to view them. Promoted variables are promoted from the current variable section to the document level.
Return Value
Returns the value of the variable.
Example
InitializeVar(“a1”,2) = 2.000
a1 = 2.000
InitializeVar(“a1”,3) = 2.000
a1 = 2.000
InitializeVar(“a2”,4) = 4.000
a2 = 4.000
InitializeVar(“a2”,5) = 4.000
a2 = 4.000
Using placeholders
DeleteVarsInAllSections() = 1.000
Count = 1
InitializeVar(“a[Count]”,2) = 2.000
a1 = 2.000
InitializeVar(“a[Count]”,3) = 2.000
a1 = 2.000
Count = 2
InitializeVar(“a[Count]”,4) = 4.000
a2 = 4.000
InitializeVar(“a[Count]”,5) = 4.000
a2 = 4.000
InitializeVars
Assigns a value to one or more variables if they doesn't already exist.
Syntax
InitVars(value, attributes, varName1, … varName[n] )
Parameters
value is the value to assign.
attributes specifies the attributes for each new variable, see Remarks
varName[n] is the name of the variable to assign a value to. Named placeholders can be used within the
variable name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Variable attributes – Variable attributes include Temporay ‘t’, Hidden ‘h’, and promoted ‘p’. These attributes can be
assigned to the variable individually or grouped so InitializeVars( 2m, “th”, "x", "y" ) would initialize the temporary hidden
variables x and y with a value of 2m. Temporary variables are deleted from the variable store when Tedds has finished
calculating the current document. Hidden variables are not shown by default in the variable manager unless you choose
to view them. Promoted variables are promoted from the current variable section to the document level.
Return Value
Returns the value of the variable.
Example
InitializeVars(2, "", "a1", "a2") = 1.000
a1 = 2.000
a2 = 2.000
InitializeVars(4, "", "a1", "a2") = 1.000
a1 = 2.000
a2 = 2.000
Using placeholders
DeleteVarsInAllSections() = 1.000
Count = 1
InitializeVars(2, "th", "a[Count]", "b[Count]" ) = 1.000
a1 = 2.000
b1 = 2.000
InitializeVars(4, "th", "a[Count]", "b[Count]" ) = 1.000
a1 = 2.000
b1 = 2.000
Count = 2
InitializeVars(4, "th", "a[Count]", "b[Count]" ) = 1.000
a2 = 4.000
b2 = 4.000
IsValidVarName
Determines whether the specified string is a valid variable name.
Syntax
IsValidVarName( name )
Parameters
name is the name of the variable to test for validity.
Remarks
Variable names must confirm to the following rules:
Can contain letters, numbers, Greek letters and the characters '_', '@' and '.'
o space listseperator( or ,)
Return Value
True (1) if the variable name is valid otherwise False (0).
Example
IsValidVarName("a1") = 1.000
IsValidVarName("a b") = 0.000
IsValidVarName("La b") = 1.000
IsValidVarName("1a") = 0.000
ListVarsInSection
Returns a list of all the variables in the active Calc Section.
Syntax
ListVarsInSection ()
Return Value
A string listing all the variables.
PromoteVar
Promotes a variable from a Calc Section variable to a document variable.
Syntax
PromoteVar ( name1, name[n], … )
Parameters
name1 is the name of the first variable to promote. Named placeholders can be used within the variable name,
see remarks.
Remarks
Variables in a Calc Section are normally only accessible from that Calc Section. When a variable is promoted if the value
changes in the Calc Section then the value of the document variable will also be updated to the same value so that the
variables are synchronised. Document variables are accessible from all Calc Sections so a promoted variable can be
shared between Calc Sections.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
PromoteVariable(“a1”,”b1”,”c1”,“a2”,”b2”,”c2”) = ?
Using placeholders
Count = 1
PromoteVariable(“a[Count]”,”b[Count]”,”c[Count]”) = ?
Count = 2
PromoteVariable(“a[Count]”,”b[Count]”,”c[Count]”) = ?
RenameVar
Assigns a new name to an existing variable in the current Calc Section.
Syntax
RenameVar( fromName1, toName1, fromName[n], toName[n], … )
Parameters
fromName[n] is the existing name of the existing variable to rename. Named placeholders can be
used within the variable name, see remarks.
toName[n] is the new name of the variable. Named placeholders can be used within the variable
name, see remarks.
Remarks
RenameVar is useful for moving variables in variable management algorithms. When you need to "Move" a variable
RenameVar should be used in preference to CopyVar. RenameVar will improve calculation performance because the
variable is simply assigned a new name rather than having to assign the variable name and copy its value and attributes.
If the existing from variable does not exist no errors are reported. If the to variable already exists then it will be
overwritten.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
Returns the total number of variables that were successfully renamed.
Example
a = 50
RenameVar("a", "a1") = 1.000
a1 = 50.000
a = 50
b = 25
c = 75
RenameVar("a", "a1", "b", "b1", "c", "c1") = 3.000
ListVarsInSection() =
H1 = 10.000000;
H2 = 20.000000;
L1 = 1.000000;
L2 = 3.000000;
NumWalls = 2.000000;
a1 = 50.000000;
b1 = 25.000000;
c1 = 75.000000;
deleteIndex = 2.000000;
index = 2.000000;
next = i + 1;
Using placeholders
a = 100
b = 200
index = 1
RenameVar("a", "a[index]", "b", "b[index]") = 2.000
index = 2
RenameVar("a", "a[index]", "b", "b[index]") = 0.000
ListVarsInSection() =
H1 = 10.000000;
H2 = 20.000000;
L1 = 1.000000;
L2 = 3.000000;
NumWalls = 2.000000;
a1 = 100.000000;
b1 = 200.000000;
c1 = 75.000000;
deleteIndex = 2.000000;
index = 2.000000;
next = i + 1;
Deleting a set of variables from a list using RenameVar
H1 = 10m
L1 = 1m
H2 = 20m
L2 = 2m
H3 = 30m
L3 = 3m
NumWalls = 3
deleteIndex = 2
$next = i + 1
EvalFor( "i", deleteIndex, "i <= NumWalls", +1,
"RenameVar(\"L[next]\", \"L[i]\", \"H[next]\", \"H[i]\")" ) = 1.000
NumWalls = NumWalls - 1
ListVarsInSection() =
H1 = 10.000000;
H2 = 30.000000;
L1 = 1.000000;
L2 = 3.000000;
NumWalls = 2.000000;
a1 = 100.000000;
b1 = 200.000000;
c1 = 75.000000;
deleteIndex = 2.000000;
index = 2.000000;
next = i + 1;
SaveSectionVarsCalcItem
Save variables in the active Calc Section to a Calc Item in a Calc Library.
Syntax
SaveSectionVarsCalcItem( fileName, itemName, options, variable1, variable[n], …)
Paramaters
fileName is the full path to the Calc Library.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
An item saved with this function can be calculated by Tedds using the EvalCalcItem function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem1") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem2", 0, "a") = 1.000
SaveSectionVarsCalcItem("$(UserLbrDir)Test.lbr",
"SaveSectionVarsCalcItem3", 1+2+4) = 1.000
SaveSectionVarsTextFile
Save variables in the active Calc Section to a text file.
Syntax
SaveSectionVarsTextFile( fileName, options, variable1, variable[n], …)
Paramaters
filename is the full path to the text file.
variable1 is the optional name of the first variable to save, if omitted all variables are saved
Remarks
A file saved with this function can be calculated by Tedds using the EvalFile function.
Example
a = 1m
b = 10 kN/mm2
_tmp.Name = "Test"
SaveSectionVarsTextFile( "c:\TeddsOutputVariables1.txt" ) = 1.000
SaveSectionVarsTextFile( "c:\TeddsOutputVariables2.txt", 0, "a" ) =
1.000
SaveSectionVarsTextFile( "c:\TeddsOutputVariables3.txt", 1+2+4 ) =
1.000
SetDocumentVar
Assigns a value to a document variable.
Syntax
SetDocumentVar( name, value )
Parameters
name is the name of the variable to assign a value to. Named placeholders can be used within the variable
name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
True(1) if value was successfully assigned; otherwise False(0).
SetSectionVar
Assigns a value to a Calc Section variable.
Syntax
SetSectionVar( sectionID, varName, value )
Parameters
sectionId is the numeric section Id that uniquely identifies the section to get the value from. Use 0 to get the value
of a variable in the document section.
varName is the variable name. Named placeholders can be used within the variable name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
True(1) if value was successfully assigned; otherwise False(0).
Example
SetSectionVar( 0, “a1”, 100 ) = 100.000
SetSectionVar( 0, “a2”, 150 ) = 150.000
SetSectionVar( 0, “a3”, 200 ) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
Using placeholders
Count = 1
SetSectionVar( 0, “a[Count]”, 100 ) = 100.000
Count = 2
SetSectionVar( 0, “a[Count]”, 150 ) = 150.000
Count = 3
SetSectionVar( 0, “a[Count]”, 200 ) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
SetVar
Assigns a value to a variable and set the attributes of the variables.
Syntax
SetVar( name, value, attributes )
Parameters
name is the name of the variable to assign a value to. Named placeholders can be used within the
variable name, see remarks.
attributes is optional and specifies the attributes of the new variable, see Remarks
Remarks
Each variable has a set of attributes which affect the behaviour of that variable. When assigning attributes they can be
assigned individually e.g. "t", or grouped into a single string, e.g. "thr".
The operators '+' and '-' can also be used to indicate whether an attribute should be added or removed. If no operators
are used then all existing attributes will be replaced, for this reason it is recommended that when using this function you
always use a '+' or '-' operator so that you do not unintentionally remove any attributes. For example if an existing
temporary variable "x" exists then SetVarAttributes( "x", "h" ) will amend the attributes to hidden only, removing the
temporary attribute. To prevent this you should instead use SetVarAttributes( "x", "+h" ) which will add the hidden
attribute and retain the existing temporary attribute.
When assigning a value to a read only variable if the "-r" attribute is specified then modifying the value will be allowed
and the read only attribute will be removed. If the "+r" attribute is also applied the variable will remain read only after
the assignment.
Return Value
The value assigned.
Example
SetVar(“a1”, 100) = 100.000
SetVar(“a2”, 150) = 150.000
SetVar(“a3”, 200) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
Using placeholders
Count = 1
SetVar(“a[Count]”, 100) = 100.000
Count = 2
SetVar(“a[Count]”, 150) = 150.000
Count = 3
SetVar(“a[Count]”, 200) = 200.000
a1 = 100.000
a2 = 150.000
a3 = 200.000
Modifying a read only variable by removing and restoring the read only attribute
SetVarAttributes
Sets the attributes of an existing variable.
Syntax
SetVarAttributes( name, attributes )
Parameters
name is the name of the variable to assign a value to. Named placeholders can be used within the
variable name, see remarks.
Remarks
Each variable has a set of attributes which affect the behaviour of that variable. When assigning attributes they can be
assigned individually e.g. "t", or grouped into a single string, e.g. "thr".
The operators '+' and '-' can also be used to indicate whether an attribute should be added or removed. If no operators
are used then all existing attributes will be replaced, for this reason it is recommended that when using this function you
always use a '+' or '-' operator so that you do not unintentionally remove any attributes. For example if an existing
temporary variable "x" exists then SetVarAttributes( "x", "h" ) will amend the attributes to hidden only, removing the
temporary attribute. To prevent this you should instead use SetVarAttributes( "x", "+h" ) which will add the hidden
attribute and retain the existing temporary attribute.
When assigning a value to a read only variable if the "-r" attribute is specified then modifying the value will be allowed
and the read only attribute will be removed. If the "+r" attribute is also applied the variable will remain read only after
the assignment.
Return Value
True(1) if attributes were successfully assigned; otherwise False(0).
Example
a1 = 100
SetVarAttributes(“a1”, "+t+h") = 100.000; Add hidden and temporary
attributes
a1 = 200
SetVarAttributes(“a1”, "-t") = 100.000; Remove temporary attribute
Using placeholders
Count = 1
SetVarAttributes(“a[Count]”, "+t") = 100.000; Add temporary attribute
to a1
Count = 2
SetVarAttributes(“a[Count]”, "+t") = 100.000; Add temporary attribute
to a2
SetVarIf
Assigns a value and optional attributes to a variable if the specified expression evaluates to True.
Syntax
SetVarIf( condition, name, value, attributes )
Parameters
condition is the expression that must evaluate to either True (1) or False (0)
name is the name of the variable to assign a value to. Named placeholders can be used within the
variable name, see remarks.
attributes is optional and specifies the attributes of the new variable, see Remarks
Remarks
Each variable has a set of attributes which affect the behaviour of that variable. When assigning attributes they can be
assigned individually e.g. "t", or grouped into a single string, e.g. "thr".
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Return Value
True(1) if new value was successfully assigned; otherwise False(0).
Example
SetVar(“a1”, 100) = 100.000
a1 = 100.000
SetVarIf(a1 < 0, “a1”, 0) = 0
a1 = 100.000
SetVarIf(a1 > 10, “a1”, 10) = 1
a1 = 10.000
VarExists
Returns True(1) if all the named variables exist, otherwise returns False(0).
Syntax
VarExists( name1, name[n], …)
Paramaters
name1 is the name of the first variable to check for existence. Named placeholders can be used within the
variable name, see remarks.
Remarks
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a1 = 100
a2 = 150
VarExists(“a1”) = 1.000
VarExists(“a2”) = 1.000
VarExists(“a3”) = 0.000
Using placeholders
Count = 1
VarExists(“a[Count]”) = 1.000
Count = 2
VarExists(“a[Count]”) = 1.000
Count = 3
VarExists(“a[Count]”) = 0.000
VarModified
Returns True(1) if any one of the named variables has been modified (i.e. it's modified attribute is enabled) since the
current calculation process was started, otherwise returns False(0).
Syntax
VarModified(name1, name[n], …)
Paramaters
name1 is the name of the first variable to check if it's modified attribute is enabled. Named placeholders can be
used within the variable name, see remarks.
name[n] is the name of the nth variable to check if it's modified attribute is enabled
Remarks
When you start calculating a document the modified attribute for every variable in that document will be disabled. As
each variable is modified either directly through a calculations user interface or as the result of an assignment in a
calculation the modified attribute on that variable will be enabled. The VarModified function can be used to check
whether a specific variable has or has not been modified. The modified attribute for a specific variable can be disabled at
any time by using the ClearVarModified function. When the document has finished calculating the modified attribute for
every variable in that document will revert back to being disabled.
Placeholders – Placeholders allow you to substitute the value of another variable in the variable name before the
function is processed which is particularly useful when writing iterative calculations. If you had a set of related variables
x1, x2, x3 you might want to use a counter variable to determine which value of x you are currently using. A placeholder
allows you to use the counter variable within the variable name.
If Count = 1, then Function(“x[count]”) is equivalent to Function(“x1”). Therefore the general expression Function(“x[count]”)
can be used for all the cases (x1, x2, x3) by simply changing the value of count.
Example
a = 100
VarModified("a") = 1.000
ClearVarModified( "a" ) = 1.000
VarModified("a") = 1.000
a = 50
VarModified("a") = 1.000
WatchFunction
Enables debug watching for a named function so that every time the function is used a message will be output to the
progress log window.
Syntax
WatchFunction( functionName )
Parameters
functionName is the name of the function to watch.
Remarks
WatchFunction can be used to help diagnose problems when writing calculations because it allows you to see whenever
a specific function is used and what arguments have been passed to the function.
If no arguments are specified the list of functions being watched will be cleared.
Return Value
True(1) if successful otherwise False(0).
Example
a = 1
WatchFunction("SetVar") = ?
SetVar( "a", "Pinned" ) = ?
SetVar( "a", 100 ) = ?
SetVar( "a", 100 mm ) = ?
SetVar( "a", 100 kips ) = ?
SetVar( "a", StrFormat("The value of Pi is [pi,G15]") ) = ?
WatchVar
Enables debug watching for a named variable so that every time the value of the specified variable changes a message
will be output to the progress log window.
Syntax
WatchVar( varName, units, expression )
Parameters
varName is the name of the variable to watch.
units optional units which are used when the value of the variable is reported in the progress log window.
expression optional expression which will be calculated each time the value of the specified variable is changed.
Remarks
WatchVar can be used to help diagnose problems when writing calculations because it allows you to see whenever the
value of a variable is changed. In complex calculations which use iterative processes the value of a specific variable may
change many times and enabling watching of that variable will show messages in the progress log window so that you
can see exactly when the variable is being modified.
Return Value
True(1) if successful otherwise False(0).
Example
a = 1
WatchVar("a") = ?
a = 2
a = 3
a = 2.5m
WatchVar("a", "mm") = ?
a = 2.5m
WatchVar("b") = ?
b = 3m
Version functions
GetTeddsVersion
Returns the installed Tedds version.
Syntax
GetTeddsVersion()
Example
getteddsversion() = 11.000
GetTeddsSPVersion
Returns the installed Tedds service pack version.
Syntax
GetTeddsSPVersion()
Remarks
If no service pack is installed, this function will return 0.
Example
getteddsspversion() = 0.000
GetExcelVersion
Returns the installed Microsoft Excel version.
Syntax
GetExcelVersion()
Remarks
If no version is installed, this function will return 0.
Example
getexcelversion() = 10.000
VersionCompare
Compares two version strings for equality.
Syntax
VersionCompare( version1, version2 )
Parameters
Return Value
-1 if version1 is less than version2
0 if version1 is equal to version2
Remarks
A version string can consist of one or more numeric parts separated by a '.' where each part has less significance than the
previous part. Tedds calculations normally use three part version numbers where the parts represent
"Major.Minor.Revision", for example "1.2.01".
Example
VersionCompare( "2.0.00", "2.1.00" ) = -1.000
VersionCompare( "2.1.00", "2.1.00" ) = 0.000
VersionCompare( "2.2.02", "2.1.00" ) = 1.000
Tedds fields
Calculating
EvalCalcItem
Calculates a Calc Library Item.
Syntax
EvalCalcItem( fileName, itemName, output)
Paramaters
filename is the full path to the Calc Library.
output determines whether to output (Append) or discard (Discard) the calculated item.
Return Value
Returns True (1) if the item was calculated
Remarks
If the itemName is an empty string ("") then nothing will be calculated and no errors will be reported.
Example
EvalCalcItem( "$(SysLbrDir)LibraryName.lbr", "ItemName", Discard ) =
?
EvalScriptCalcItem
Calculates a script Calc Library Item created by the Tedds Calc Designer.
Syntax
EvalScriptCalcItem( fileName, itemName, subModuleName )
Paramaters
filename is the full path to the Calc Library.
Example
EvalMetaFileCalcItem
Calculates a metafile Calc Library Item, the drawing is either output to the document or discarded.
Syntax
EvalMetaFileCalcItem( fileName, itemName, output)
Paramaters
filename is the full path to the Calc Library.
Example
{ =CSC|CALL EvalMetaFileCalcItem("$(SysLbrDir)Misketch.lbr", "Sketch
– Open Plan", Append)}
EvalRTFCalcItem
Calculates a Rich Text Format (RTF) Calc Library Item and either returns the output to the document or discard the
output.
Syntax
EvalRTFCalcItem( fileName, itemName, output, replace)
Parameters
filename is the full path to the Calc Library.
output is the optional value that determines whether to output (Append) or discard (Discard)
the item.
replace is the optional formatted string of replacement text. If the Calc items contains Tedds
replacement fields {=CSC|@}, each field will be replaced with the text in the replace parameter before the item is
calculated.
"@replace1@replace[n]@..."
replace1 is the text that will be replaced in the item for the first occurrence of a Tedds @ field.
replace[n] is the text that will be replaced in the item for the nth occurrence of a Tedds @ field.
EvalInterfaceCalcItem
Calculates a user interface Calc Library Item created by the Tedds Interface Designer
Syntax
EvalInterfaceLibItem( fileName, itemName )
Paramaters
filename is the full path to the Calc Library.
Data tools
DataGraph
Shows a Tedds DataGraph for selecting variables.
Syntax
DataGraph( fileName, prefix, suffix, var1, var2, show, output )
Parameters
fileName is the name of the DataGraph file to open.
suffix is the optional text appended to all variables names for the selection.
show is the optional condition that determines if the DataGraph should be shown. If True(1) the DataGraph is
always shown; otherwise the DataGraph is only shown if the current selection cannot be determined.
output is the optional condition that determines if text is output to the field result, Discard(0),
Append(1).
Output
When the field code has been calculated the field result is updated to show the prefix text and the name of the graph
that was displayed.
Example
{ =CSC|CALL DataGraph( "5950-21a.dgt","Example Datagraph:
","_{1}","","",Show,Append )}
Example Datagraph: BS 5950:Pt 1:1990 .... Table 21 (a) - critical shear strength, qcr,
for grade S275 steel (py = 265 N/mm^2);
a_over_d1 = 0.900
d_over_t1 = 130.000
qcr1 = 113.000 N/mm2;
DataList
Shows a Tedds DataList for selecting variables.
Syntax
DataList( fileName, defaultPage, defaultItem, prefix, suffix, itemVar, pageVar, show, output, prompt )
Parameters
fileName is the name of the DataList file to open.
defaultPage is the optional name of the page to select by default if there is no selected page.
defaultItem is the optional formatted name of the item to select if there is no selected item.
suffix is the optional text appended to all variables names for the selection.
itemVar is the optional name of the variable to use for storing the selected item.
pageVar is the optional name of the variable to use for storing the selected page.
show is the optional condition that determines if the DataList should be shown. If True(1) the DataList is always
shown; otherwise the DataGraph is only shown if the current selection cannot be determined.
output is the optional condition that determines if text is output to the field result, Discard(0),
Append(1).
prompt is the message prompt to display at the top of the DataList window.
Output
When the field code has been calculated the field result is updated to show the prefix text and the name of the item that
was selected.
Example
{ =CSC|CALL DataList("Euro.dls", "Universal Beams", "457(152(52))",
"I Section: ", "1", "selectedItem", "selectedPage", "Show",
"Append", "Select an I section")}
I Section: UB 457x152x52;
selectedPage1 = "Universal Beams"
selectedItem1 = "457(152(52))"
DataTable
Shows a Tedds DataTable for selecting variables.
Syntax
DataTable( filename(s), prefix, suffix, show, output )
Parameters
filename(s) is the name of the DataTable file to open. To open more than one file simultaneously separate each file
name with a comma.
suffix is the optional text appended to all variables names for the selection.
show is the optional condition that determines if the DataGraph should be shown. If True(1) the DataTable is
always shown; otherwise the DataTable is only shown if the current selection cannot be determined. You can use the
pre-defined Tedds system variables "Show" and "Hide" for this parameter.
output is the optional condition that determines if text is output to the field result, Discard(0),
Append(1).
Output
When the field code has been calculated the field result is updated to show the prefix text and the name of the table that
was selected.
Remarks
DataTables allow you to access a wide range of standard engineering data including design tables, section tables and
proprietary manufacturers data. A DataTable allows you to select an item graphically, Tedds will then write the collection
of variables associated with that item to your Tedds document. DataTables may also include diagrams and notes and
allow you to search the data within the table as well as interpolate the data when aplpicable.
Example
{ =CSC|CALL DataTable("5950-21a.tbl", "Example DataTable: ", "1",
"Show", "Append") }
Example DataTable: BS 5950 : Part 1 : 1990 ..... Table 21 (a);
a_over_d1 = 0.900
d_over_t1 = 130.000
Time
Shows the time when the field was last calculated.
Syntax
Time( format )
Parameters
format is the format to output the time and time in (see below)
Remarks
The format of the time can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument =CSC|CALL DATE("dddd, MMMM d, yyyy") displays
"Friday, November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y);
hours (h) minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and
spaces.
Time instructions
Hours (h)
A lowercase "h" bases time on the 12-hour clock. An uppercase "H" bases time on the 24-hour, or military, clock; for
example, 5 P.M. is displayed as "17".
Symbols
h or H
Displays the hour without a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "9".
hh or HH
Displays the hour with a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "09".
Minutes (m)
The letter "m" must be lowercase to distinguish minutes from months.
Displays minutes without a leading 0 (zero) for single-digit minutes. For example =CSC|CALL TIME("m") displays "2".
mm
Displays minutes with a leading 0 (zero) for single-digit minutes. For example, =CSC|CALL TIME("mm")displays "02".
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, =CSC|CALL TIME("HH:mm
'Greenwich mean time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space. For example,
=CSC|CALL TIME("HH:mm MMM-d, yy") displays "11:15 Nov-6, 03".
Date
Shows the date when the field was last calculated.
Syntax
Date( format )
Parameters
format is the format to output the data in (see below)
Remarks
The format of the date can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument =CSC|CALL DATE("dddd, MMMM d, yyyy") displays
"Friday, November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y);
hours (h) minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and
spaces.
Date instructions
Month (M)
The letter "M" must be uppercase to distinguish months from minutes.
Symbols
M
Displays the month as a number without a leading 0 (zero) for single-digit months. For example, July is "7".
MM
Displays the month as a number with a leading 0 (zero) for single-digit months. For example, July is "07".
MMM
MMMM
Day (d)
Displays the day of the month or the day of the week. The letter "d" can be either uppercase or lowercase.
Symbols
d
Displays the day of the week or month as a number without a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "6".
dd
Displays the day of the week or month as a number with a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "06".
ddd
Displays the day of the week or month as a three-letter abbreviation. For example, Tuesday is displayed as "Tue".
dddd
Year (y)
Displays the year as two or four digits. The letter "y" can be either uppercase or lowercase.
Symbols
yy
Displays the year as two digits with a leading 0 (zero) for years 01 through 09. For example, 1995 is displayed as "95", and
2006 is displayed as "06".
yyyy
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, =CSC|CALL TIME("HH:mm
'Greenwich mean time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space. For example,
=CSC|CALL TIME("HH:mm MMM-d, yy") displays "11:15 Nov-6, 03".
DateTime
Shows the date and time when the field was last calculated.
Syntax
DateTime( format )
Parameters
format is the format to output the data and time in (see below)
Remarks
The format of the date or time can be specified using a text string of symbols.
For example, the string "dddd, MMMM d, yyyy" in the argument =CSC|CALL DATE("dddd, MMMM d, yyyy") displays
"Friday, November 24, 2000." Combine the following date and time instructions — day (d), month (M), and year (y);
hours (h) minutes (m) and seconds (s) — to build a date-time format string. You can also include text, punctuation, and
spaces.
Date instructions
Month (M)
The letter "M" must be uppercase to distinguish months from minutes.
Symbols
M
Displays the month as a number without a leading 0 (zero) for single-digit months. For example, July is "7".
MM
Displays the month as a number with a leading 0 (zero) for single-digit months. For example, July is "07".
MMM
MMMM
Day (d)
Displays the day of the month or the day of the week. The letter "d" can be either uppercase or lowercase.
Symbols
d
Displays the day of the week or month as a number without a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "6".
dd
Displays the day of the week or month as a number with a leading 0 (zero) for single-digit days. For example, the sixth
day of the month is displayed as "06".
ddd
Displays the day of the week or month as a three-letter abbreviation. For example, Tuesday is displayed as "Tue".
dddd
Year (y)
Displays the year as two or four digits. The letter "y" can be either uppercase or lowercase.
Symbols
yy
Displays the year as two digits with a leading 0 (zero) for years 01 through 09. For example, 1995 is displayed as "95", and
2006 is displayed as "06".
yyyy
Time instructions
Hours (h)
A lowercase "h" bases time on the 12-hour clock. An uppercase "H" bases time on the 24-hour, or military, clock; for
example, 5 P.M. is displayed as "17".
Symbols
h or H
Displays the hour without a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "9".
hh or HH
Displays the hour with a leading 0 (zero) for single-digit hours. For example, the hour of 9 A.M. is displayed as "09".
Minutes (m)
The letter "m" must be lowercase to distinguish minutes from months.
Displays minutes without a leading 0 (zero) for single-digit minutes. For example =CSC|CALL TIME("m") displays "2".
mm
Displays minutes with a leading 0 (zero) for single-digit minutes. For example, =CSC|CALL TIME("mm")displays "02".
'text'
Any specified text in a date or time. Enclose the text in single quotation marks. For example, =CSC|CALL TIME("HH:mm
'Greenwich mean time' ") displays "12:45 Greenwich mean time".
character
Includes the specified character in a date or time, such as a : (colon), - (hyphen), * (asterisk), or space. For example,
=CSC|CALL TIME("HH:mm MMM-d, yy") displays "11:15 Nov-6, 03".
Drawing
ShowDrawing
Shows a drawing in the document.
Syntax
ShowDrawing( id, maxWidth, maxHeight, alignment )
Parameters
id is the optional drawing identifier returned by the DrawCreateDrawing function. Use 0 for the active
drawing.
maxWidth is the optional maximum output width of the drawing as a percentage of the document page width.
maxHeight is the optional maximum output height of the drawing as a percentage of the document page height.
alignment is the optional vertical alignment about the document page, (0 - Left align, 1 - Centre align, 2 - Right align)
Remarks
Outputs a drawing to the document, if the drawing id is zero or it is not specified the active drawing will be shown. Once
a drawing has been output no further drawing commands can be used on that drawing because the drawing is
automatically destroyed.
If the size and alignment parameters are omitted then the settings are determined by the users Tedds options. By default
the Tedds options output a drawing at a maximum 75% of the page width, 40% of the page height and aligned to the
centre of the page. To change the default settings please refer to the ‘Calculating\Calc Items’ options page on the Tedds
Options dialog.
Example
DrawCreateDrawing( 100mm, 100mm ) = ?
DrawRectangle( 0mm, 0mm, 100mm, 100mm ) = ?
{ =CSC|CALL ShowDrawing() }
ShowDrawings
Shows one or more drawings in the document.
Syntax
ShowDrawings( id1, maxWidth1, maxHeight1, …id[n], maxWidth[n], maxHeight[n] )
Parameters
id[n] is the drawing identifier returned by the DrawCreateDrawing function.
maxWidth[n] is the maximum output width of the drawing as a percentage of the document page width.
maxHeight[n] is the maximum output height of the drawing as a percentage of the document page height.
Remarks
Outputs one or more drawings to the document in a single paragraph. Once a drawing has been output no further
drawing commands can be used on that drawing because the drawing is automatically destroyed.
Example
drawingId1 = DrawCreateDrawing( 100mm, 100mm ) = ?
DrawFillColor( "red" ) = ?
DrawFillRectangle( 0mm, 0mm, 100mm, 100mm ) = ?
Excel
Excel_Link
Exchange data between Tedds and Excel.
Syntax
Excel_Link( fileName, linkSheet, linkFromTedds, linkToTedds, showExcel, save, startMacro, endMacro, taskMacro,
outputCellRef, waitForClose, readPassword, writePassword ).
Parameters
fileName is the string that contains the full path to the Excel workbook file.
linksheet is the optional string that contains the name of the worksheet which includes the tables for
linking variables to and from Tedds
linkFromTedds is the optional True/False value that determines if variables are linked from Tedds to Excel
linkToTedds is the optional True/False value that determines if variables are linked from Excel to Tedds
showExcel is the optional True/False value that determines if the Excel user interface is displayed
save is the optional True/False value that determines if the workbook is saved after the linking
process is finished. If this option is False the workbook is opened in read-only mode.
startMacro is the optional string that contains the name of an Excel macro to run at the start of the linking
process.
endMacro is the optional string that contains the name of an Excel macro to run at the end of the linking
process.
taskMacro is the optional string that contains the name of an Excel macro to run during the linking process.
outputCellRef is the optional string that contains the cell reference to a region in the Excel Workbook that is
output to the field result as a table or chart.
waitForClose is the optional True/False value that determines if the Excel link should wait for the workbook to
be closed by the user before finishing the link process.
readPassword is the optional string that contains the password required to open a protected workbook. If this
argument is omitted and the workbook requires a password, the user is prompted for the password.
writePassword is the optional string that contains the password required to write to a write-reserved workbook.
If this argument is omitted and the workbook requires a password, the user will be prompted for the password.
Remarks
Tedds is an excellent tool for writing calculations however you may have existing spreadsheets that you would like to
continue using. The Tedds Excel Link allows you to link your Tedds calculations with Microsoft Excel spreadsheets by
Page 891 of 903
Tedds 2020 - Function and Field Reference
transferring data from Tedds to Excel and from Excel back to Tedds. This powerful linking allows you to integrate your
spreadsheets with Tedds and benefit from all the features that Tedds provides.
The easiest way to add an Excel link field is to use the Insert Tedds Field command in Tedds for Word.
If the outputCellRef parameter is used to output a table or chart to the document the size of the image is determined by
the Tedds sketch scale setting, refer to SetSketchScale for more information.
Input
Input
Shows an input dialog box to prompt you to enter a value for a variable.
Syntax
Input( prompt, name, units, default, show )
Parameters
prompt is the prompt text displayed in the dialog.
show is the show flag (0=Only if variable not defined, 1=Always with current value, 2=Always with default
value,3=Use system option)
Remarks
The easiest way to add an input field is to use the Insert Tedds Field command available from the Tedds toolbar.
Example
{ =CSC|CALL Input("Length of beam ","L","m","1",1)}
;Length of beam; L = 10.000 m;
Log
LogText
Adds text to the progress log.
Syntax
LogText( text )
Parameters
text is the text message to add to the Progress Log.
Remarks
The easiest way to add a log field is to use the Insert Tedds Field command available from the Tedds toolbar.
Example
L = 4 m
{=CSC|CALL LogText( "The value of L is "+string(L,”f0”,”m”)+” m" )}
Message
Message
Shows a message box
Syntax
Message( message, title, show ).
Parameters
message is the text message to show
show is the optional flag that determines if the message is displayed, Hide(0) or Show(1).
Remarks
The easiest way to add a message field is to use the Insert Tedds Field command from the Tedds toolbar. The message
parameter is also displayed in the Progress Log.
Example
L=4m
Miscellaneous
RunMacro
Runs a Word macro that is available to the current document (i.e. in a template or add-in).
Syntax
Runmacro( macroName )
Parameters
macroName is the name of the Word macro to run.
Remarks
The macro will be run and the calculation process will continue once the macro has completed.
Example
Output
Output
Outputs text in the document.
Syntax
Show( text )
Parameters
text is the text to show in the document as the field result.
Remarks
When using the Output field the text will be formatted using the current paragraph style. To output text in the Tedds
final result style use a Show field.
Example
{=CSC|CALL Output("This will be written out to the document")}
This will be written out to the document;
L = 4 m
{=CSC|CALL Output("The value of L is "+string(L,”f0”,”m”)+” m”)}
The value of L is 4 m
Show
Outputs text in the document.
Syntax
Show( text, show, log, resultsStyle )
Parameters
text is the text to show in the document as the field result.
show is the optional value which determines whether the show result is displayed (Hide(0), Show(1)); the
default is True.
log is the optional value that determines whether the show text is added to the progress log. If True(1) text is
added to progress log; the default is True.
resultsStyle is the optional value that determines whether to show the field result in the current Tedds final results
style True(1), or the current paragraph style False(0) ; the default is True.
Remarks
The easiest way to add a show statement is to use the ‘Insert Tedds Field’ command on the Tedds toolbar. This will help
to build up more complicated examples of show statements.
Example
{=CSC|CALL Show("This will be written out to the document")}
This will be written out to the document;
L = 4 m
{=CSC|CALL Show("The value of L is "+string(L,"f0","m")+" m")}
The value of L is 4 m
{=CSC|CALL Show(StrFormat("The value of L is [L,f0,m]"))}
The value of L is 4 m