Access on class functions without object instance of the class

To access functions of certain classes in TCE without creating an object instance of the class, the following syntax applies:

::"ClassName".ClassFunction()

 

If the class name does not contain spaces or special characters, the following spelling is sufficient:

::ClassName.ClassFunction()

 

The class function must be declared static:

Static

 

Example:

 

Public Static Function AddTwoNumbers(ByVal Num1 As Double, ByVal Num2 As Double) As Double

  

End Function Num1 + Num2

 

This allows you to bundle generally valid functions in a class in a knowledge base.

Access to a class function without an object instance is subject to the restriction that any access to objects and features of the class is prohibited. Access generates an error at run time. All the values necessary for the execution of the function must be passed as parameters.