A couple of choices rather than initget
(if (not AH:Butts)(load "Multi Radio buttons.lsp"))
(if (= but nil)(setq but 1))
(setq ans (atof (nth 0 (ah:butts but "v" '("Choose 1: " "1" "0.75" "0.5" "0.25" "0.1" )))))
remembers last picked.
Another by lee-mac
(if (not LM:LISTBOX)(LOAD "ListBoxV1-2.lsp")
(setq lst (list "1" "0.75" "0.5" "0.25" "0.1" ))
(LM:LISTBOX "choose" lst 2)
Yes there are more things to do with this code but I would like this to be a learning example, getint is the next step or see image below.
see last post
More advanced next step.
The differences that catch my eye are the c : prefix to allow command line invocation, as well as one of the functions having passed variables.
This was precisely what I was looking for. Thank you very much to all three of you.
In addition to @rkmcswain excellent answer above, look at these two functions, and spot the differences
(defun function_name (passed vars / local_vars)
expressions
)
(defun C:function_name ( / local_vars)
expressions
)
Again can you post an english translation of the command prompt that you think wants the "width" input? No other way to figure out what's happening.
Annotative text wouldn't ever need "Height" entered, if your code included Height in the Text command call that would cause an issue. It would have the same issue with any Text Style that had a Height not set to 0.
Test the Height of the current text style in your code with:
(cdr (assoc 40 (tblsearch "style" (getvar "textstyle"))))
If include Height
or don't include Height