HI All
I'm trying to draw a "tadpole/fall indicator", then rotate it to the angle the user wants on the screen, then scale to the size the user wants on the screen.
(defun DRAW_TAD ( / TAD_LOC cmde osmd)
(setq cmde (getvar "cmdecho"))
(setq osmd (getvar "osmode"))
(setvar "cmdecho" 0)
(Command "Layer" "T" "CP Ext Fall Indicator" "")
(Command "Layer" "m" "CP Ext Fall Indicator" "colour" "T" "2,130,0" "CP Ext Fall Indicator" "")
(setvar "osmode" 0)
(command "_.layer" "_set" "0" "") ;; make the tadpole look like temp graphics
(command "_color" "yellow" "") ;;
(command "_linetype" "_s" "hidden" "") ;;
(command "pline" "0,0" "0,1" "-0.22,1.4" "0.32,1.56" "-0.42,1.74" "0.60,2.00" "-0.6,2.0" "")
(setq TAD_LOC (getpoint "\nSelect Tadpole insertion point :"))
(command "move" "l" "" "0,0" TAD_LOC "")
; (setq TAD (entget (entlast))) ;; not used cause it blew my mind trying to figure out midpt
(command "rotate" "l" "" TAD_LOC "r" "90" pause )
(command "scale" "l" "" TAD_LOC "r" TAD_LOC pause pause)
(Command "chprop" "l" "" "LA" "CP Ext Fall Indicator" "")
(Command "chprop" "l" "" "C" "bylayer" "")
(Command "chprop" "l" "" "LT" "bylayer" "")
(command "pedit" "l" "W" "0.05" "")
(command "_linetype" "_s" "bylayer" "") ; return back to normal
(command "_color" "bylayer" "") ; return back to normal
(setvar "cmdecho" cmde)
(setvar "osmode" osmd)
(princ)
) ; end defun
The above works, but I'd prefer to be able to use the midpoint of the last segment of the polyline as the second scale reference point, but i'm struggling. I hope that makes sense...
Any help would by greatly appreciated.