Henri Pellemans
Guest
|
Hi at ADX,
I have a XLL UDF with 292 functions and 1,084 parameters. The code is VB.NET
If I am going to implement function and parameter descriptors for all these functions and parameters, does it have any influence on the performance [i.e. speed of calculation] of these functions?
Best regards,
Henri |
|
Eugene Astafiev
Guest
|
Hi Henri,
The function descriptors will be used by Excel as hints when you specify values passed the function. However, the IsVolatile property may cause additional recalculation. The "Developer's Guide" document (see adxnet.pdf file in the Add-in Express installation folder) has the following description:
IsVolatile = True means that your function will be recalculated whenever calculation occurs in any cell ( s) of the worksheet; a nonvolatile function is recalculated only when the input variables change |
|
Henri Pellemans
Guest
|
Hi Eugene,
I suppose the descriptors do not make a function Volatile?
I know you can set a function to volatile in the designer. But if I am going to describe 292 functions, I won't use the designer, but use my own code, that I paste into the add-in module.
If I do so, must I explicitly declare the function as non volatile? Or is 'IsVolatile = FALSE' the default value, just as 'AcceptAsArray = TRUE' is the default value for the parameter descriptor.
Henri |
|
Eugene Astafiev
Guest
|
Hi Henri,
Please note that the ADXExcelFunctionDescriptor class provides the IsVolatile property. Here is how the IsVolatile property is declared in the code:
[DefaultValue(false)]
public bool IsVolatile { get; set; }
And the AcceptAsArray property of the ADXExcelParameterDescriptor class is declared in the following way:
[DefaultValue(true)]
public bool AcceptAsArray { get; set; } |
|
Henri Pellemans
Guest
|
Hello Eugene,
So because of the default values the following code is not needed:
Me.AdxExcelFunctionDescriptor1.IsHidden = False
Me.AdxExcelFunctionDescriptor1.IsVolatile = False
Me.AdxExcelFunctionDescriptor1.IsThreadSafe = False
Me.AdxExcelParameterDescriptor1.AcceptAsArray = True
Unless I want to change the default values.
There will be enough lines of code. My 'ADX function description program for VB.NET' already generates about 7,000 lines of code... |
|
Eugene Astafiev
Guest
|
Hi Henri,
You are right. There is no need to configure these properties unless you want to set non-default values. |
|