1. i2 will not accept Constants in the Maths Editor if the Function is asking for a channel. Instead, you have two options here- create a channel whose only input is a Constant (effectively creating a constant channel) and using that as a Function input, OR set/create an Argument key for a constant in your Function's RegisterFunction method. It would look something like this-
- Code: Select all
arg_key = args_key.CreateSubKey("1")
arg_key.SetValue(Nothing, "Constant")
arg_key.SetValue("DataType", Analysis.DataType.Integer)
arg_key.SetValue("Dimension", CInt(Analysis.Dimension.Scalar))
2. You wouldn't set the value to "Invalid" or "N/A" strings because the output array wants to be of type Double. Instead, you set the output flags (Out_Flags in the code) to 0 at that index and i2 will automatically label it as "N/A" and not place a value there.