Evaluate Diameters used in PDMS

–By me_hungry & Nightscreamer

var !refBranMem coll ALL BRAN mem for CE


!aRealBore = ARRAY()
!aErrors = ARRAY()
do !refBranMemVal values !refBranMem
var !ppoint coll ALL ( PTCAR PTAXIS PTMIX PTPOS ) WITH ( NOT UNSET( PBOR ) AND NOT UNSET( PCONN ) AND NOT(PBORE eq ‘0’)) FOR PTREF OF $!refBranMemVal
do !ppointValue values !ppoint
!stringPbore = PBORE OF $!ppointValue
!expression = object EXPRESSION( !stringPbore )
handle any
!aErrors.append(!stringPbore & ‘for’ & !ppointValue )
skip
endhandle
!aRealBore.append(!expression.evaluate(!refBranMemVal.dbref()))
enddo
enddo
$p Diameters:
q var !aRealBore.unique().sort()
if(!aErrors.size().eq(0).not())then
$p Cant calculate expressions:
q var !aErrors
endif

——Output ——-

Diameters:

<ARRAY>
[1] <REAL> 15
[2] <REAL> 25
[3] <REAL> 40
[4] <REAL> 50
[5] <REAL> 80
[6] <REAL> 100
[7] <REAL> 150
[8] <REAL> 200
[9] <REAL> 250
Cant calculate expressions:

<ARRAY>
[1] <STRING> ‘DESIGN PARAM 1for=15192/679528’

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s