Skip to main content

Rerun model comparison

You can use the RequestRecompute method of the IModelComparison object to recompare the specified model. Use this when the project to be compared is not the current project, or when the model is not recompared even after changes are made.

public void RecomputeModel(ICommandContext c, ICommandParams p) 
{
//Get the project comparison results
var project = ...
IModelComparison comparison = c.App.Diff.GetComparison(project);

//Get the model to be compared again
var model = ...

//Request a model recomparison
comparison.RequestRecompute(model);
}
note

The recomparison is executed after the series of processing of the extension's commands and events is completed.