Use Methods With "out" and "ref" Parameters
Published (Cognex Designer or Plugin) methods with out and ref parameters cannot be compiled within a script. A possible workaround is to call these methods like any other standard .NET function. If the assembly containing the methods is included as a Common script reference, they can be accessed directly. For adding references, see the Adding References topic.
For instance, the following published method cannot be invoked from script as a published ($) function:
[Category("Utilities")] [Published]
static public void Transform(int inputParam, out CogTransform2DLinear transform, out double error) {}