Dependents(Element: Integer): IRdsDictionaryElementDependents;
Dependents[Element: UInteger]: Prognoz.Platform.Interop.Rds.IRdsDictionaryElementDependents;
Element - element key, for which it is necessary to receive dependencies.
The Dependents property returns a collection of dependencies from the element, which key is passed by the Element parameter.
Use the Element or the IRdsDictionaryElement.Key property to get an element key.
Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1, and the UiDimension component named UiDimension1 that is a data source for DimensionTree1. Data source is connected with the MDM dictionary that supports tracking of links to elements.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
MB: IMetabase;
Dict: IRdsDictionaryInstance;
Elements: IRdsDictionaryElements;
Depends: IRdsDictionaryElementDependents;
MDescs: IMetabaseObjectDescriptors;
MDesc: IMetabaseObjectDescriptor;
Begin
MB := MetabaseClass.Active;
Dict := UiDimension1.DimInstance As IRdsDictionaryInstance;
Elements := Dict.Elements;
//Increment index of the focused element by 1, because
//in MDM dictionary zero element is root element
//that corresponds to dictionary name
Depends := Elements.Dependents(Elements.Element(DimensionTree1.FocusedElement + 1));
//Collection of descriptions of objects that depend on element
MDescs := Depends.Objects;
For Each MDesc In MDescs Do
Debug.WriteLine(MDesc.Name);
End For;
End Sub Button1OnClick;
On pressing the button a collection of dependencies from MDM dictionary element focused in the DimensionTree1 component is received. Names of objects that depend on the element are displayed in the development environment console.
See also: