Reference

Top  Previous  Next

 

This command is only available to users that hold a Pro License and can be used ONLY in the Code section of the script

 

The Reference command allows you to specify and use methods and other code from an assembly to perform actions within a script that would otherwise not be possible. You need to specify both the Reference that allows you to specify and use methods and other code from an external assembly to perform actions within a script that would otherwise not be possible, and the Using Clause which connects the code with the assembly. If either is not specified, then an error will be thrown.

 

You can use multiple Using Clause and Reference pairs to use code from multiple external assemblies in your script.

lamp Important: This is very much a power user feature, which is why it is only available with a Pro License. In order to use the Reference command you must be an experienced programmer capable of writing raw code using the C# programming language.

Command Syntax

 

Reference:[AssemblyPathAndFileName]

 

The colon after the command and the TargetFileName parameter are compulsory. The command itself is not case sensitive, but parameters may be depending on the operating system and locale.

 

Parameters:

 

AssemblyPathAndFileName: The fully qualified path and file name of the file that should be referenced.

 

The parameter is compulsory. If the parameter is missing or invalid an error will be thrown. The parameter must be surrounded by quotation marks if a colon or one or more spaces are included in the path and file name. It is good practice to include the quotation marks in any case, so that it reduces the risk of error when writing scripts.

 

Example:

lamp Note: This command can ONLY be used in the Code Section of a script and must always be used with a ' Using Clause' written into the same section. If you try to use the command anywhere else in a script an error will be thrown.

[Code]

Reference:"C:\Test\TestAssembly.dll"

using TestAssembly;

 

See Also: Code Section ExecCode Using Clauses