Invokes a public method on an instance of a class loaded by the LoadExternalAssembly statement and returns the value of the method. You can pass any number of parameters to the method call.
Only use this statement if you have Visual C# .NET or Visual Basic .NET experience.
Syntax
ExternalCall(Instance, "MethodName", Parameters...)
Arguments
| Argument | Description |
|---|---|
| Instance | Class instance loaded by the LoadExternalAssembly statement. |
| MethodName | Public, non-static method to call. |
| Parameters | Optional parameters to pass to the method call, separated with commas. |
Return value
| Value | Description |
|---|---|
| Value | Method value. |
| Null | Method does not return a value. |
Return value types
The following value types can be returned to the called method and used in scripts.
| Category | Value type |
|---|---|
| Signed integers | 16-bit (short, Int16) |
| 32-bit (int, Int32) | |
| 64-bit (long, Int64) | |
| Unsigned integers | 16-bit (ushort, UInt16) |
| 32-bit (uint, UInt32) | |
| 64-bit (ulong, UInt64) | |
| Unicode characters | Individual characters (char) |
| Series of characters (string) | |
| .NET DateTime object | Object set to the system time and date |
Note: To return values from other .NET objects, create an override for ToString() that outputs the data from the objects in a formatted string. To access the object data in scripts, parse the string value returned by the ExternalCall statement to retrieve the data items.
Example
asmPixels = LoadExternalAssembly("%SCRIPTS%\\QAWProPixels.dll", "QAWProPixels.QAWProPixels")
pixelValue = ExternalCall(asmPixels, "GetRGBValueAt", 100, 150)