Using the Function Wizard, add a new function, with properties as shown below:
Name: MAXCOORD Category: Statistical Description: Get the x or y coordinate of the maximum value in an array
Add the array argument, as follows:
Name: Array Type: Double Dimensions: Matrix Description: 2-dimensional array of numbers
To edit more details of the Array argument, we are going to use the Argument Dialog. There are many ways to invoke the dialog.
Using any of the methods listed above, select the Array argument and open the Argument Dialog.
In the Edit Argument Dialog, there are are many more details of an argument available than there are in the main screen of the Function Wizard.
For more details about the dialog see Argument Dialog in the Function Wizard on-line help.
Set the values in the two matrix combo-boxes, as shown below:
Click OK to return to the main screen of the Function Wizard.
In the Function Wizard add a new argument, XCoord, with fields as follows:
Name: XCoord Type: Boolean Dimensions: Scalar Description: True for the x coordinate (column number), false for y (row number)
Note that XCoord is a Boolean argument (i.e. True or False). It will be passed to our add-in function as type BOOL (int), with values TRUE (1) or FALSE (0).
Click on OK to return to DevStudio and complete the code.