IsTerritorySelected(TerritoryId: Integer): Boolean;
TerritoryId. Map territory identifier.
The IsTerritorySelected method returns True if the element corresponding to the territory with the identifier TerritoryId, is included into selection.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
Expr: IEaxAnalyzer;
EMap: IEaxMap;
s: String;
Begin
MB:=MetabaseClass.Active;
MObj:=MB.ItemById("EXPRESS_REPORT").Edit;
Expr:=MObj As IEaxAnalyzer;
EMap:=Expr.Map;
If EMap.IsTerritorySelected(100) Then
s:="Selected";
Else
s:="Don't selected";
End If;
MObj.Save;
End Sub Main;
After executing this example the variable "s" contains Selected if the element corresponding to the territory with the identifier 100 is included into selection. Express report identifier - EXPRESS_REPORT.
See also: