- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Recently migrated to 2016 and the following bubble routine I'm not able to get working
(DEFUN bentcl ()
;;; To draw circle ;;;
(Defun MKCIRC ()
(Command "CIRCLE" gfpt2 gfrad1)
)
;;; To draw ellipse ;;;
(DeFun MKELL ()
(Command "ELLIPSE" "_C" gfpt2 gfpt3 gfpt6)
)
(Setq dimscl (GetVar "DIMSCALE")
gfsnp1 (GetVar "osmode")
gfth1 (GetVar "TEXTSIZE")
gfth2 (* 0.125 dimscl)
txtclr (getvar "DIMCLRT")
gflyr1 (GetVar "CLAYER")
gfrad1 (* 0.1875 dimscl)) ; <--Set bubble radius here
(SetVar "OSMODE" 1)
(Command "LAYER" "M" "GRIDMARKS" "C" txtclr "" "")
(Setq gfpt1 (GetPoint "\n Pick \"NEAR\" the END of the LINE you want bubble on :"))
(Princ "\n Previous Text Was ---> ") (Princ *GFTXT1*)
(SetVar "OSMODE" 0)
(Setq *GFTXT1* (GetString T "\n Enter New Text : ")
gflen1 (Strlen *GFTXT1*))
(PROMPT "\n Where do you want to draw the bubble?")
(STRD "\n (A)bove (L)eft (B)elow (R)ight" quad)
(Setq quad VAR);;; I figure it error here because STRD is not a Lisp command but can't figure how to rewrite it to get the keyword entry to set to "quad" ;;;
(IF (= quad (strcase "R")) (Setq gfang1 0.0))
(IF (= quad "A") (Setq gfang1 90))
(IF (= quad "L") (Setq gfang1 180))
(IF (= quad "B") (Setq gfang1 270))
(IF (= quad (strcase "R")) (Setq gfang2 90))
(IF (= quad "A") (Setq gfang2 0.0))
(IF (= quad "L") (Setq gfang2 90))
(IF (= quad "B") (Setq gfang2 0.0))
(IF (= quad (strcase "r")) (Setq gfang1 0.0))
(IF (= quad "a") (Setq gfang1 90))
(IF (= quad "l") (Setq gfang1 180))
(IF (= quad "b") (Setq gfang1 270))
(IF (= quad (strcase "r")) (Setq gfang2 90))
(IF (= quad "a") (Setq gfang2 0.0))
(IF (= quad "l") (Setq gfang2 90))
(IF (= quad "b") (Setq gfang2 0.0))
(Setq gfpt2 (Polar gfpt1 (DTR gfang1) (* 0.3125 dimscl)); <--Locate text insert here
gfpt3 (Polar gfpt1 (DTR gfang1) (* 0.125 dimscl))); <--Set length of Extension Line here
(Command "LINE" gfpt1 gfpt3 "")
(Command "TEXT" "_M" gfpt2 gfth2 gfang2 *GFTXT1*)
(Setq gfent1 (EntGet (EntLast))
gfpt4 (cdr (Assoc 10 gfent1))
gfpt5 (cdr (Assoc 11 gfent1))
gfdist1 (Distance gfpt4 gfpt5)
gfdist2 (* gfdist1 1.25)
gfpt6 (Polar gfpt2 (DTR gfang2) gfdist2))
(If (> gflen1 3) (MKELL) (MKCIRC))
;;; Reset System ;;;
(SetVar "OSMODE" gfsnp1)
(Setvar "TEXTSIZE" gfth1)
(SetVar "CLAYER" gflyr1)
(Princ)
)
Solved! Go to Solution.