I have come across a strange issue. I am trying to delete an element 'element1' and it's children in a dimension and I have looped them. When I write to a file without 'DimensionElementDelete', all the elements are written to file. But when I use the 'DimensionElementDelete', only alternate elements are deleted and only those deleted are written in the file. We use 10.2.2 FP7. Has anyone seen this before? any help is appreciated.
Thanks,
Paul.
Code: Select all
pDim = 'DimensionNm' ;
x =1 ;
WHILE(x <= DimSiz( pDim ) ) ;
element = DimNM( pDim ,x) ;
if ( SUBST(element , 1, 5) @= element1 );
asciiOutPut( degugFile , pDim, 'pDimensionSize ', numberToString ( x ), element ) ;
DimensionElementDelete(pDim, element );
#After adding the line below, deleted all the elements vs alternate elements are deleted
x = x - 1;
# the above line would make the session hung if 'DimensionElementDelete' is not commented.
asciiOutPut( degugFile , pDim, 'deleted Element', element ) ;
endif;
x = x + 1;
END;