APDL: Create labels by do-loop shows strange behaviour
I would like to place several labels/anntoations on plots generated by APDL macro (ANSYS 18.2).
The number and content of the labels is determined during runtime. Therefore, I would like to issue a *DO-Loop to create the labels from strings which have been stored into an array of strings before. However, I have made the experience that the loop does not work properly. I would like to illustrate this by the following minimal example, which applies an array of strings of fixed size.
*do, step_no, 1, 3
/tlabel,-1, -0.98+0.03*(3-step_no), %parts(1,step_no)%
During the runtime, one can very shortly see that all three labels are generated with the correct content, but finally all three labels show the last string ('text3'), as shown in the attached figure (left side).
However, the output of the macro shows the correct annotations.
SET PARAMETER DIMENSIONS ON PARTS TYPE=STRI DIMENSIONS= 60 3 1
PARAMETER PARTS(1,1) = text1
PARAMETER PARTS(1,2) = text2
PARAMETER PARTS(1,3) = text3
*DO LOOP ON PARAMETER= STEP_NO FROM 1.0000 TO 3.0000 BY 1.0000
PARAMETER STRLABEL(1) = text1
ANNOTATION TEXT AT -1.000,-0.920 IS text1
*ENDDO INDEX= STEP_NO
PARAMETER STRLABEL(1) = text2
ANNOTATION TEXT AT -1.000,-0.950 IS text2
PARAMETER STRLABEL(1) = text3
ANNOTATION TEXT AT -1.000,-0.980 IS text3
If the labels are created manually (without loop), the content of all labels is ok, as shown on the right side of the attached figure.
/tlabel,0, -0.92, %parts(1,1)%
/tlabel,0, -0.95, %parts(1,2)%
/tlabel,0, -0.98, %parts(1,3)%
Does anyone know a solution for this issue?