0% found this document useful (0 votes)
99 views

Tekla Operators

The document describes various mathematical operators and functions available in Tedds for Word. It provides tables listing the operators like addition, subtraction, multiplication and division. It also lists common mathematical functions like square root, exponential, logarithm, trigonometric functions etc. along with their descriptions and limits. The document mentions that majority of these operators and functions are available in the Library Access System for writing custom calculations.

Uploaded by

Gaurav Mevada
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Tekla Operators

The document describes various mathematical operators and functions available in Tedds for Word. It provides tables listing the operators like addition, subtraction, multiplication and division. It also lists common mathematical functions like square root, exponential, logarithm, trigonometric functions etc. along with their descriptions and limits. The document mentions that majority of these operators and functions are available in the Library Access System for writing custom calculations.

Uploaded by

Gaurav Mevada
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

Operators

The following mathematical operators are available in Tedds for Word.


A majority of the following operators in their symbol form are available in the Library Access System writing your own
custom calculations.las set under Maths Symbols.

Operator Description

+, Addition

-, Subtraction

*, Multiplication

/, Division

Parentheses

yx Raises y to the power x

The maximum and minimum numbers that can be handled by Tedds for Word are 10308 and 10-308 respectively.

Maths Functions
The following mathematical functions are available in Tedds for Word. Their names are not case sensitive.
A majority of the functions are available in the Library Access System writing your own custom
calculations.las set under Maths Functions.

Related topics
General
Trigonometric
General
The maths general functions currently available in Tedds for Word are:
Function Description Limits

Raise x to the power y x>0

sqrt(x) Square root of x x>0

Square root of x x>0

exp(x) Exponential ex -
ln(x) Natural log of x x>0

log(x) Log to the base 10 of x x>0

abs(x) Absolute value of x -

degrees(x,y,z) Converts x y' z'' to x.ddd -

max(x,y,z,) Maximum number in list -

min(x,y,z,) Minimum number in list -

sum(x,y,z,) Summation of numbers in -


list

average(x,y,z,) Average of numbers in list -

median(x,y,z,) Median number in list -

quotient(x,y) Integer portion of x/y -

mod(x,y) Remainder on dividing x by -


y

int(x) Integer part of x -

int(x, unit) Integer of x when expressed -


in terms of unit

round(x,y) rounds x to y decimal -15 < y < 15


places.

round(x,y,unit) rounds x to y decimal places -


when expressed in terms of
unit

rand() Random number between 0 -


and 999
increment(x) Increment x by y, if y not -
increment(x,y) specified increment x by 1A

floor(x,y) Rounds x down to the -


multiple of significance ya

ceiling(x,y) Rounds x up to the multiple -


of significance ya

AThis function works with units

Trigonometric
The maths trigonometric functions currently available in Tedds for Word are:
Function Description Limits

sin(x) Sine (x in degrees) -

cos(x) Cosine (x in degrees) -

tan(x) Tangent (x in degrees) -

cosec(x) Cosecant (x in degrees) -

sec(x) Secant (x in degrees) -

cot(x) Cotangent (x in degrees) -

asin(x) Inverse sine (result in degrees) -1 <= x <=


1

acos(x) Inverse cosine (result in degrees) -1 <= x <= 1

atan(x) Inverse tangent (result in degrees) -

sinh(x) Hyperbolic sine -

cosh(x) Hyperbolic cosine -

tanh(x) Hyperbolic tangent -


asinh(x) Inverse hyperbolic sine -

acosh(x) Inverse hyperbolic cosine x >= 1

atanh(x) Inverse hyperbolic tangent -1 <= x <= 1

All functions that take angle arguments expect them in degrees. All functions that return angle arguments return them in degrees.

Tedds Functions
The following Tedds functions are available in Tedds for Word. Their names are not case sensitive.
A majority of the functions are available in the Library Access System writing your own custom
calculations.las set under Tedds Functions.

Related topics
String
Unit
Logic
Equality
Variable
Calc section
Calc library
Locale
Version
Miscellaneous
String
The string functions currently available in Tedds for Word are:
Function Description

StrLength(String1) returns the number of characters in


the given string. If a string variable is
given as the parameter, then gives
the number of characters in that
variable.

StrCompare(String1, String2, CaseInsensitive) compares two strings to see if they


are equal. The compare can be case
sensitive or case insensitive. If the
strings are equal the function
returns 0. If string1 is less than
String2 the function returns -1, if
String1 is greater than String2
returns 1

StrEndsWith(String1, String2) checks to see if String1 ends with


String2, returning 1 if it does and 0 if
it does not.
The comparison is always case
sensitive and the function
recognises spaces.

StrInsert(String1, inserts String2 into String1 at the


String2, InsertPosition) position specified by InsertPosition.

StrFirstIndexOf finds the first instance of String2


("String1", "String2", SearchStartPosition, within String1 after
SearchRangeLength) SearchStartPosition and returns the
position of the first character. If
String2 is not found within
SearchRangeLength characters then
the function returns -1.
SearchStartPosition (the number of
characters from the start of String1
at which the search will start) and
SearchRangeLength are optional.

StrLastIndexOf("String1", "String2", finds the first instance of String2


SearchStartPosition, SearchRangeLength) within String1 after
SearchStartPosition and returns the
position of the first character. If
String2 is not found within
SearchRangeLength characters then
the function returns -1.
SearchStartPosition (the number of
characters from the start of String1
at which the search will start) and
SearchRangeLength are optional.
StrPadLeft("String1", ReturnStringLength, pads the left hand side of String 1
"String2") with sufficient characters to make it
the length specified by
ReturnStringLength.
String2 is optional. If it is not
specified, then String1 will be
padded with spaces, otherwise it will
be padded by the characters in
String2.

StrPadRight("String1", ReturnStringLength, pads the right hand side of String 1


"String2") with sufficient characters to make it
the length specified by
ReturnStringLength.
String2 is optional. If it is not
specified, then String1 will be
padded with spaces, otherwise it will
be padded by the characters in
String2.

StrRemove("String1", DeleteStartPosition, removes NumberOfCharsToDelete


NumberOfCharsToDelete) characters from String1 starting at
DeleteStartPosition

StrReplace("String1", "Remove", "Replace") scans String1 and replaces all


instances of the Remove string with
the Replace string.
If the Replace string is the empty
string , then this will remove all
instances of the Remove string
completely.

StrStartsWith(String1, String2) checks to see if String1 starts with


String2, returning 1 if it does and 0 if
it does not.
The comparison is always case
sensitive and the function
recognises spaces.
StrSubstring("String1", SubstringStart, obtains a string from the middle of
SubstringLength) String1, starting at SubstringStart,
and SubstringLength characters
long.
If you dont specify SubstringLength,
then the returned string will be the
remainder of String1 from
SubstringStart.

StrToLower(String1) converts String1 to lower case


characters.

StrToUpper(String1) converts String1 to upper case


characters.

StrTrim("String1", "UnwantedCharacters") removes UnwantedCharacters from


the start and end of String1.
UnwantedCharacters is optional. If
not specified, then removes spaces
from the start and end of String1.

StrTrimStart("String1", "UnwantedCharacters") removes UnwantedCharacters from


the start of String1.
UnwantedCharacters is optional. If
not specified, then removes spaces
from the start of String1.

StrTrimEnd("String1", "UnwantedCharacters") removes UnwantedCharacters from


the end of String1.
UnwantedCharacters is optional. If
not specified, then removes spaces
from the end of String1.

StrStart("String1", SubstringLength) obtains a string SubstringLength


characters long from the start of
String1.

StrEnd("String1", SubstringLength) obtains a string SubstringLength


characters long from the end of
String1.
StrFormat("String1", Value1, Value2, ) Creates complex strings that contain
values.
Placeholders represent the position
of the values in the string, and can
specify formatting information for
the value.

String (VariableName or formula, "format", converts a number variable (or a


"unit") formula yielding a number) into a
string, and controls the formatting
of the string value.
The format parameter is optional, if
omitted the default format is
adopted.
The unit is optional, if not used and
the value has dimensions, base
system units will be used.

Str (VariableName or formula) converts an integer number variable


(or a formula yielding an integer
number) into a string.

EvalString("String1") evaluates the string as though it


were an expression.

Unit
The unit functions currently available in Tedds for Word are:
Function Description

addunit(x,a,b,c,d,f)A Adds unit x to the unit database,


a, b, c and d are the powers of the unit dimensions (Ma, Lb,
Tc, Dd) and f is the multiplication factor to turn the base unit
combination to the unit to be added - for example
(MN,1,1,-2,0,106)

getunit(x) Lists the dimensions and factor for units x

listallunits() Lists all units in the units database.

removeunit(x)a Removes unit x from the units database.

showdims(x) Shows the dimensions of variable x


AIn order to use this function, the units file must not be in use by any other user.

Logic
The logic functions currently available in Tedds for Word are:
Function Description

If(condition,x,y) Conditional - if condition is true returns x, if not returns y

if(and(a<b,c>d),x,y), If both conditions true then returns x, if not then returns y


if((a<b)&&&&(c>d),x,y)

if(or(a<b,c>d),x,y), If either condition true then returns x, if not then returns y


if((a<b)||(c>d),x,y)

ifelseif(a>b, v, c<d, w, If a>b, then returns v, if not then checks if c<d, then returns w.
a==0, x, d<>a, y, z) Continues in this way, and if no conditions matched then
returns z

Not(a>b) If the condition is met (a>b), then returns 0, otherwise return 1

Select(variable Returns the value of a variable based on the value of another


name,variable value variable,
1,return value1,
day = Sun
variablevalue 2, return
value2,variable value Select(day,"Mon",2,"Tue",3,"Wed",4,"Thur",5,"Fri",6,"Sat",7,1)
3, returnvalue3, =1
variable value 4,return 1 is returned because select does not match any of the values.
value4, return value 5) If day were Wed, then 4 would be returned

When you are using logic functions, then the following conditions are recognised.

Conditions Description

x > y, x > y Greater than. Returns 1 if true, 0 if false

x >= y, x y Greater than or equal to. Returns 1 if true, 0 if false

x == y, x == y Equal to. Returns 1 if true, 0 if false


x <> y, x y, x != y Not equal to. Returns 1 if true, 0 if false

x <= y, x y Less than or equal to. Returns 1 if true, 0 if false

x < y, x < y Less than. Returns 1 if true, 0 if false

You can also use equality functions in logic functions.

Equality
The equality functions currently available in Tedds for Word are:

Function Description

_eq(x,y,Tolerance)A checks that x and y are equal within the specified


Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
and y must be equal to the full accuracy of Tedds
calculations.

equal(x,y,Tolerance)(a) checks that x and y are equal within the specified


Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
and y must be equal to the full accuracy of Tedds
calculations.

_lt(x,y,Tolerance)(a) checks that x is less than y to the specified


Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be less than y to the full accuracy of Tedds
calculations.

lessthan(x,y,Tolerance)(a) checks that x is less than y to the specified


Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be less than y to the full accuracy of Tedds
calculations.
_gt(x,y,Tolerance)(a) checks that x is greater than y within the
specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be greater than y to the full accuracy of
Tedds calculations.

greaterthan(x,y, Tolerance)(a) checks that x is greater than y within the


specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be greater than y to the full accuracy of
Tedds calculations.

_le(x,y,Tolerance)(a) checks that x is less than or equal to y within the


specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be less than or equal to y to the full
accuracy of Tedds calculations.

lessorequal(x,y, Tolerance)(a) checks that x is less than or equal to y within the


specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be less than or equal to y to the full
accuracy of Tedds calculations.

_ge(x,y,Tolerance)(a) checks that x is greater than or equal to y within


the specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be greater than or equal to y to the full
accuracy of Tedds calculations.

greaterorequal(x,y, Tolerance)(a) checks that x is greater than or equal to y within


the specified Tolerance. Returns 1 so, 0 if not.
Tolerance is optional. If it is not specified, then x
must be greater than or equal to y to the full
accuracy of Tedds calculations.

Athis function accepts units

Variable
The variable functions currently available in Tedds for Word are:

Function Description
Delete VarsInSection(x,y,z) deletes the variables x, y
and z in the current
calculation section. If no
variables are specified,
then deletes all the
variables in the current
section.

Delete VarsInAllSections((x,y,z)) deletes the variables x, y


and z in the current
document. If no variables
are specified, then
deletes all the variables in
the document.

Delete VarsInSectionExcept(x,y,z) deletes the all the


variables other than x, y
and z in the current
calculation section. The
variables which are not to
be deleted must be
specified, otherwise this
function will generate an
error.

GetVar("VariableName", defaultValue) gets the value of a


variable, if that variable
does not exist, then sets
the variable to the default
value. The defaultValue
parameter is optional, but
the function will generate
an error if the variable is
not found.

SetVar("VariableName", Value) sets the value of the


variable to this value

GetSectionVar(SectionId, "VariableName", defaultValue) gets the value of a


variable from the section
with ID SectionId, if that
variable does not exist,
then sets the variable to
the default value. The
defaultValue parameter is
optional, but the function
will generate an error if
the variable is not found.

SetSectionVar(SectionId, "VariableName", Value) sets the value of the


variable in the section
with ID SectionId to this
value

GetDocumentVar (SectionId, "VariableName", defaultValue) gets the value of the


document variable, if that
variable does not exist,
then sets the variable to
the default value. The
defaultValue parameter is
optional, but the function
will generate an error if
the variable is not found.

SetDocumentVar (SectionId, "VariableName", Value) sets the value of the


document variable to this
value

PromoteVariable(var1, var2,) promotes the variables


var1, var2, and such
like in the current section
making them document
variables.

VarExists("VariableName") checks to see if a variable


exists, if it does, then
returns the value 1, if it
doesnt, then returns the
value 0

Calc section
The calc section functions currently available in Tedds for Word are:
Function Description
GetSectionId() returns the identification
number for the
calculation section
containing the insertion
point. If the insertion
point is not in a
calculation section, then
GetSectionId returns a
value of 0.

GetSectionName() returns the name of the


calculation section
containing the insertion
point. If the insertion
point is not in a
calculation section, then
GetSectionName returns
.

GetSectionVar(SectionId, "VariableName", defaultValue) gets the value of a


variable from the section
with ID SectionId, if that
variable does not exist,
then sets the variable to
the default value.
defaultValue is optional,
but the function will
generate an error if the
variable is not found.

SetSectionVar(SectionId, "VariableName", Value) sets the value of the


variable in the section
with ID SectionId to this
value

GetDocumentVar (SectionId, "VariableName", defaultValue) gets the value of the


document variable, if that
variable does not exist,
then sets the variable to
the default value.
defaultValue is optional,
but the function will
generate an error if the
variable is not found.
SetDocumentVar (SectionId, "VariableName", Value) sets the value of the
document variable to this
value

Calc library
The calc library functions currently available in Tedds for Word are:

Function Description

CalcItemExists (fileNameA, checks to see if the item named itemName


itemNameB) exists in the Library named fileName.
Returns 1 if it does, 0 if it does not.

GetCalcItemLongName (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, returns its Long name.
If it does not, returns the empty string .

GetCalcItemDescription (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, returns its Description.
If it does not, returns the empty string .

GetCalcItemVersion (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, returns its Version
information. If it does not, returns the empty
string .

GetCalcItemAuthor (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, returns its Author
information. If it does not, returns the empty
string .

GetCalcItemStatus (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, returns its Status
information. If it does not, returns the empty
string .

GetCalcItemText (fileName(a), if the Item named itemName exists in the


itemName(b)) library named fileName, and it is a text item
returns its contents. If it does not exist, or is
not a text item, returns the empty string .
GetCalcItemProperties (fileName(a), if the Item named itemName exists in the
itemName(b), longName, library named fileName, returns all its
description, version, status, properties into the variables named
author) longName, description, version, status,
author (these must be enclosed in quotes as
shown here). If it does not, returns empty
strings .

SetCalcItemLongName (fileName(a), if the Item named itemName exists in the


itemName(b), Value) library named fileName, sets its Long name to
Value.

SetCalcItemDescription (fileName(a), if the Item named itemName exists in the


itemName(b), Value) library named fileName, sets its Description to
Value.

SetCalcItemVersion (fileName(a), if the Item named itemName exists in the


itemName(b), Value) library named fileName, sets its Version to
Value.

SetCalcItemAuthor (fileName(a), if the Item named itemName exists in the


itemName, Value) library named fileName, sets its Author to
Value.

SetCalcItemStatus (fileName(a), if the Item named itemName exists in the


itemName(b), Value) library named fileName, sets its Status to
Value.

SetCalcItemProperties (fileName(a), if the Item named itemName exists in the


itemName(b), newLongName, library named fileName, sets its Long name to
newDescription, newVersion, newLongName, its Description to
newStatus, newAuthor) newDescription, its Version to newVersion,
its Status to newStatus and its Author to
newAuthor.

Ayou can use the Tedds Select Calc Library field to select the calc library from a dialog and save its
name as a variable.
Byou can use the Tedds Select Calc Item field to select the calc item from a dialog and save its name as

a variable.

Locale
The locale functions currently available in Tedds for Word are:
Function Description
GetLocale() returns the current locale to which Tedds
is set.

GetCountry() returns the current country to which


Tedds is set.

Version
The version functions currently available in Tedds for Word are:

Function Description

GetTeddsVersion() returns Tedds for Words version number

GetTeddsSPVersion() returns Tedds for Words service pack


version number

GetExcelVersion() returns Microsoft Excels version


number

Miscellaneous
The miscellaneous functions currently available in Tedds for Word are:

Function Description

subcall("original runs any Tedds for Word function in an


function interface. You would typically use this
name","parameter 1 function to run a Data List or Data Table
of the original from a button in an interface.
function","parameter
2 of the original
function" )

GetLanguage() Returns the user interface language


identifier as a two character string code
("EN" = English, "FR" = French, "DE" =
German, "ES" = Spanish).
GetTeddsAppName() Returns the name of the Tedds
application calculating the current
document.

GetTimer() Returns the numeric value of the timer

Pause( time ) time is the time to pause in


milliseconds.
Example
Pause( 5000 ) = 1.000; Pause for 5
seconds

ProgressText( text ) Sets the status text displayed in the


Tedds 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.

Returns a value as a hexadecimal


ToHex( value ) formatted string.
Example
ToHex( 1 ) = "0x1"
ToHex( "a" ) = "0x61"

Tedds Fields Summary


The following Tedds Fields are available in Tedds for Word. Their names are not case sensitive.
A majority of the fields are available in the Library Access System writing your own custom
calculations.las set under Tedds Fields.
Input Fields
The input fields currently available in Tedds for Word are:
Function Description

Input(prompt, Displays a dialog prompting for the


variableName, units, details of a particular variable.
defaultValue,
You can control when the dialog is
controlFlag)
displayed.

Show Fields
The show fields currently available in Tedds for Word are:
Function Description

Show(condition,true Returns text to your document


text, false text, depending whether the condition is true
output flag, format or false.
flag)
You can control whether the text is
always output, or only output when a
specific condition is met using the control
flag.
You can control whether the text uses
the same format as the rest of the
paragraph text, or the format that you
have specified for results using the
format flag.

Message Fields
The message fields currently available in Tedds for Word are:
Function Description

Message(if(condition, Shows a message box containing


true text, false text), different text depending whether the
message title, condition is true or false.
[control flag])
You can control whether the message
box is always displayed, or only displayed
when a specific condition is met using
the control flag.

Log Fields
The log fields currently available in Tedds for Word are:

Function Description
LogText(if(condition, Shows text in the progress log depending
true text, false text)) whether the condition is true or false.

Excel Fields
The Excel fields currently available in Tedds for Word are:

Function Description

Excel_Link(Excel Allows you to link information between


workbook, Link Tedds and Excel.
worksheet, Variables
You can specify the Excel workbook to
to Excel, Variables
use, the worksheet used to link variables
from Excel, Show
between Tedds and Excel, whether Excel
Excel, Save
is to appear on your desktop during
workbook, Start
linking (and if so whether linking is to
Macro, End Macro,
pause until you close the Excel
Middle Macro,
workbook).
output details, Wait
for Excel to Close) You can also control whether you want
to transfer variables to and from Excel,
macros you want to run during the
linking process, and whether you want to
return a chart or a picture of a range of
cells from Excel to Tedds for Word.

Data List Fields


The data list fields currently available in Tedds for Word are:
Function Description

DataList(list name, Shows a data list open at a particular


page, ref, prefix, page and with a particular selection. You
suffix, selection, page can specify a prefix and suffix to be used
selection, show, for the tab.e and can also specify the
output) names of variables used to store the
selection and page selection made by the
user.
You can choose whether to show the
data list, or simply to return the variables
to your calculation. You can also control
whether or not any output appears in
your calculation.

Data Table Fields


The data table fields currently available in Tedds for Word are:

Function Description

DataTable(tables, Shows one or more data tables. You can


prefix, suffix, show, specify a specific prefix and suffix for the
output) variables returned by the data table.
You can choose whether to show the
data table, or simply to return the
variables to your calculation. You can
also control whether or not any output
from the data table appears in your
calculation.

Data Graph Fields


The data graph fields currently available in Tedds for Word are:
Function Description

DataGraph(graph, Shows a data graph. You can specify a


prefix, suffix, variable specific prefix and suffix for the variables
1, variable 2, show, returned from the data graph.
output)
You can also specify the variables which
control the graph and choose whether or
not the data graph is shown, or simply
that its variables are returned to your
calculation. You can also control whether
or not any output from the data graph
appears in your calculation.

Select Calc Library Fields


The select calc library fields currently available in Tedds for Word are:

Function Description

SelectCalcLibrary(varName, Shows a dialog which allows you to


open, title) select a library file.
You can choose whether to only
allow selection of existing libraries,
or to allow creation of new ones.
You can optionally choose to
specify a specific title for the dialog.
Select Calc Item Fields
The select calc item fields currently available in Tedds for Word are:

Function Description

SelectCalcItem(fileName, Shows a dialog which allows you to


varName, open, title) select a library item.
You can choose whether to only allow
selection of existing items, or to allow
creation of new ones.
You can optionally choose to specify a
specific title for the dialog.

Save Section Variables to Calc Item Fields


The save section variables to calc item fields currently available in Tedds for Word are:
Function Description

SaveSectionVarsCalcItem Allows you to save the variables for


(fileName, itemName, the current calculation section into a
options, Var1, Var2,) library file as a calculation item.
Options allow you to save the units,
temporary and hidden variables in
any combination.
You can either save all the variables,
or give a list of the variable names to
be saved.

Save Section Variables to Text File Fields


The save section variables to text file fields currently available in Tedds for Word are:

Function Description

SaveSectionVarsTextFile(fileName, Allows you to save the


options, Var1, Var2,) variables for the current
calculation section into a
text file.
Options allow you to save
the units, temporary and
hidden variables in any
combination.
You can either save all the
variables, or give a list of the
variable names to be saved.
Evaluate File Fields
The evaluate file fields currently available in Tedds for Word are:

Function Description

Evaluate Allows you to evaluate a text file, adding


File(fileName) the calculated variables into your current
calculation section.
The text file must use expression text
format, and the calculations must either
be on separate lines, or separated by the
delimiter.

Library fields
The library fields currently available in Tedds for Word are:

Function Description

EvalLibItem(library, item, Calculates a particular library item.


output) You can specify whether or not the
item is to be returned to your
document.

EvalScriptLibItem(library, Calculates a particular library script


item, input statement item (for example a Calc Designer
control) file). You can specify whether
input statements in the item are to
be shown or skipped, so that you
dont get asked for input details
twice.

EvalMetaFileLibItem(library, Calculates a particular library


item, output) metafile item. You can specify
whether or not the item is to be
returned to your document.

EvalRtfLibItem(library, item, Calculates a particular library rtf


output) item. You can specify whether or
not the item is to be returned to
your document.

EvalInterfaceLibItem(library, Calculates a particular library


item) interface item. You can specify
whether or not the item is to be
returned to your document.
Time and date fields
The date and time fields currently available in Tedds for Word are:

Function Description

Time(Time shows the system time when the


format string) function was processed. The format
string is optional. See the formatting
details below for further information.

Date(Date shows the system date when the


format string) function was processed. The format
string is optional. See the formatting
details below for further information.

DateTime(Date shows the system date when the


and time format function was processed. The format
string) string is optional.

Date formatting options


You can show the date in virtually any format which you require. The various options are shown in the table below. For simplicity the results are shown
for 09:05:07 on Thursday 5 June 2013.

Period of Code Result Comment


time

Day d or D 5

dd or DD 05

ddd or DDD ThuA

dddd or ThursdayB
DDDD

Month M 6 You must use a


capital M to
differentiate months
MM 06
from minutes

MMM Jun
MMMM June

Year yy or YY 03 y, Y, yyy and YYY are


not valid formats
yyyy or 2013
YYYY

AShows the abbreviated day of the week. You can use 2 format strings to
show the day and the date. For example ddd d would show Thu
5
BShows the full day of the week. You can use 2 format strings to show the

day and the date. For example dddd d would show Thursday 5

Period of Code Result Comment


time

Hour h 9 based on 12 hour clock

H 9 based on 24 hour clock

hh 09 based on 12 hour clock

HH 09 based on 24 hour clock

Minute m 5 You must use a lower case m to


differentiate minutes from months
mm 05

Second s or S 7 y, Y, yyy and YYY are not valid


formats
ss or SS 07

text Specify text in single quotation marks to include it in the


appropriate format.
Example:
Time("hh' Greenwich mean time' ") displays "09 Greenwich
mean time".
character Includes the specified character in the date or time.
Example:
Time("HH:mm MMM-d, yyyy") displays "11:15 Nov-6, 2013".

Miscellaneous
The miscellaneous fields currently available in Tedds for Word are:

Function Description

runmacro("macro runs any macro which is available to the


name") current document either because it is in
the template, or in an add-in.

You might also like