The macro stops with an error because the generated code is not correct. We will remove this issue. The correct code should be:
ActiveDatabase.SelectedObject.SmoothingWidth = 500
An alternative to the mean function is the smooth function respectively the Signal Smoothing Analysis Object. This method uses a faster linear algorithm.
The result of
Mean('DataSet' ,MEAN_ARITHMETIC + CALC_RUNNING, 501)"
When the smoothing is calculated, there are insufficient left and right neighbours available for the first or last SmoothingWidth values in DataSet. Unlike the mean function these values are then equated to the first or last value in DataSet.
Refer to the online help for more information.