$
$*********************************************      basics
$
&title Test of The Element String Function
&dimen -dimen feet kips
&device -oecho no
$
$*********************************************      read model
$
inmodel
$
$*********************************************      add a connector
$
medit
    ~CHAIN b_cat 50 -tab_lim 300  -len 200 -clum 20
    ~CHAIN b_cat 50 -tab_lim 300  -len 156 -dep 31
    CONNECTOR  clu  ~CHAIN  *j1      -ANC 180 35
end
$
$*********************************************      summaries
$
&summ
    point
    class
    beam
    plate
end
$
$*********************************************      element status
$
&cutype Checking Element/Class Status
&loop type (  element f_element class )
   &set w = &status %type tube -hard
   &type %w
   %w
&endloop
$
$*********************************************      class sfun
$
&type Class String Function
&type =====================
&type
&loop action  ('ELEMENTS' 'N_SEGMEN' 'TYPE    ' 'DIMENSIO' 'FRICTION'  \
               'DENSITY ' 'EMODULUS' 'SPGRAVI ' 'ALPHA   ' 'FYIELD  '  \
               'POI_RATI' 'TENSTREN' 'B_TENSI ' 'WTPLEN  ' 'DISPLEN '  \
               'BUOYDIA ' 'DRAGDIA ' 'WINDDIA ' 'AMASDIA ' 'CLUMP   '  \
               'SECTION ' 'PERLENG ' 'LENGTH  ' 'REFINE  ' 'RDES    '  \
                          'POINTS  ' 'REFEREN ' 'T_STIFF ' 'L_STIFF '  \
               'CFB     ' 'F_TYPE  ' 'R_SPACE ' 'P_FY    ' 'M_P     '  \
               'ETA     ' 'P_N     ' 'SCF     ' 'SN      ' 'NAME_DIM'  \
               'NAME_SEG' )
   &loop c ( ~tube ~plate ~w ~chain )
     &set first = class &format(a8 %c) &format(a8 %action)
     &type %first &class(%action %c 1)
   &endloop
&endloop
$
$*********************************************      element sfun
$
&type Element String Function
&type =======================
&type
&type en_nodes = &element(en_nodes *j1 *j2 )
&loop action  ('EN_NODES'                                             \
               'CLASS   ','BLENGTH ','STRW_USE','WEIGHT  ','BUOYANCY',\
               'DCOSINES','LENGTH  ','SEG_LENG','CATEGORY','ELE_TYPE' \
               'SN      ','SCF     ','J_SCF   '                       \
               'RATIO   ','STRESS  ','CDR     ','NODES   ','RELEASES' \
               'E_COORDI','OFFSETS '                                  \
               'L_OD_T  ','CFB     ','KFACT   ','LAMBDA  '            \
               'HAS_P-D ','FLOODED ','CM      '                       \
               'AREA    ','CENTROID','THICKNES','WIDTH   ','SUBELEME' \
               )
   &loop ele ( tube w pl3 clu)
      &set first =  ele &format(a8 %ele) &format(a8 %action)
      &set sec   = &element(%action %ele)
      &type %first %sec
   &endloop
&endloop
$
$*********************************************      subelement sfun
$
&type Subelement String Function
&type ==========================
&type
&loop action  ( 'RATIO   ' 'stress' 'CDR     ' 'NODES   ' 'RELEASES'  \
               'E_COORDI' 'OFFSETS ' )
   &loop ele ( &element(subelement pl4 )  )
      &set first =  subele &format(a8 %ele) &format(a8 %action)
      &set sec   = &subelement(%action %ele)
      &type %first %sec
   &endloop
&endloop
$
$*********************************************      all done
$
&fini
