Hi,
I had another look at this. Make sure to unselect non-structural elements like surface-elements before trying to get the PRERR-item, also this command need the graphics from an element-plot to work. This will work in the /graphics,full-mode only. The command snippet below will work for a shell model with 181-type elements. It's likely easy to adjust for your needs, depending on your APDL-knowledge of course.
[pre]
/post1
! enter the post processor
set,first
! first result set
esel,S,ename,,181
! select only your structural elements
/GRAPHICS, FULL
! Turn on full graphics
eplot ! plot elements[/indent]
*get,U,PRERR,0,SENSM
! get the error energy of the selected elements
*get,e,PRERR,0,SERSM
! get the strain energy of the selected energy
MY_SEPC=100*SQRT(e/(e+U))
! normalize the energy error against the strain energy
! N.B keep the MY_-prefix to force Mechanical to put the
! result in the Results cell of the Details view of your Command-snippet
PRERR
! Put the SEPC in the output-file, now compare the calculated MY_SEPC to this to check that our calculated value is correct.
allsel
! Select everything so you don't F*** up subsequent results in the Solution branch
finish
! Exit /post1 nicely
[/pre]
Hope this helps
/petb