@Kent1Cooper
Thank you Kent! That works perfectly. I will post here for others benefit.
@Sea-Haven
Sea Haven, I am looking at a manufactures spec sheet for pipe fittings (in this case). I'm just reading off a spreadsheet on the spec page. Diameter A = "", Diameter B= "", Diameter C="", Etc. for a given size of pipe. Using Kent's approach I can just follow the row on the spread sheet, and key in each diameter (not necessarily in consecutive order). All I need is a set of concentric circles with specified diameters. None of my vendors specify pipe, or tube or rod, or bolts, or really anything else by radius. We always get diameters. I'm not coding in to the routine any pre-set values.
My workflow can now be 6.25 <enter> 7.125 <enter> 8.96 <enter> 9.5 <enter> ... and <enter> to complete the set of concentric circles. This is a good time saver. Thank you for your suggestions as well.
This is what is working for me.
;; Concentric Circles Defined by Center Point and Radius or Diameter Definition
;; Created by Kent Cooper 2021
;; This routine repeats the CIRCLE command an until empty input is supplied at the command line <enter key> initiates an exit.
;; All circles are defined by keyboard entry of the next circle's diameter or radius (user's choice).
;; User's choice of circle definition (CCdef) will be used for all consecutive circles (ie. all diameters entered).
;; The next time the routine is called the user is presented with the choice of radius or diameter definitions again.
(defun C:CONCIRC (/ pt dist)
(initget 6 "Diameter Radius"); no 0, no negative [don't disallow Enter]
(setq CCdef ; global variable
(cond
( (getkword
(strcat
"Options [Diameter/Radius] <"
(cond (CCdef) ("Radius"))
; [current value default if present, otherwise Radius]
">: "
); strcat
); getkword
); end User-input condition
(CCdef); current value default if present on Enter
("Radius"); initial default [Enter on first use]
); cond & CCdef
pt (getpoint "\nSELECT CENTER POINT")
); setq
(while
(setq dist
(getdist (strcat "\nNext Circle " CCdef " <exit>: "))
); setq
(command "_.circle" "_non" pt
(if (= CCdef "Radius") dist (/ dist 2))
); command
); while
(princ)
)
Hope this helps someone else!