AVEVA. PML. SORT AND SUBTOTAL

–Diameters and Lengths

!stringsep = ‘;’

var !arrayHbor eval (STR(HBOR)) FOR ALL BRAN for CE
var !arrayClle eval (CLLE) FOR ALL BRAN for CE

var !arrayIndex SORT !arrayHbor LASTINGROUP !arrayHborGroup
var!arrayHborClleTotal SUBTOTAL !arrayClle !arrayIndex !arrayHborGroup

!arrayHborGroupIndex = !arrayHborClleTotal.EVALUATE(OBJECT BLOCK(‘!EVALINDEX.real()’))
!arrayHbor.sort()
!arrayHbor.REINDEX(!arrayHborGroupIndex)

!arrayOutput = !arrayHbor.EVALUATE(OBJECT BLOCK(‘!arrayHbor[!EVALINDEX] + !stringSep + !arrayHborClleTotal[!EVALINDEX]’))
!outputDataWithHeading[1] = ‘Diameter’ + !stringsep + ‘Length’
!outputDataWithHeading.appendarray(!arrayOutput)

———————————————–
q var !outputDataWithHeading

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.