0% found this document useful (0 votes)
119 views12 pages

XCM Quick Reference Cards

This document provides a quick reference to standard functions, commands, and syntax for the XPAC 2006 programming language. It includes summaries of functions for math, conversions, testing data types, variables and constants, arrays, control structures, strings, functions and subroutines, OLE commands, Windows functions, and dialog boxes. The document is intended as a handy reference for programmers using the XPAC 2006 language.

Uploaded by

Agustinus Yosef
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
119 views12 pages

XCM Quick Reference Cards

This document provides a quick reference to standard functions, commands, and syntax for the XPAC 2006 programming language. It includes summaries of functions for math, conversions, testing data types, variables and constants, arrays, control structures, strings, functions and subroutines, OLE commands, Windows functions, and dialog boxes. The document is intended as a handy reference for programmers using the XPAC 2006 language.

Uploaded by

Agustinus Yosef
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

XPAC 2006

2006 XCM QUICK REFERENCE - STANDARD

Maths Functions
Abs(Number) – Absolute Value of Number
Atn(Number) – Returns the arc tangent in radians of a number
Cos(Angle in Radians) – Returns the cosine of an angle which is in radians
Exp(Number) – Returns the base of the natural log raised to a power (e^num)
Fix(Number) – Returns the integer portion of a number
Int(Number) – Returns the integer portion of a number
Log(Number) – Returns the natural log of a number greater than zero
Rnd() – Returns a random number between zero and one
Sin(Angle in Radians) – Returns the sine of an angle which is in radians
Sgn(Number) – Returns 1 for a positive number, 0 for zero and –1 for a negative number
Sqr(Number) – Returns the square root of a number
Tan(Angle in Radians) – Returns the tangent of an angle which is in radians

Converting Variable Types


CBool(Expression) – Converts any valid expression to a boolean
CDate(Expression) – Converts any valid expression to a date variable
CDbl(Expression) – Converts any valid expression to a double
CInt(Expression) – Converts any valid expression to an integer
CLng(Expression) – Converts any valid expression to a long
CSng(Expression) – Converts any valid expression to a single
CStr(Expression) – Converts any valid expression to a string
CVar(Expression) – Converts any valid expression to a variant
Hex(Number) – Returns the hexadecimal value of the decimal number
Oct(Number) – Returns the octal value of the decimal number

Testing Variant Types


IsArray(Variable Name) – Returns true or false indicating whether the variable is an array
IsDate(Variant) – Returns true or false indicating whether a variant can be converted to a date
IsEmpty(Variant) – Returns true or false indicating whether a variant has been initialised
IsNull(Variant) – Returns true or false indicating whether the variant contains the Null value (ie. no data)
IsNumeric(Variant) – Returns true or false indicating whether the variant can be converted to a numeric data type
IsObject(Object Name) – Returns true or false indicating whether the object name is an object

Variables and Constants


Const Name=Expression – Assigns a symbolic name to a constant expression
Dim VariableName [As Type] – Declares the data type of variables and arrays (type may be integer, long, single, double and string)
Format(Expression) – Formats a string, number or variant data type to a format expression
Global Const Constant – Defines a constant as global, which means it is available to all functions and subroutines in your program
Let VariableName=Expression – An optional word, that is rarely used now, to assign a value to a variable
Option Explicit – Forces declaration of all variables (used outside the script)
Set Object = [New ObjectExpression | Nothing] – Assigns an object to an object variable
Static Variable – Used to declare variables, such that they will retain their value through the program run
Type TypeName…..ElementName As Type…..End Type – Defines a user-defined data type containing one or more elements
VarType(VariantName) – Returns a number indicating how the variant is stored internally, eg. 3 is long, 7 is date, etc

Arrays
Erase Array Name – Re-initialises the elements of a fixed array
LBound(Array[, Dimension]) – Returns the smallest available subscript for the dimension of the array
Option Base Number – Declares the default lower bound for array subscripts (default is 0, only other option is 1)
ReDim ArrayName(Number of Subscripts) – Used to re-size an array that has already been declared using Dim with empty parenthesis
UBound(Array[, Dimension]) – Returns the largest available subscript for the dimension of the array

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -1-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - STANDARD

Control Structures
Do While condition…..[Exit Do]…..Loop – Repeats a group of statements while the condition is true
Do Until condition…..[Exit Do]…..Loop – Repeats a group of statements until a condition is true
Do…..[Exit Do]…..Loop While condition – Repeats a group of statements while the condition is true
Do…..[Exit Do]…..Loop Until condition – Repeats a group of statements until a condition is true
End Function|If|Sub – Ends a program or a block of statements such as a function, subroutine or if test
Exit Do|For|Function|Sub – Exits a loop or procedure
For Each Element In Group…..[Exit For]…..Next Element – Repeats a group of statements for each element in an array of a collection
For Counter = Expression1 to Expression2 [Step Increment]…..[Exit For]…..Next Counter – Repeats the execution of a block of statements a
specified number of times
GoTo Label – Branches unconditionally and without return to a specified label in a procedure
If Condition Then….. – Allows conditional statements to be executed in the code
If Condition Then…..Else…..End If – Allows conditional statements to be executed in the code
If Condition Then…..ElseIf Condition Then…..End If – Allows conditional statements to be executed in the code
Select Case TestVariable…..Case Value1…..Case Value2…..Case Else…..End Select – Executes one of the Case statement blocks based on
the value of the test variable
Stop – Ends execution of the program
While Condition…..Statements…..Wend – Executes the statements while the condition is true
With Object…..Statements…..End With – Allows you to perform a series of commands on a particular object, without again referring to the
name of that object

Strings
Asc(String) – Returns ASCII code for the first character in the string
Chr(ASCII Number) – Returns the one character string for the ASCII number
InStr(Number Begin, String 1, String 2) – Returns the character position of the first occurrence of String 2 within String 1
LCase(String) – Returns a string in which all letters of the string have been converted to lower case
Left(String, Number) – Returns the left most number of characters from a string
Len(String) – Returns the number of characters in a string
LTrim(String) – Returns the string with the leading spaces removed
Mid(String, Begin, Length) – Returns a sub-string within the string, which starts at character number Begin and is Length characters long
Right(String, Number) – Returns the right most number of characters from a string
RTrim(String) – Returns the string with the trailing spaces removed
Str(Expression) – Converts any valid expression to a string
StrComp(String1,String2) – Returns zero if the strings are the same and plus or minus one if the strings are different (depending on the
characters in the strings)
String(Number, Character String or Code) – Returns a string made up of a single character repeated a number of times
Trim(String) – Returns the string with the leading and trailing spaces removed
UCase(String) – Returns a string in which all letters of the string have been converted to upper case
Val(String) – Returns the numeric value of a string of numeric characters

Functions and Subroutines


Call Name[(arguments)] – Activates a function or subroutine called Name
Declare SubOrFunction ProcedureName Lib LibName$ [Alias AliasName$] – Makes reference to an external procedure in a Dynamic Link
Library (DLL)
End Function|If|Sub – Ends a program or a block of statements such as a function, subroutine or if test
Exit Do|For|Function|Sub – Exits a loop or procedure
Function FunctionName[(Arguments)] [As Type]…..End Function – Defines a procedure that can receive arguments and return a value of a
specified data type
Sub SubroutineName[(Arguments)] [As Type]…..End Sub – Defines a subroutine that can receive arguments and does not return a value

OLE Commands
AppActivate “Text in Title Bar of Application Window” – Activates an Application
CreateObject(class) – Creates an OLE automation object
GetObject(Filename[, Class]) – Get an object from a file

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -2-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - STANDARD

Windows
Beep – Sounds a tone through the computer’s speakers
InputBox(Prompt[, Title] [, Default] [, x Position, y Position]) – Displays an input box (in position xy) containing the prompt, with the default value
for the string that is returned
MsgBox(Message[, Type] [, Title]) – Displays a message in a dialog box and waits for the user to select a button defined by Type
Print [Expression1, Expression2,……] – Prints a string to the compiler messages window
SendKeys(Keys[, Wait]) – Sends one or more keystrokes to the active window as if they had been entered at the keyboard

Dialog Boxes
CheckBox Starting x Position, Starting y Position, Width, Height - Used in a Dialog Box for selecting one or more in a series of choices
Dialog(Dialog Record) – Used to display the dialog box specified by Dialog Record which is the name of the dialog and must be defined in a
preceding Dim statement
DlgEnable “Control Name”, Value – This statement is used to enable (Value=1) or disable (Value=0) a particular control on a dialog box
DlgText “Control Name”, Text String – This statement is used to set or change the text of a dialog control
DlgVisible “Control Name”, Value – This statement is used to hide (Value=0) or make visible (Value=1) a particular control on a dialog box
OKButton Starting x Position, Starting y Position, Width, Height – Used in dialog boxes to add an OK Button for selecting options and closing
the dialog box
Text Starting x Position, Starting y Position, Width, Height, Label - Used in dialog boxes to create a text field for titles and labels
TextBox Starting x Position, Starting y Position, Width, Height, Default String - Used in dialog boxes to create a text box for typing in numbers
and text

File Input and Output


