Hi can you guys help me with this routine? it looks like "reinventing the wheel" but this one make a rectangular revision cloud by first asking the user for arc distances, then for the Revision cloud style. Then the user picks 2 points and there goes the revision cloud. Then reason is that we use this either in paper/model space
My problem is that i want the value of distance 1 to show while inputing distance 2. While Dis1 value is shown, the user can either press enter or input another value provided that the value should be equal or greater than Dis1
this code forces the user to enter a value for Dis2, not accepting the shown value of Dis1
and after the routine is done and i want to repeat all, how can the code remember the Dis1 and Dis2 values so the user doesn't need to enter the values again?
(defun c:try (/ Dis1 Dis2 pt1 pt2 obj )
(setq old_osm (getvar "OSMODE"))
(setvar "osmode" 0)
(setvar 'cmdecho 0)
(setq PLW (getvar "plinewid"))
(setvar "plinewid" 0)
(initget (+ 1 2 4))
(while (= Dis1 nil)
(setq Dis1 (getreal "\nMin Arc Distance: "))
)
(while (= Dis2 nil)
(setq Dis2 (getreal (strcat"\nMax Arc Distance: <" (rtos Dis1) "> ")))
)
(setq cont T)
(while cont
(setq cont nil)
(initget "Normal / Calligraphic")
(setq kw (getkword "\nRevcloud Style \nSelect option [ Normal / Calligraphic ] <Normal>:"))
(if (not kw) (setq kw "Normal"))
(cond
((= kw "Normal") (C:RV_Normal))
((= kw "Calligraphic") (C:RV_Calligraphic))
)
)
(setq Dis1 nil)
(setq Dis2 nil)
(setvar "plinewid" PLW)
(setvar "cmdecho" cmd1)
)
(defun c:RV_Normal ()
(setq pt1 (getpoint "\nFirst corner of revison cloud: "))
(setq pt2 (getcorner "\nDiagonal corner of revision cloud " pt1))
(command "._RECTANG" pt1 pt2)
(setq obj (entlast))
(command "._revcloud" "style" "n" "ARC" Dis1 Dis2 "OBJECT" obj "" )
)
(defun c:RV_Calligraphic ()
(setq pt1 (getpoint "\nFirst corner of revison cloud: "))
(setq pt2 (getcorner "\nDiagonal corner of revision cloud " pt1))
(command "._RECTANG" pt1 pt2)
(setq obj (entlast))
(command "._revcloud" "style" "C" "ARC" Dis1 Dis2 "OBJECT" obj "")
)
(princ)