- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
we have a lisp called LDS that creates a splined line with arrow head for callouts.
is there a line someone could add in to make it automatically spline?
also, a bug i just noticed that if my midpoint selection is off then it snaps to the base corner instead of the midpoint of the arrow head. not a issue really but something i noticed.
(gc)
(COMMAND "COLOR" "BYLAYER")
(defun c:11(/ p1 p2 p3 p4)
(command "color" "CYAN")
(gc)
(setvar "cmdecho" 0)
(command "color" "CYAN")
(while (setq p1(getpoint "\nLeader start: "))
(initget 1)
(setq p2(getpoint p1 "\nNext point: "))
(if (> (distance p1 p2) (* (getvar "dimasz")(getvar "dimscale")))
(progn
(setq p3(polar p1 (angle p1 p2)
(* (getvar "dimasz")(getvar "dimscale")))
)
(setq p4(polar p3 (+ (angle p1 p2) (* 1.5 pi))
(/ (* (getvar "dimasz")(getvar "dimscale")) 6.0))
)
(command "solid" p4 (polar p4 (+ (angle p1 p2) (* 0.5 pi))
(/ (* (getvar "dimasz")(getvar "dimscale")) 3.0)) p1 p1 ""
)
(command "line" p3 p2 "")
)
(command "line" p1 p2 "")
)
(setq ss1(ssadd))
(setq ss1(entlast))
(setq p1 p2)
(setq ss(ssadd))
(prompt " add ok")
(while (setq p2(getpoint p1 "\nNext point: "))
(command "line" p1 p2 "")
(setq tmp(entlast))
(ssadd tmp ss)
(setq p1 p2)
)
(command "pedit" ss1 "y" "j" ss "" "s" "")
)
(gc)
(princ)
(gc)
(COMMAND "COLOR" "BYLAYER")
(setq ss1 nil ss nil)
(princ "done.")
(princ)
)
;;
;;
;; *********** Local Error Trap Function ************
;;
(defun myerror (sxx)
(if (= sxx nil)
(setq sxx "console break")
); end if
(if (not (member sxx '("console break" "Function cancelled")))
(princ (strcat "\nError: " sxx))
); end if
(if (= (member sxx '("console break" "Function cancelled")))
(progn
(prompt "\nError: Break...")
(setvar "MENUECHO" 0)
(setvar "HIGHLIGHT" 1)
(setvar "SORTENTS" 1)
(setvar "ATTDIA" 0); No Attribute Dialog Boxes, please
(setvar "ATTREQ" 1); Attributes Required
(setvar "CMDDIA" 1); Plot command dialog on
); end progn
); end if
(setvars); reset all old system variables
(setvar "CMDECHO" 0)
(setq sxx nil)
(princ)
); end function err
(setq olderr *error* *error* myerror)
;;
;; Get Old System Variables
;;
(defun getvars ()
(setq osm (getvar "OSMODE"))
;; add any other system variables here
); end function
(defun setvars ()
(setvar "OSMODE" osm)
;; reset any other system variables here
); end function
;; *************** end of error trapping *****************
;;
Solved! Go to Solution.