Hi LISPers.
I have 2 codes that I wish to combine.
Code 1: draws a revcloud
Code 2: Automatically starts a pick points hatching command with the hatch criteria all dialed in.
Can I please get a hand simply combining these two lisp codes.
Still new to lisp and having trouble stitching them in together.
Also, in code 1, if there is a way to remove the prompt for 'Reverse direction: Yes/No' that comes up when the revcloud is drawn unclosed that would be great.
Would prefer to say 'No' to reversing.
P.s. shout out to @komondormrex for previous help with code 2. 👍
Code 1 (to run first):
(defun c:RCLD3 ( / )
(prompt "\nDraw a revision cloud (Normal style, Freehand, arc length = 200)...")
(command "_.revcloud"
"style" "normal" ;; force Normal style
"arc" "200" "200" ;; min = 200, max = 200
"f" ;; Freehand mode
pause ;; let user draw the cloud
)
(princ)
)
Code 2:
(defun c:ERH-KOMO-MULTIPICK ( / oldce oldlay oldhpname oldhpscale oldhpang oldhplayer lay)
;; Save environment & hatch defaults
(setq oldce (getvar "CMDECHO"))
(setq oldlay (getvar "CLAYER"))
(setq oldhpname (getvar "HPNAME"))
(setq oldhpscale (getvar "HPSCALE"))
(setq oldhpang (getvar "HPANG"))
(setq oldhplayer (getvar "HPLAYER"))
(setvar "CMDECHO" 0) ; quiet mode
(setq lay "Earth Hatch 2")
;; Ensure layer exists and is colour 11
(if (tblsearch "LAYER" lay)
(vl-cmdf "_.-LAYER" "C" "11" lay "")
(vl-cmdf "_.-LAYER" "N" lay "C" "11" lay "")
)
;; Temporarily make Earth Hatch 2 current
(setvar "CLAYER" lay)
;; Start hatch with full property setup
(vl-cmdf
"_-HATCH"
"_Properties" "EARTH" "35" "45"
"_Layer" lay
"_Color" "11" ;; <- force hatch colour to 11, independent of HPCOLOR
;;;"_PickPoints" ; komondormrex
"" ; komondormrex
"_k" ; komondormrex
)
(command "_si" ename "") ; komondormrex
;;; Allow multiple picks until user presses Enter
(while (= 1 (getvar "CMDACTIVE"))
(command pause)
)
;; Restore hatch defaults
(if oldhpname (setvar "HPNAME" oldhpname))
(if oldhpscale (setvar "HPSCALE" oldhpscale))
(if oldhpang (setvar "HPANG" oldhpang))
(if oldhplayer (setvar "HPLAYER" oldhplayer))
;; Restore previous layer and CMDECHO
(setvar "CLAYER" oldlay)
(setvar "CMDECHO" oldce)
(princ)
)