well, if you want to have the cake and eat it then you'll have to make the following changes:
1. I added this section at the beginning in case the text style does not exist and you can define all the style settings here:
; set text style name
(setq txtsty "TEXT-ARIAL"
txtfnt "Arial.ttf"
txthit 2
txtwid 1
)
2. Change your action statements to include saving of the selected text string from the list box as d1* before converting it to floating number of RW*:
; (action_tile "d1" "(setq RW* (atof (nth (atoi $value) d1)))")
; (action_tile "d2" "(setq RW* (atof $value))")
(action_tile "d1" "(setq RW* (atof (setq d1* (nth (atoi $value) d1))))") ; save selection as d1* and conversion as RW*
(action_tile "d2" "(setq RW* (atof (setq d1* $value)))")
3. Add the Text sequence at the end using the d* value:
; add text
(if (not (tblsearch "STYLE" txtsty)) ; chk if style exists
(command "_.Style" txtsty txtfnt txthit txtwid "" "" "") ; then create it
)
(command "_.Text" "_S" "TEXT-ARIAL" "_J" "_L" p1 (cvunit (+ ang (/ pi 2)) "radian" "degree") d1*) ; d1* selection apply as text
