CalculationTSettings, TResultsCalculateCore Method TIBCO Spotfire 7.6 API Reference
Implement this method to perform the actual calculation.

Namespace: Spotfire.Dxp.Application.Calculations
Assembly: Spotfire.Dxp.Application (in Spotfire.Dxp.Application.dll) Version: 25.11.10401.3615 (25.11.10401.3615)
Syntax

C#
protected abstract void CalculateCore(
	ResultAccumulator resultAccumulator
)

Parameters

resultAccumulator
Type: Spotfire.Dxp.Application.CalculationsResultAccumulator
The container to add resultcolumns etc. to
Remarks

Note that no tables or columns are created until this method is finished. The resultAccumulator is just a temporary container so you cannot add for example columns to it and then try to find the instances of them in the DataManager within the same pass of this method
Examples

protected override void CalculateCore(ResultAccumulator resultAccumulator)
{  
  //Get one or more column builders.
  ColumnBuilder<double> builder = GetColumnBuilder<double>(col.Name);   

  // Perform the calculation and add items to the builder.
  ...    
  builder.AddItem(2.0)
  ...

  // Naming combined with updates, deletions and uniqueness can be a surprisingly tricky thing.
  // This is one relatively hasslefree way of dealing with naming where the user doesn't get to name the table but 
  // possibly the calculation itself. We let the framework take care of making names unique.
  // Then the user can only rename the table through the normal rename table interface in Data Table Properties. Alternatively it can
  // be renamed explicitly by the user in the update step.  If the UI wants to pre-check
  // uniqueness remember the update scenario so you don't include the tablename you are about to update in the taken names.

  string targetTableName = null;
  if (CalculationResults.MyNewTable == null)
  {
      targetTableName = CalculationSettings.GetAncestor<Calculation>().Name;
  }
  else
  {
      targetTableName = CalculationResults.MyNewTable.Name;
  }
  //add a completely new table
  resultAccumulator.AddTable(MyCalculationResults.CalculationResultsIdentifiers.MyNewTable,
      targetTableName, myColumnBuilders);                

  //and add some columns to an existing table
  resultAccumulator.AddColumns(MyCalculationResults.CalculationResultsIdentifiers.MyColumn,
      CalculationSettings.TableToPutResultIn, builder);  
}
Version Information

Supported in: 7.6, 7.5, 7.0, 6.5, 6.0, 5.5, 5.0
See Also

Reference