I know there is a way to collect all the attribute names of any given element into an array
!x1 = !!ce.attributes()
Is there a way other than looping through each attribute name to collect the value of each attribute ?
Thanks
I know there is a way to collect all the attribute names of any given element into an array
!x1 = !!ce.attributes()
Is there a way other than looping through each attribute name to collect the value of each attribute ?
Thanks
please see below for a simple loop where values of each attribute is stored in !x2 variable
!x1 = !!ce.attributes()
!x2 = object array()
do !strAttrib values !x1
!varAttrib = $!strAttrib
!x2.append(!varAttrib)
!varAttrib.delete()
--delete the !varAttrib variable to make way for the next type
enddo
but normally, i prefer ATTLIST as it will give all the attributes including UDA
!x1 = !!ce.ATTLIST
!x2 = object array()
do !strAttrib values !x1
!varAttrib = $!strAttrib
handle any
-- I don't know about this as some of the result of atttlist is truncated and it will give syntax error (example GRADE attribute of GENSEC will be GRAD)
!varAttrib = 'ERROR IN EXTRACTING ATTRIBUTE'
endhandle
!x2.append(!varAttrib)
!varAttrib.delete()
--delete the !varAttrib variable to make way for the next type
enddo