I think you're just missing one small part:
(if (setq tmp (getkword (strcat "\nChoose [10/20/30] <" global:ans ">: ")))
(setq global:ans tmp)
(setq tmp global:ans);<-Add this to set tmp variable to the default variable if the user just hits ENTER.
)
To add to the above answer. I can't remember asking but what are your LISP abilities like?
- Select text using entsel or ssget with (ssname ss n) to get the entity name, entget that to get the definition
- Check you are processing a text entity
- Use assoc and the entget, value 1 to get the text string
- Then you can work out the increment portion
- repeat the fuirst steps again to select the next text and use entmod to update the text
See this page. You can open your list of aliases on the Manage ribbon or with the ai_editcustfile command, which allows you to edit your acad.pgp file. Or you can open the file directly.
I thought there was an option on the customization menu to edit the aliases, but apparently not.
Let us know if you need more help.
What is the size of the rectangle? What is the height of the text style? Are those properties consistent? Where can the text be placed in the rectangle: in a column, in a row, at the corners, along the edges? Could you make it all into a block with attributes and arrange it once instead of using a function?
Welcome to the forum.