2014-11-20 02:27 PM
area = GLOB_ID n = SPLIT (area, "%n", num) Text2 0, 0, numso, the value "num" was supposed to be that "real numebr" which could be multiplied, sumed etc...
2014-11-20 04:35 PM
2014-11-20 06:46 PM
2014-11-21 09:56 AM
area = "7,35" !area = GLOB_ID ! Object ID is now also 7,35 n = SPLIT (area, "%n,%n", num1, coma, num2) number = num1 + num2 Text2 0, 0, number ! Should be 7+35=42When AREA is typed in the code by hand as text consisting "7,35" it works, the answer is 42 ( =7+35),
2014-11-21 09:08 PM
HOTSPOT2 0,0 CIRCLE2 0,0,0.10 area = GLOB_ID num1 = 0 num2 = 0 n = SPLIT (area, "%n %n", num1, num2) TEXT2 0, 0, STR(num1,4,2) IF n=1 THEN numSum = "double of ID: " + STR(num1*2,4,2) ELSE numSum = "sum of numbers in ID: " + STR(num1+num2,4,2) ENDIF ADD2 (STW(STR(num1*2,4,2))/1000*GLOB_SCALE)*(n>1) + 0.50,0 IF n > 1 THEN TEXT2 0, 0, STR(num2,4,2)+"<-- second value" DEL 1 ADD2 0,-0.50 TEXT2 0, 0, numSum DEL 1You can type in the ID field:
n = SPLIT (area, "%n,%n", num1, sep, num2)You'll see it reads two values. Have you tried %^n as I said?
2014-11-25 01:41 PM
!---------------- Master Script ------------ area = GLOB_ID num1 = 0 num2 = 0 n = SPLIT (area, "%n %n", num1, num2) PARAMETERS area_schedule = num1 area_text = STR(num1,4,2) IF n=1 THEN numSum = "double of ID: " + STR(num1*2,4,2) ELSE numSum = "sum of numbers in ID: " + STR(num1+num2,4,2) ENDIF- 2D Script:
HOTSPOT2 0,0 CIRCLE2 0,0,0.10 TEXT2 0, 0, area_text ADD2 0,-0.50 TEXT2 0, 0, numSum DEL 1- Parameter Script:
lock "area_schedule"and a schedule where I ask for the custom Parameter "area_schedule" to be listed and sumed up.... and it doesn't work, only 0,00 are shown although the object itself shows that "num1" is a real number like 24,5 (for ID=24.5)
PARAMETERS area_schedule = num1to
PARAMETERS area_schedule = 5*6
2014-11-25 01:57 PM
2014-11-25 04:11 PM
philips wrote:Change the parameter type to Length type. Should work.
What am I missing ?