![]() Lt ( if ( assoc 6 ed ) ( assoc 6 ed ) ' ( 6. "CIRCLE" )))) ( while ( setq en ( ssname ss 0 )) ( setq ed ( entget en ) Turns Selected Circles into filled donuts David Bethel ( defun c:cir2donut ( / ss en ed ce ev ra la lt tk cl ) ( and ( setq ss ( ssget ' (( 0. It’s set up for Yes to be the default, so Enter will be taken as “Yes,” but could be done differently, to either have No as the default, or to require an explicit non-Enter answer.ĭo you mean to select a circle and fill it with a solid? The (initget)/(getkword) approach will ask the question again, until it gets a valid answer.Ī lesser advantage is that it will return “Yes” whether the User types “Y” or “y” or “Yes” or “yes” or even “Ye” or “yE,” and similarly with case differences and number of letters in answering “No” - as long as it starts with the capitalized letter(s) in (initget) and if it continues, doesn’t do so with any character(s) that are NOT a continuation of the word there, regardless of case, it will return the word in the case combination it has there. In Murra圜’s code, if you INTEND to answer “Yes,” but accidentally hit some adjacent key instead, it will take any of those as a “No,” and you’ll need to follow up by erasing the Solid separately. ![]() ![]() The big advantage of (initget)/(getkword) is that it WON’T ACCEPT invalid answers to its question. (command “_.erase” solid “”) or (entdel solid) (if (/= (getkword “\nDo you want to erase the Solid ? : “) “No”)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |