To make it completely editable you will need to comment out the lines in the script that refer to the C parameter.
Then create a text parameter "C" in the parameter list.
Now in your object you can type any value you want - but it will not change automatically as you move the object.
hotspot2 0,0
hotspot2 a,0
PEN epn
LINE2 -0.5, 0.0, a, 0.0
PEN cpn
LINE2 0.0, 0.0, -0.4, 0.4
LINE2 -0.4, 0.4, 0.4, 0.4
LINE2 0.4, 0.4, 0.0, 0.0
DEFINE STYLE "AC_STYLE_1" "arial",
100*tsize/a_, 7, 0
pen tpn
SET STYLE "AC_STYLE_1"
!!C=""
!!C=str(int((y~*100)+.5)/100,3,2)
TEXT2 0.0, 0.377143, "C "+C
If you want the best of both worlds you can add a boolean (on/off) parameter to switch between automatic and maual input.
Create a boolean parameter called "auto_input".
Also create a text parameter called "manual_text"
Then change your script to this.
hotspot2 0,0
hotspot2 a,0
PEN epn
LINE2 -0.5, 0.0, a, 0.0
PEN cpn
LINE2 0.0, 0.0, -0.4, 0.4
LINE2 -0.4, 0.4, 0.4, 0.4
LINE2 0.4, 0.4, 0.0, 0.0
DEFINE STYLE "AC_STYLE_1" "arial",
100*tsize/a_, 7, 0
pen tpn
SET STYLE "AC_STYLE_1"
if auto_input = 1 then
C=""
C=str(int((y~*100)+.5)/100,3,2)
else
C = manual_text
endif
TEXT2 0.0, 0.377143, "C "+C
Now in the parameters you will have a switch where you can change between automatic or manual input.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11