reworded unitcheck questions

This commit is contained in:
2019-12-06 20:58:11 +01:00
parent 6dd18d6d9e
commit 7371c969cf
2 changed files with 11 additions and 11 deletions

View File

@@ -176,7 +176,7 @@
) )
; --------------------------------- unitCheck -------------------------------- ; ; --------------------------------- unitCheck -------------------------------- ;
;CHeck units with measurement, change if wrong ;Check units with measurement, change if wrong
(defun unitcheck (/ setunits selectioncycling currunit domeasure testdist dochange newunit newunitnum) (defun unitcheck (/ setunits selectioncycling currunit domeasure testdist dochange newunit newunitnum)
(setq setunits (getvar "insunits")) (setq setunits (getvar "insunits"))
(setq selectioncycling (getvar "selectioncycling")) (setq selectioncycling (getvar "selectioncycling"))
@@ -206,21 +206,21 @@
((= setunits 21) (setq currunit "US Survey Feet")) ((= setunits 21) (setq currunit "US Survey Feet"))
) )
(initget 1 "Accept Change") (initget 1 "Accept Verify")
(setq domeasure (getkword (strcat "Current units: " currunit " \n[Accept/Change]"))) (setq domeasure (getkword (strcat "Current units: " currunit " \n[Accept/Verify]")))
(princ domeasure) (princ domeasure)
(if (if
(= domeasure "Change") (= domeasure "Verify")
(progn (progn
(setvar "selectioncycling" 0) (setvar "selectioncycling" 0)
(setq testdist (getdist "\nMeasure now")) (setq testdist (getdist "\nMeasure now"))
(setvar "selectioncycling" selectioncycling) (setvar "selectioncycling" selectioncycling)
(initget 1 "Yes No") (initget 1 "Yes No")
(setq dochange (getkword (strcat "Measurement: " (rtos testdist) " " currunit "\nChange unit? [Yes/No]"))) (setq dochange (getkword (strcat "Measurement: " (rtos testdist) " " currunit "\nAccept? [Yes/No]")))
(if (if
(= dochange "Yes") (= dochange "No")
(progn (progn
(initget 1 "Inches Feet Millimeters Centimeters Decimeters Meters") (initget 1 "Inches Feet Millimeters Centimeters Decimeters Meters")
(setq newunit (getkword "Select new unit: [Inches/Feet/Millimeters/Centimeters/Decimeters/Meters]")) (setq newunit (getkword "Select new unit: [Inches/Feet/Millimeters/Centimeters/Decimeters/Meters]"))

View File

@@ -27,21 +27,21 @@
((= setunits 21) (setq currunit "US Survey Feet")) ((= setunits 21) (setq currunit "US Survey Feet"))
) )
(initget 1 "Accept Change") (initget 1 "Accept Verify")
(setq domeasure (getkword (strcat "Current units: " currunit " \n[Accept/Change]"))) (setq domeasure (getkword (strcat "Current units: " currunit " \n[Accept/Verify]")))
(princ domeasure) (princ domeasure)
(if (if
(= domeasure "Change") (= domeasure "Verify")
(progn (progn
(setvar "selectioncycling" 0) (setvar "selectioncycling" 0)
(setq testdist (getdist "\nMeasure now")) (setq testdist (getdist "\nMeasure now"))
(setvar "selectioncycling" selectioncycling) (setvar "selectioncycling" selectioncycling)
(initget 1 "Yes No") (initget 1 "Yes No")
(setq dochange (getkword (strcat "Measurement: " (rtos testdist) " " currunit "\nChange unit? [Yes/No]"))) (setq dochange (getkword (strcat "Measurement: " (rtos testdist) " " currunit "\nAccept? [Yes/No]")))
(if (if
(= dochange "Yes") (= dochange "No")
(progn (progn
(initget 1 "Inches Feet Millimeters Centimeters Decimeters Meters") (initget 1 "Inches Feet Millimeters Centimeters Decimeters Meters")
(setq newunit (getkword "Select new unit: [Inches/Feet/Millimeters/Centimeters/Decimeters/Meters]")) (setq newunit (getkword "Select new unit: [Inches/Feet/Millimeters/Centimeters/Decimeters/Meters]"))