Clear;
The Clear method clears the collection of composite term sets.
Executing the example requires that the modeling container (CONT_MODEL) contains a model (BinReg) that uses the binary regression method for calculation.
Sub Main;
Var
MB: IMetabase;
SpaceDescr: IMetabaseObjectDescriptor;
MObj: IMetabaseObject;
Model: IMsModel;
Trans: IMsFormulaTransform;
VarTrans: IMsFormulaTransformVariable;
Tree: IMsFormulaTransformSlicesTree;
Slice: IMsFormulaTransformSlice;
Selector: IMsFormulaTransformSelector;
Formula: IMsFormula;
Binary: IMsBinaryRegressionTransform;
Explanatories: IMsCompositeFormulaTermSetList;
Begin
MB := MetabaseClass.Active;
SpaceDescr := mb.ItemById("CONT_MODEL");
MObj := MB.ItemByIdNamespace("BinReg", SpaceDescr.Key).Edit;
Model := MObj As IMsModel;
Trans := Model.Transform;
VarTrans := Trans.Outputs.Item(0);
Tree := VarTrans.SlicesTree(VarTrans);
Slice := Tree.CreateSlice(1);
Selector := Model.Transform.CreateSelector;
Selector.Slice := Slice;
Formula := Model.Transform.Transform(Selector);
Binary := Formula.Method As IMsBinaryRegressionTransform;
Explanatories := Binary.Explanatories;
Explanatories.Clear;
MObj.Save;
End Sub Main;
After executing the example the collection of explanatory sets of composite terms is cleared.
See also: