Probe: IDimAttributeProbe;
Probe: Prognoz.Platform.Interop.Dimensions.IDimAttributeProbe;
The Probe property returns a collection of attributes implemented by the IDimAttributeProbe interface.
This property returns object that should test the attributes by values of which search will be performed. Use this property to avoid custom implementation of the IDimAttributeProbe.Probe method. This method returns True for the attributes included into the current collection and False for all the other attributes.
Executing the example requires a form, a button named Button1 positioned on this form, the DimensionTree component named DimensionTree1 and the UiDimension component named UiDimension1 which is used as the data source for DimensionTree1. The dictionary linked to UiDimension1 component contains Name and UserAttr attributes.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
Man: IDimOrmManager;
Cond: IDimOrmCondition;
DimInst: IDimInstance;
AttrsList: IDimAttributesList;
Crit: IDimTextCriteria;
Begin
DimInst := UiDimension1.DimInstance;
AttrsList := New DimAttributesList.Create(DimInst.Dimension, "NAME;USERATTR");
Crit := New DimTextCriteria.Create;
//Define attributes using Probe method
Crit.CriteriaOptions := TextCriteriaOptions.SearchProbeAttributes
Or TextCriteriaOptions.FreeText;
//Indicate object that determines attributes for search
//For Name and UserAttr attributes the method returns True as they are included into the collection
Crit.Probe := AttrsList.Probe;
Crit.Text := "First";
Man := New DimOrmManager.Create;
Cond := Man.CreateCondition(DimInst.Dimension, Crit);
Cond.SelectElements(DimensionTree1.Selection);
End Sub Button1OnClick;
After this example is executed clicking the button creates object to find dictionary elements. Search condition is selected. Attributes by values of which the search should be performed are defined using the Probe method. As the testing object the method uses system object based on the attribute collection stored in the AttrsList variable. Found elements are highlighted in the DimensionTree1 component.
See also: