IStandardDimBlock.ParentBlock

Syntax

ParentBlock: IStandardDimBlock;

Description

The ParentBlock property returns parent block.

Example

Sub Main;

Var

MB: IMetabase;

Dimens: IStandardDimension;

DimBlocks: IStandardDimBlocks;

DimBlock, DimBlock1: IStandardDimBlock;

s: String;

Begin

MB:=MetabaseClass.Active;

Dimens:=MB.ItemById("TAB_DIM").Bind As IStandardDimension;

DimBlocks:=Dimens.Blocks;

DimBlock:=DimBlocks.Item(1);

DimBlock1:=DimBlock.ParentBlock;

If DimBlock1<>Null Then

s:=DimBlock1.Name;

Else

s:="No";

End If;

End Sub Main;

After executing the example the "s" variable contains the name of parental block, if the second dictionary block is a child relative to any block. Table dictionary identifier: TAB_DIM.

See also:

IStandardDimBlock