Close[#File Number] – Closes the file number specified (if no file number is specified, then all files are closed)
Dir[(Path, Attributes)] – Returns a file/directory name that matches the specified path and attributes
EOF(File Number) – Returns a value during file input that indicates whether the end of a file has been reached
FileCopy(Source File, Destination File) – Copies a file from a source to a destination
FileLen(File Name) – Returns the length of the file in bytes
FreeFile – Returns an integer that is the next available file handle to be used by the Open Statement
Input(Bytes to Read, #Filenumber) – The number of bytes to read from the file number used in the open statement
Kill FileName – Delete the file called file name
Line Input #FileNumber, Variable Name – Reads sequential lines from a file, indicated by the file number, into a string variable or variant
LOF(FileNumber) – Returns the number of bytes in the open file indicated by the file number
Name OldName As NewName – Changes the name of a directory or file
Open FileName [For Mode] [Access Operation] As #FileNumber – Opens a file for input and output operations
Print #FileNumber, [[Spc(n)|Tab(n)] [Expression] [;|,]] – Writes spaces, tabs or an expression sequentially to the specified file.
Seek(File Number) – Returns the byte position in the specified file where the next operation is to take place
Seek FileNumber, Position – Sets the position in the specified file, relative to the beginning of the file, where the next read or write is to occur
Space(Number) – Skips the specified number of spaces in a Print # statement
Write #FileNumber[, ExpressionList] – Writes and formats data to a sequential file that must be opened in output or append mode

Directories
ChDir Pathname – Changes the default directory
ChDrive Drivename – Changes the drive
CurDir(Drive) – Returns the current path for the specified drive
MkDir Path – Creates a directory with the given path (maximum characters is 128)
Name OldName As NewName – Changes the name of a directory or file
RmDir PathName – Removes an existing directory with the path name

Miscellaneous
Choose(Number, Choice1[, Choice2] [, Choice3] [,…]) – Returns the choice corresponding to the number
On Error [GoTo Label|Resume Next|GoTo 0] – Defines how to handle an error
Rem Remark – Used to include explanatory remarks in a program
Shell(ProgramName[, Style]) – Runs an executable program in a window defined by the style

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -3-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE
REFERENCE - STANDARD

Date and Time


CDate(Expression) – Converts any valid expression to a date variable
Date – Returns the current system date
DateSerial(Year, Month, Day) – Returns a string containing the date corresponding to the year, month and day specified
DateValue(Date/Time Expression) – Returns the elapsed time in days, between 30 December 1899 and the date/time expression
Day(Date Expression) – Returns the day component of the date expression (a string or any expression that can represent a date)
Hour(Time Expression) – Returns the hour of the day indicated in the time expression
Minute(Time Expression) – Returns the minutes in the hour indicated in the time expression
Month(Date Expression) – Returns the month component of the date expression (a string or any expression that can represent a date)
Now – Returns a date that represents the current date and time according to the computer’s settings
Second(Time Expression) – Returns the seconds of the minute indicated in the time expression
Time() – Returns the current system time
Timer – Returns the number of seconds from midnight and is used to track elapsed time
TimeSerial(Hour, Minute, Second) – Returns a string containing the time corresponding to the hour, minute and second specified
TimeValue(Date/Time Expression) – Returns the elapsed time in days, between midnight and the time component of the expression
Weekday(Date[, First Day of Week]) – Returns an integer containing the whole number for the weekday represented by the date string
Year(Date Expression) – Returns the year component of the date expression (a string or any expression that can represent a date)

You can also use scripts to define a range constraint in the ranges dialog box. Press the Edit button, in the constraint view, and select a
filename in the Script field of the dialog box.The file specified must contain the following function: (This is the simplest example):
Function RANGE_CONSTRAINT As Integer\n"
RANGE_CONSTRAINT = (Value)
End Function

XPAC 2006
2006 XCM QUICK REFERENCE - SCHEDULING

Get Schedule Information


GetActiveScenarioName() – Returns the name of the currently active scenario
GetActivityCount() – Returns the number of productive activities
GetActivityName([Activity Number]) – Returns the name of the specified activity
GetActivityNum([Activity Name]) – Returns the number of the specified activity
GetMineStatus(Record Number, Activity Number, MS_MINED or MS_REMAINING or MS_RELEASED or MS_INVENTORY, ByRef Percentage[,
MS_AFTER_INITIAL or MS_AFTER_MOQ or MS_AFTER_PS or MS_CURRENT]) – The function returns True if it is successful and the parameter
returns the percentage mined, remaining, released or inventory, for the specified record and activity at the given point in time
GetMOQItem(Step Number, Activity Number, ByRef Item as ItemRemoved) – Item as ItemRemoved returns the details for the specified step and
activity number from the Mined Out Quantities list and the function returns True if the item is found
GetMOQItemCount() – Returns the number of records in the Mined Out Quantities list
GetPSItem(Scenario Name, Step Number, Activity Number, ByRef Item as ItemRemoved) – Item as ItemRemoved returns the details for the
specified step and activity number from the Preschedule Table attached to the given scenario and the function returns True if the item is found
GetPSItemCount(Scenario Name) - Returns the number of records in the Preschedule Table attached to the given scenario
GetResourceCount([Scenario Name]) – Returns the number of resources in the specified scenario
GetResourceName(Resource Number in Scenarios List[, Scenario Name]) – Returns the resource name corresponding to the number in the list
GetResourceRoster(Scenario Name, Resource Name, ByRef Roster Name, ByRef Roster Exception Name) – Returns the names of the roster and
roster expectation for a resource in a scenario
GetRosterHrs(Roster Name, Roster Exception Name, Start Date, End Date) - Returns the number of rostered hours performed within the two
supplied dates for the specified roster and roster exception.
GetRosterHrsResource(Roster Name, Start Date, End Date) - Returns the number of rostered hours performed within the two supplied dates
for the specified resource
RunActiveScenario(Start Period Number, Finish Period Number, Display Progress Dialog TRUE or FALSE) – Runs the active scenario over the
specified periods and returns an integer which indicates the success of the operation
SetActiveScenario(Scenario Name) – Returns True if it successfully sets the active scenario for the project
SetMOQItem(Record Number, Activity Number, Released Percent, Mined Percent) – Returns True if the Mined Out Quantities list is successfully
updated with the new percentages for the specified record and activity
SetPSItem(Scenario Name, Record Number, Activity Number, Released Percent, Mined Percent) – Returns True if the Preschedule Table
attached to the given scenario is correctly updated with the new percentages for the specified record and activity

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -4-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - SCHEDULING

User Processing Script Functions


The following Functions are only available for use in User Processing Scripts.
s ChangeProductionRate(Resource Name, Activity Number, Production Rate String) - Changes the production rate for the given resource
and activity
s ChangeRoster(Resource Name, Roster Name, Roster Exception Name) – Changes the nominated roster and/or roster exception for the
given resource
ClearUserFlag(Flag Number 1 or 2, Record Number, Activity Number[, Resource Name]) – Clears the user flag 1 or 2 for the specified record and
activity, to allow it to be selected from the available block list (and returns True if successful)
FindSourceInABL(Record Number, Activity Number, ByRef Available Flag[, Resource Name]) – Returns True if the specified record and activity
are in the available source block list and Available Flag returns a value indicating why it has been eliminated from selection
FindDestinationInABL(Record Number, Activity Number, ByRef Available Flag[, Resource Name]) – Returns True if the specified record and
activity are in the available destination block list and Available Flag returns a value indicating why it has been eliminated from selection
GetCurrentPeriod() – Returns the current scheduling period
GetCurrentOutputStep(ByRef OutStep As OutputPathStep) - Gets the Current Output step for the current resource that the script is processing
GetCurrentResource() – Returns the name of the resource that called this script
GetCurrentStepActivity() – Returns the activity number for the current step being scheduled
GetCurrentStepDetails(ByRef Percentage Mined, ByRef Percentage Released, ByRef Percentage Remaining) – The function returns True if
successful and the parameters return the percentage mined, released and remaining for the current step being scheduled
GetLastOutputStep(ByRef OutStep as OutputPathStep) – OutStep as OutputPathStep returns the details for the last step for the current
resource and the function returns True if successful (only relevant in End of Block user processing scripts)
GetFirstABLSource(ByRef Record Number, ByRef Activity Number[, ByRef Available Flag] [, Resource Name]) – The function returns a value
indicating why the first record in the available source block list has been eliminated from selection and the parameters return the record number
and activity for the first record in the available source block list
GetNextABLSource(ByRef Record Number, ByRef Activity Number[, ByRef Available Flag] [, Resource Name]) – The function returns a value
indicating why the next record in the available source block list has been eliminated from selection and the parameters return the record
number and activity for the next record in the available source block list
GetFirstABLDestination(ByRef Record Number, ByRef Activity Number[, ByRef Available Flag] [, Resource Name]) – The function returns a
value indicating why the first record in the available destination block list has been eliminated from selection and the parameters return the
record number and activity for the first record in the available destination block list
GetNextABLDestination(ByRef Record Number, ByRef Activity Number[, ByRef Available Flag] [, Resource Name]) – The function returns a
value indicating why the next record in the available destination block list has been eliminated from selection and the parameters return the
record number and activity for the next record in the available destination block list
GetPctThroughPeriod() – Returns the completed progress through the current period as a percentage
s GetResourceLocation(Resource Name, ByRef Record Number, ByRef Activity Number) – The parameters return the record number and
activity number on which the specified resource is located
GetScheduleStartPeriod() – Returns the start period for the schedule
GetSPCreationDate(ByRef Start Date, ByRef End Date) – When used within a stockpile creation script, the function returns True if successful
and the parameters return the start and end dates for the creation of a stockpile
InsertResourceDelay(Duration[, Non-Productive Activity][, Delay Time Base Units][, Resource Name) - Inserts a delay into the output path of the
resource that called the script or the given resource
InitTrackingField(Field Number[,Productive Activity][, Range Name][, Resource Name) –- Initialises the specified tracking field.
IsCombinationConstrained(Source Record Number, Activity, Destination Record Number[, Resource] [, Constraint Details]) – Returns whether a
combination of a source task and a destination record is constrained at the current point in the schedule, and optionally what constraints are
active for that task
IsTaskConstrained(Record Number, Activity[, Resource] [, Constraint Details]) – Returns whether a task is constrained at the current point in
the schedule, and optionally what constraints are active for that task
IsTaskReserved(Record Number, Activity[, Total Reserved Percent] [, Resources]) – Returns whether a task is reserved at the current point in the
schedule, and optionally what percentage is reserved and by what resource(s)
GetTrackingField(Field Number[,Productive Activity][, Range Name][, Resource Name) – Gets the current value of the specified tracking field.
s ResetMaxCapacity (Record Number) – Allows the specified record to be selected, after it has been turned off by a “Contents of Range”
Capacity Constraint
RunScheduleReport(Schedule Report Name, Start Period Number, End Period Number[, Edit Output Options]) – Runs the schedule report from
the specified start period to the specified end period and returns True if it is run successfully
SetUserFlag(Flag Number 1 or 2, Record Number, Activity Number[, Resource Name]) – Sets user flag 1 or 2 for the specified record and activity,
to stop it from being selected from the available block list, and returns True if set successfully
WriteSourceABLToFile(File Name) – Writes the contents of the available source block list to the specified file and returns True if successful
WriteDestinationABLToFile(File Name) – Writes the contents of the available destination block list to the specified file and returns True if
successful

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -5-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 200
2006 XCM QUICK REFERENCE - SCHEDULING

Input Path Information


ClearInputPath(Input Path Name[, Starting Step Number] [, Ending Step Number) – Clears the specified range of steps in the input path and
returns the number of steps in the modified input path
GetInputPathName(Scenario Name, Resource Name) – Returns the name of the input path for the specified resource
GetInputPathNoOfSteps(Input Path Name) – Returns the total number of steps in the input path
GetInputStep(Input Path Name, Step Number, ByRef InStep as InputPathStep) – InStep as InputPathStep returns details for the specified step
in the input path and the function returns True if successful
InsertIntoInputPath(Input Path Name, Step Number, ByRef NewStep as InputPathStep) – Inserts a new step in the specified input path and
returns the number of steps in the modified input path

Output Path Information


GetFirstOutputStep(ByRef OutStep as OutputPathStep, Scenario Name, Resource Name[, Range Name]) – OutStep as OutputPathStep returns
the details for the first step in a combined output path and the function returns the total number of steps in the combined output path
GetNextOutputStep(ByRef OutStep as OutputPathStep) – OutStep as OutputPathStep returns the details for the next step in a combined output
path and the function returns True if successful
GetOutputPathNoOfSteps(Scenario Name, Resource Name) – Returns the total number of steps in the output path
GetOutputRange(Scenario Name, Resource Name, Input Step Number[, ByRef First Output Step Number] [, ByRef Last Output Step Number]) –
The function returns the number of output path steps corresponding to the specified input path step and the parameters return the first and last
output path step numbers
GetOutputRangeForPeriod(Scenario Name, Resource Name, Period Number[,ByRef First Output Step Number] [,ByRef Last Output Step
Number]) – The function returns the number of output path steps for the specified resource and time period and the parameters return the first
and last output path step numbers
GetOutputRangeForRecord(Scenario Name, Resource Name, Record Number, Activity Number, ByRef First Output Step Number, ByRef Last
Output Step Number) – The function returns True if the specified record exists in the output path and the parameters return the first and last
output path step numbers for that record
GetOutputStep(Scenario Name, Resource Name, Step Number, ByRef OutStep as OutputPathStep) – OutStep as OutputPathStep returns details
for the specified step in the output path and the function returns True if successful
GetPeriodRangeForResource(Scenario Name, Resource Name, ByRef First Period Number, ByRef Last Period Number) – The function returns
True if the period range is located successfully and the parameters return the first and last period numbers over which the specified resource
has been scheduled
GetPeriodRangeForScenario(Scenario Name, ByRef First Period Number, ByRef Last Period Number) – The function returns True if the period
range is located successfully and the parameters return the first and last period numbers over which the specified scenario has been scheduled

Dependency Related Functions


The following Functions are only available for use in User Processing Scripts or in a script applied in a Dependency Rule Set.
s AddDependencyToGroup(Dependency Rule Set ID Number, Successor Record Number, Predecessor Record Number[, Successor Activity
Number][, Predecessor Activity Number][, Release Profile Curve Name]) - Adds an alternative dependency rule to the dependency rule specified
by the identification number (which is returned by the SetDependencyEx Function)
GetDependencies(Record Number) – This function gets all dependency information for the specified record and returns True if successful (it
must be called before GetPredecessor, GetSuccessor, GetNumberOfPredecessos and GetNumberOfSuccessors)
GetNumberOfPredecessors() – Returns the total number of predecessor records for the record specified in GetDependencies
GetNumberOfSuccessors() – Returns the total number of successor records for the record specified in GetDependencies
GetPredecessor(Predecessor Number, ByRef Predecessor Record Number, ByRef Predecessor Activity Number) – The parameters return the
predecessor record number and activity for the record specified in GetDependencies and the function returns the predecessor activity number
GetSuccessor(Successor Number, ByRef Successor Record Number, ByRef Successor Activity Number) – The parameters return the successor
record number and activity for the record specified in GetDependencies and the function returns the successor activity number
s RemoveAllDependencies() – Removes all dependency information from a project
s RemoveDependency(Successor Record Number, Predecessor Record Number[, Successor Activity Number][, Predecessor Activity
Number]) - Removes a dependency between two records
SetDependency(Successor Record Number, Predecessor Record Number[, Successor Activity Number] [, Predecessor Activity Number]) – Returns
True if it successfully creates a new dependency rule, which states that the specified predecessor record and activity must be scheduled before
the specified successor record and activity
SetDependencyEx(Successor Record Number, Predecessor Record Number[,Successor Activity Number][, Predecessor Activity Number][,
Alternative Dependency][, Release Profile Curve Name] [, Lag Duration]) – Creates a new dependency rule, with options for alternative
dependencies and released profiles, and returns an identification number for alternative dependency rules

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -6-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 - REPORT WRITE
WRITERR

Filters
M(Data Field Number or Full Row Code) – Used for filtering records according to the value of the main database data field
Condition1 And Condition2 – Both the conditional statement before and after the Or must be true for a scheduling step to be passed by the filter
Condition1 Or Condition2 – Either the conditional statement before or after the Or must be true for a scheduling step to be passed by the filter
Not(Condition) – If the conditional statement is true then the step will not be passed by the filter
Activity(Activity Number) – Used to over-ride the productive activity associated with the main database data field in the result
Resource(“Resource Name”) – Used to only pass steps that were scheduled by the specified resource
Pil(Level Number, Pil Number) – Used to only pass record that have the specified position in level number at the specified database level
GetApil(Level Number) – Used for filtering records according to the value of the position in level number at the specified level
StepType(1 is Productive 2 is Non-Productive Non-Operating 3 is Non-Productive Operating 4 is Non-Productive Extended Operations 5 is Non-
Rostered Non-Operating) – Used for filtering records according to their step type
GetClass(Data Field Number or Full Row Code) – Used for filtering records according to the value of the specified classified field
Destination(“Stockpile name”) – Returns true if the current output path elements’ destination is the same as the supplied stockpile name.
GetDestApil(Level Number) - Used for filtering records by destination according to the value of the position in level number at the specified level.
StockpileInventory () – Returns true if the current output path elements’ source or destination record is the specified stockpile or is a child of
the specified stockpile.
StartedTask() – Returns true for all started productive steps in a given period, and causes the result field to report a non-prorated value. (*)
CompletedTask() – Returns true for all completed productive steps in a given period, and causes the result field to report a non- prorated value.
(*)(**)
LastStartedTask() – Returns true for the last started productive step in a given period, and causes the result field to report a non-prorated
value. (*)
LastCompletedTask() – Returns true for the last completed productive step in a given period, and causes the result field to report a non-
prorated value. (*)(**)
FirstStartedTask() – Returns true for the first started productive step in a given period, and causes the result field to report a non-prorated
value. (*)
FirstCompletedTask() – Returns true for the first completed productive step in a given period, and causes the result field to report a non-
prorated value. (*)(**)
FirstTask() – Returns true for the first productive step in a given period, and causes the result field to report a non-prorated value. (*)
LastTask() – Returns true for the last productive step in a given period, and causes the result field to report a non-prorated value. (*)
TaskPercent() – Returns the percent of the database record taken in the current scheduling output step (values between 0 and 100)

(*) These filters can not be used with each other or multiple times within a single filter. The result is not defined in those circumstances.
(**) If reporting tasks based on a timescale, do not use a timescale with a resolution smaller than that of the calendar used to run the schedule
with this XCM. For example, if a schedule was run using a monthly calendar, do not use a timescale created based on weekly intervals. If you
do, these filters will pass for all the periods in which the completing task spans.

You can also use scripts as a filter – In the filter section of the report type the name of your script, prefaced with an exclamation mark (!)
The file specified must contain the following function. (This is the simplest example):
Function ReportFilter as Boolean
ReportFilter = (Condition)
End Function

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -7-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 - REPORT WRITER

Results
SafeDivide(Numerator Value, Denominator Value) – Returns a zero value if the denominator is zero
M(Data Field Number or Full Row Code) – Returns the accumulated main database data field for all steps passed by the filter
C(Data Field Number or Full Row Code) – Returns the calendar database data field value
REP(Line Number) – Returns the accumulated value from the specified line number in the current report writer
MinStep(Data Field Number or Full Row Code) – Returns the minimum amount of the specified main database field taken by a scheduling step
for all steps within a reporting period (excluding 0 quantities)
MinDB(Data Field Number or Full Row Code) – Returns the minimum amount of the specified main database field for all steps within a reporting
period (excluding 0 quantities)
MinOrigStep(Data Field Number or Full Row Code) – Returns the minimum amount of the specified main database field taken by a scheduling
step for all steps within a reporting period (excluding 0 quantities), using the original database value
MinOrigDB(Data Field Number or Full Row Code) – Returns the minimum amount of the specified main database field for all steps within a
reporting period (excluding 0 quantities) , using the original database value
MaxStep(Data Field Number or Full Row Code) – Returns the maximum amount of the specified main database field taken by a scheduling step
for all steps within a reporting period (excluding 0 quantities)
MaxDB(Data Field Number or Full Row Code) – Returns the maximum amount of the specified main database field for all steps within a
reporting period (excluding 0 quantities)
MaxOrigStep(Data Field Number or Full Row Code) – Returns the maximum amount of the specified main database field taken by a scheduling
step for all steps within a reporting period (excluding 0 quantities), using the original database value
MaxOrigDB(Data Field Number or Full Row Code) – Returns the maximum amount of the specified main database field for all steps within a
reporting period (excluding 0 quantities) , using the original database value
GetValue(Field Number, Period Number) – Returns a value from a field in the current report writer, for a previous period
CalendarHrs() – Returns the accumulated calendar hours for all steps passed by the filter
OperatingHrs() – Returns the accumulated productive and non-productive operating hours for all steps passed by the filter
WorkHrs() – Returns the accumulated productive operating hours for all steps passed by the filter
Released(Data Field Number or Full Row Code) – Returns the accumulated released value for the specified main database data field, for all
steps passed by the filter
OpeningInv(Data Field Number or Full Row Code) – Returns the accumulated inventory at the start of the time period, for the specified main
database data field, for all steps passed by the filter
ClosingInv(Data Field Number or Full Row Code) – Returns the accumulated inventory at the end of the time period, for the specified main
database data field, for all steps passed by the filter
PeriodStart() – Returns the period start date
PeriodEnd() - Returns the period end date
RosterHrsResource(Resource Name) - Returns the number of rostered hours performed within the current reporting period for the specified
resource.
RosterHrs(Roster Name, Roster Exception Name) - Returns the number of rostered hours performed within the current reporting period for the
specified resource.
OriginalValue(Data Field Number or Full Row Code, Level 0 Pil[, Level 1 Pil] [, Level 2 Pil] [, Level 3 Pil] [, Level 4 Pil] [, Level 5 Pil] [, Level 6 Pil] [,
Level 7 Pil] [, Level 8 Pil] [, Level 9 Pil] [, Level 10 Pil] ) - Returns the value for a specified data field at the beginning of the schedule based on the
position in level number at each database level.
OpeningInvSP(Data Field Number or Full Row Code) - Returns the accumulated inventory at the start of the time period, for the specified
stockpile database data field, for all steps passed by the filter.
ClosingInvSP(Data Field Number or Full Row Code) - Returns the accumulated inventory at the end of the time period, for the specified
stockpile database data field, for all steps passed by the filter.
OpeningDumpCapacity(Data Field Number or Full Row Code ) - Returns the remaining capacity at the start of the time period, for the specified
dump database capacity data field, for all steps passed by the filter.
ClosingDumpCapacity(Data Field Number or Full Row Code) - Returns the remaining capacity at the end of the time period, for the specified
dump database capacity data field, for all steps passed by the filter.

You can also use scripts as a report result – In the result section of the report, type the name of your script, prefaced with an exclamation
mark(!)
The file specified must contain the following function: (This is the simplest example):
Function ReportResult as Double
ReportResult = (Value)
End Function

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -8-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - DATABASE

Get Project Information


Curve3DValue(Curve Name, X Value, Y Value) – Returns a Z value from a 3D XPAC curve
CurveValue(Curve Name, X Value, Curve Mode Or Y Value) – Returns a Y value from a 2D XPAC curve or a Z value from a 3D XPAC curve
Export(FileName, Type[, Item Name]) – Exports the specified information to the specified file
GetCurrentDirectory() – Returns the current directory where the system would open a file
GetDatabaseName() – Returns the name of the database over which the current XCM is being run
GetFullModelName() – Returns the name of the XPAC project, including the drive and directory path name
GetModelDirectory() – Returns the directory in which the XPAC project file is located
GetScriptsDirectory() – Returns the scripts directory as set in Global Options
Import(FileName, Type) – Imports the specified information from the specified file

Get Structural Information from Records


DbReadName(Database Name, Record Number) – Returns the record name for the record in the specified database
GetApil(Level Number[, Record Number] [,Database Name]) – Returns the position in level for a record at the specified level
GetFirstInRange(Database Range Name[, Database Name]) - Returns the record number of the first record in the database range
GetLevelNum(Record Number [,Database Name]) – Returns the level number for the specified record number
GetNextInRange(Record Number, Database Range Name[, Database Name]) - Returns the record number after the specified record in the
database range
GetNumChildren(Record Number [,Database Name]) – Returns the number of child records for the specified record
GetPilFromPositionName([Record Name] [, Level Number] [, Database Name] [, Section Name]) – Looks up the position table for the specified
level to obtain the position in level number corresponding to the record name
GetPilFromPositionNameEx([Record Name] [, Level Number] [, Database Name] [, Section Name]) – Looks up the position table for the specified
level to obtain the position in level number corresponding to the record name and allows you to specify Level 0 as a Level Number
GetPositionNameFromPil([Pil Number] [, Level Number] [, Database Name] [, Section Name]) – Looks up the position table for the specified level
to obtain the record name corresponding to the position in level number
GetPositionNameFromPilEx([Pil Number] [, Level Number] [, Database Name] [, Section Name]) – Looks up the position table for the specified
level to obtain the record name corresponding to the position in level number and allows you to specify Level 0 as a Level Number
GetRecFromName(Level 1 Name[, Level 2 Name] … [, Level 10 Name]) – Returns the record number based on the record name at each
database level
GetRecFromNameEx(Level 0 Name, Level 1 Name[, Level 2 Name] … [, Level 10 Name]) – Returns the record number based on the record name
at each database level
GetRecFromNameDB(Database Name, Level 1 Name[, Level 2 Name] … [, Level 10 Name]) – Returns the record number in the specified
database based on the record name at each database level
GetRecFromNameDBEx(Database Name, Level 0 Name[, Level 1 Name] [, Level 2 Name] … [, Level 10 Name]) – Returns the record number in
the specified database based on the record name at each database level
GetRecFromPil(Level 1 Pil[, Level 2 Pil] … [, Level 10 Pil]) – Returns the record number based on the position in level number at each database
level
GetRecFromPilEx(Level 0 Pil[, Level 1 Pil] [, Level 2 Pil] … [, Level 10 Pil]) – Returns the record number based on the position in level number at
each database level
GetRecFromPilDB( Database Name, Level 1 Pil[, Level 2 Pil] … [, Level 10 Pil]) – Returns the record number in the specified database based on
the position in level number at each database level
GetRecName(Record Number, Name Type [,Database Name]) – Returns the full name, path name or record name for the specified record
GetRecNameAtLevel(Level Number[, Starting Record] [,Database Name]) – Returns the record name at the specified database level relative to
the starting record
GetRecNum([Record Pointer] [, Starting Record][, Database Name]) – Returns the record number relative to the starting record
GetRecNumAtLevel(Level Number[, Starting Record] [,Database Name]) – Returns the record number at the specified database level relative to
the staring record
GetRecNumFromPath(Record Path Name[, Database Name]) – Returns the record number for the record specified by the record path name
GetNumRecords(Function Type, Database Name[, Record Number]) - Returns the number of records for the function type, database and record
number requested
IsFirst() – Returns True if the current record is the first child of its parent
IsFirstInRange() – Returns True if the current record is the first record in the selected database range
IsInRange(Database Range Name) - Returns True if the current record is a lowest level record in the specified database range
IsLast() – Returns True if the current record is the last child of its parent
IsLastInRange() – Returns True if the current record is the last record in the selected database range
IsValidRecNum(Record Number [,Database Name]) – Returns True if the record number exists in the database

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. -9-
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - DATABASE

Assign Structural Information


Information to Records
CreateRecord(Level 1 Name, Level 1 Pil[, Level 2 Name] [, Level 2 Pil]… [, Level 10 Name] [, Level 10 Pil]) – Adds a record with the given position
in level numbers to the current database and returns the new record number
CreateRecordDB(Database Name, Level 1 Name, Level 1 Pil[, Level 2 Name] [, Level 2 Pil]… [, Level 10 Name] [, Level 10 Pil]) – Adds a record
with the given position in level numbers to the specified database and returns the new record number
CreateRecordEx(Level 0 Name, Level 0 Pil, Level 1 Name, Level 1 Pil[, Level 2 Name] [, Level 2 Pil]… [, Level 10 Name] [, Level 10 Pil]) – Adds a
record with the given position in level numbers to the current database and returns the new record number
GoRec(Relative Record or Absolute Record Number) – Moves to the specified record and returns True if successful
RemoveRecord(Record Number [,Database Name]) – Removes the specified record from the database and returns True if successful
SetRecName(Record Number, Record Name) – Sets the name of the specified record, except where it is controlled by a position table, and
returns 0 if successful and –1 if unsuccessful

Get Data from Records


DbReadValue( Database Name, Record Number, Data Field Number or Full Row Code) – Reads a value from a record in the specified database
GetClass(Data Field Number or Full Row Code) – Reads the classification in the specified classified field for the current record
s GetFieldInfo(Data Field Number or Full Row Code, ByRef Info as FieldInfo, Database Name) – Info as FieldInfo returns the data field
type, activity, format, units, etc
GetNote(Data Field Number or Full Row Code) – Reads the text string in the specified note field for the current record
GetNumFields(Database Name) - Returns the number of fields in the specified database
GetRowNumFromCode(Database Name, Full Row Code) - Returns the field number corresponding to the full row code in the specified
database
GetRowCodeFromNum(Database Name, Row Number) - Returns the field row code corresponding to the row number in the specified database
SetFieldInfo(Data Field Number or Full Row Code, ByRef Info as FieldInfo, Database Name) – Modifies the data field name, type, activity,
format, units, etc and returns True if successful
RecalculateDatabase(FullRecalcFlag As Boolean, Optional DbName As String) – Recalculates the selected Database.
ReadValue(DbName As String, FullRowCode As String, Level 0 Name or Apil, Level 1 Name or Apil, … Level 10 Name or Apil) – Reads a value
from the specified database and field. The record is determined using the supplied names or APIL’s.

Assign Data to Records


s ClearData(Start Data Field Number or Full Row Code[, End Data Field Number or Full Row Code]) – Clears a range of data field values
s DbWriteValue(Database Name, Record Number, Data Field Number or Full Row Code, Value to Write) - Writes a value to a record in the
specified database
SetClass(Data Field Number or Full Row Code, Classification String[, Prompt before Adding Class]) – Sets the classification for the specified
classified field and returns True if successful
SetNote(Data Field Number or Full Row Code, Note String) – Sets the text string for the specified note field and returns True if successful
s WriteValue(DbName As String, FullRowCode As String, Value to Write, Level 0 Name or Apil, Level 1 Name or Apil, … Level 10 Name or
Apil) – Writes a value to the specified database and field. The record is determined using the supplied names or APIL’s.

Parameters Database
GetParam(Data Field Number or Full Row Code, Record Number) – Reads a value from the specified record number in the parameters database
GetParamFromPil(Data Field Number or Full Row Code, Level 1 Pil[, Level 2 Pil] … [, Level 10 Pil]) – Reads a value from the record specified by
the position in level numbers in the parameters database
s SetParam (Data Field Number or Full Row Code, Parameter Value, Record Number) – Assigns a value to the specified record in the
parameters database
s SetParamFromPil(Data Field Number or Full Row Code, Parameter Value, Level 1 Pil[, Level 2 Pil] … [, Level 10 Pil]) – Assigns a value to
the specified record in the parameters database

Script Processing Functions


Abort(Message) – Stop the processing after the current record and display a message box
GetLastError() – Returns a string containing more information about the last error encountered
GetScriptExecutionRange () – Returns the range over which the current script is being executed, or “< RunOnce >” for a run-once script
GetScriptName() – Returns the full path name of the XCM currently being run
RunScript(Database Name, XCM Full Path Name[, Database Range Name]) – Runs an XCM over a database range in the specified database
RunMacro(Macro Name[, Macro Store]) - Runs a Macro from the current script
s SetProgressBar(Bar Progress from 0 to 100, Progress Bar Message Text) – Used to display a progress bar in Run Once XCMs

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. - 10 -
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - DATABASE

Calendar and Time Periods


GetActiveCalendarName() – Returns the name of the current active calendar
GetCalendarNameFromScenario([Scenario Name]) – Returns the name of the calendar assigned to the specified scenario
GetPeriodDuration([Period Number][, Database Name][, Date Field Number]) - Returns back the length of a period in days
GetPeriodFromRecNum(Record Number[, Database Name]) – Returns the period number for the specified record in the active calendar or the
specified database
GetRecNameFromPeriod(Period Number, FULLNAME RECORDNAME or PATHNAME[, Database Name]) – Returns the name for the specified
period in the active calendar or the specified database
GetRecNumFromPeriod(Period Number[, Database Name]) – Returns the record number for the specified period number in the active calendar
or the specified database

Polygon Related Functions


CalculateLineIntersection(ByRef Line1Start As Vertex, ByRef Line1End As Vertex, ByRef Line2Start As Vertex, ByRef Line2End As Vertex[,
ByRef Intersection As Vertex][, Extend Lines]) - Calculates whether two lines intersect and optionally at what point that intersection occurs
DeletePolygon([Record Number][, Activity Number][, Polygon Index Number]) - Deletes the polygon points in the specified record and activity, for
the active polygon set and returns True if successful
GetEntity(Feature Name, Layer Name, Entity Index, ByRef Vertices[, ByRef Closed]) – Returns the vertices of the specified entity
GetEntityCount(Feature Name, Layer Name) – Returns the number of entities in the specified layer
GetFeatureCount() – Returns the number of feature layers in the model
GetFeatureName(Index) – Returns the name of the specified feature layer
GetFeatureVertexCount(Feature Name) - Counts of the number of vertices for the polygons of a feature (layer)
GetFeatureVertexXYZ(Vertex Number, Feature Name[, ByRef X Co-ord][, ByRef Y Co-ord][, ByRef Z Co-ord]) - Gets the XYZ coordinates of a
given vertex in a feature (layer)
GetLayerCount(Feature Name) – Returns the number of layers in the specified feature layer
GetLayerName(Feature Name, Index) – Returns the name of the specified layer in the specified feature layer
GetPolygonArea(ByRef Poly() as Vertex) - Calculates the area of a polygon
GetPolygonAreaXY([Record Number][, Activity Number][, Polygon Index Number]) - Calculates the two dimensional area of the polygon in the
specified record and activity, and for the active polygon set
PolygonArithmetic(ByRef Result Poly(), ByRef Poly1() as Vertex, Operation, ByRef Poly2() as Vertex) – Performs some simple arithmetic with
the specified polygons
s GetPolygonCentroid(ByRef Poly() as Vertex, ByRef Centroid As Vertex) - Calculates the centroid of a polygon
GetPolygonCentroidXY(ByRef Centroid X, ByRef Centroid Y[, Record Number][, Activity Number][, Polygon Index]) - Calculates the two
dimensional centroid of a polygon
GetPolygonCount([Record Number][, Activity Number]) - Counts the number of sub-polygons for the given record
GetPolygonVertexCount([Record Number] [, Activity Number] [, PLAN LONG_PLAN or ELEVATION] [, 0 for Polygon Index]) – Returns the number
of vertices for the specified polygon
GetPolygonVertexXYZ(Vertex Number[, ByRef X Coordinate] [, ByRef Y Coordinate] [, ByRef Z Coordinate] [, Record Number] [, Activity Number]
[, PLAN LONG_PLAN or ELEVATION] [, 0 for Polygon Index]) – Returns the coordinates for the specified polygon vertex
GetVertexEOS(ByRef Point as Vertex) - Returns True if the specified vertex is an end-of-sequence marker
GetVertexEOSA(ByRef Poly() as Vertex, Point Index Number) - Returns True if the specified vertex in a polygon is an end-of-sequence marker
InPoly(X Coordinate, Y Coordinate, ByRef X Coordinate Array, ByRef Y Coordinate Array[, Edge Width][, Polygon Mode]) – Returns True if a
point is inside a two dimensional polygon
InPolyRec(X Coordinate, Y Coordinate[, Record Number][, Activity Number][, Polygon Index Number][, Edge Width][, Polygon Mode]) – Returns
True if a point is inside the polygon for the specified record and activity, and for the active polygon set
LoadPolygon(ByRef Poly() as Vertex[, Record Number][, Activity Number][, Polygon Index Number) - Loads the vertices for the specified record,
activity and polygon index number
s OffsetPolygon(ByRef Poly() as Vertex, X Distance, Y Distance, Z Distance) - Offsets the specified polygon by the distances specified
PointInPolygon(ByRef Poly() as Vertex, ByRef Point as Vertex[, Edge Width][, Mode]) - Determines if the given point is inside the polygon
s SavePolygon(ByRef Poly() as Vertex[,Record Number][, Activity Number][, Polygon Index Number) - Saves the vertices for the specified record,
activity and polygon index
s ScalePolygon(ByRef Poly() as Vertex, Scale Factor[, As Linear Scale) - Scales a polygon up or down
s ReducePolygonComplexity(ByRef Poly() as Vertex[, Tolerance) – Eliminates duplicate or collinear vertices in the specified polygon
SetActivePolygonSet(Polygon Set Name) – Sets the active polygon set for all polygon functions to use and returns True if successful
s SetVertexEOS(ByRef Point as Vertex) - Sets the specified vertex to be an end-of-sequence marker
s SetVertexEOSA(ByRef Poly() as Vertex, Index) - Sets the array of vertices to be an end-of-sequence marker

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. - 11 -
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297
XPAC 2006
2006 XCM QUICK REFERENCE - DATABASE

Global Object Functions


ClearGlobalObject( [Object Name] ) – Clears one or all objects and arrays from the object store
GetGlobalArray(Object Name, Object Value) – Restores the value of an array from the object store that is shared between scripts
GetGlobalObject(Object Name, Object Value) – Restores the value of an object from the object store that is shared between scripts
SetGlobalArray(Object Name, Object Value) – Saves the value of an array into an object store that is shared between scripts
SetGlobalObject(Object Name, Object Value) – Saves the value of an object into an object store that is shared between scripts

Maths Functions
DegToRad(Degrees) - Converts an angle in degrees to radians
GetMax(First Value, Second Value) – Returns the maximum of two values
GetMin(First Value, Second Value) – Returns the minimum of two values
IIf(Condition, Return Value for True, Return Value for False) - Returns one of two values depending on whether the condition is true or false
RadToDeg(Radians) - Converts an angle in radians to degrees
SafeDivide(Numerator Value, Denominator Value) – Returns zero if the denominator is zero

Colour Functions
MakeRGB (Red Value 0-255, Green Value 0-255, Blue Value 0-255) – Returns a long value representing the bit pattern set for the desired colour

Options for Functions

Record Pointers
CURRENT The current active record
CURRENTDESTINATION In User Processing and Objectives, the current destination record (if applicable)
HOME The original record the script started with
UP The parent record
DOWNFIRST The first child record
DOWNLAST The last child record
PRVSIB The previous sibling under the same parent
NXTSIB The next sibling under the same parent
PRV The previous sibling regardless of parents
NXT The next sibling regardless of parents

Level Numbers
LEVEL1,…LEVEL10 The specified level number
THISLEVEL The level number of the current record
THISAPIL The position in level of the current record

Database Names
MAIN The Main database in the project
PARAMETERS The Parameters database in the project
“Calendar Name” The Calendar database name in quotes
“Results Name” The Results database name in quotes

Record Names
RECORDNAME The name of the record at that level
PATHNAME The full path name of the record
FULLNAME The record number and record path name

ByRef gives other subroutines and functions the permission to make changes to variables that are passed in as parameters. - 12 -
s in the left margin indicates a Subroutine. They do not return a value.
Runge Limited Email: support@runge.com.au Phone: +61 7 3100 7200
May, 2006 Fax: +61 7 3100 7297

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy