I have issues in the following Script in AC 21:
When I uncomment one of the commented lines, I get different error messages in each case.
Because the values of the variables myText1 and myText2 are coming from a Textimport by INPUT,
their variable type is not known. But the types must be known to get the Strings lenght in case of numbers
and to be able to add the variable str_TEXT_trenner to build a String expression.
Any help?
str_TEXT_trenner = ” – ”
DEFINE STYLE “textfeld_stil_2” “Arial”, 0.25, 1, 0
SET STYLE “textfeld_stil_2”
myText1 = “Textinhalt”
IF VARTYPE(myText1) = 2 THEN Text_Inhalt1 = myText1 + str_TEXT_trenner ! STRING
! IF VARTYPE(myText1) = 1 THEN Text_Inhalt1 = STR(myText1, 1, 0) + str_TEXT_trenner ! NUMBER
myText2 = 23
! IF VARTYPE(myText2) = 2 THEN Text_Inhalt2 = myText2 + str_TEXT_trenner ! STRING
IF VARTYPE(myText2) = 1 THEN Text_Inhalt2 = STR(myText2, 1, 0) + str_TEXT_trenner ! NUMBER
feldbreite_1 = STW(Text_Inhalt1)/1000*A_
feldbreite_2 = STW(Text_Inhalt2)/1000*A_
TEXT2 0, 0, Text_Inhalt1
TEXT2 0, -0.1, Text_Inhalt2
GDL Object Developer
b-prisma
MAC OSx 10.14