Page 1 of 1

Element order in a consolidation

Posted: Thu Jan 31, 2013 11:59 am
by bunchukokoy
Hi guys.

Is there a function (although I don't see one) or a way in which I will be able to identify the element's order in a consolidation?

For example, Consolidated element A has children A1, A2, A3 in order.
I want to identify the order of A2.

Somehow like ComponentElementOrder(DimName,Parent,Child) that will return the order of the child.

Any idea?

Thanks guys. :D :D

Re: Element order in a consolidation

Posted: Thu Jan 31, 2013 12:08 pm
by declanr
sPar = 'A';
sCh = 'A2';

iCount = 1;
iMax = ElCompN ( sDim, sPar );

While ( iCount <= iMax );
sEl = ElComp ( sDim, sPar, iCount );
If ( sEl @= sCh );
sOrder = iCount;
iCount = iMax;
EndIf;
iCount = iCount + 1;
End;

Re: Element order in a consolidation

Posted: Thu Jan 31, 2013 12:46 pm
by bunchukokoy
Thanks very much Sir!