Maybe someone has an easy solution.
This routine has the user draw an arc and then places a 4" circle at
the first point picked. My problem is in trimming the arc that is
within the circle. If i use ptPick instead of ArcEnt sometimes the
arc was started on top of another entity and it ia trimmed instead.
But using ArcEnt has it's own problems. If the Arc is drawn in a
particular direction the part outside of the circle is trimmed.
Any easy fix for this?
CAB
;;; By Charles Alan Butler : Last Modified 11/19/03
;;; ArcC.lsp (Arc Leader with Circle Arrow Head)
;;; Uses the current layer & Circle Arrow head
;; error function & Routine Exit
(defun *error* (msg)
(if
(not
(member
msg
'("console break" "Function cancelled" "quit / exit abort")
)
)
(princ (strcat "\nError: " msg))
) ; if
(princ)
) ;
;end error function
;;;====== Main Lisp Routine =======
(defun c:ArcC (/ usercmd useros pt1 pt2
pttemp ptpick L_Angle cenpt rad
StartAng arcdata EndAng
)
(princ "\n")
(princ "\n Arc Leader w/ Circle Arrow - Version 1.0")
(princ "\n")
;;; ------- Some Housekeeping ------------------
(setq usercmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq useros (getvar "osmode"))
(setvar "osmode" 0)
(setq userANGDIR (getvar "angdir"))
(setvar "angdir" 0)
(setq ptpick (getpoint "\nPick leader start point: "))
(command "arc" ptpick pause pause)
(if (= "ARC" (cdr (assoc 0 (entget (entlast)))))
(progn
(setq ArcEnt (entlast))
(setq arcdata (entget ArcEnt)
cenpt (cdr (assoc 10 arcdata))
rad (cdr (assoc 40 arcdata))
StartAng (cdr (assoc 50 arcdata))
EndAng (cdr (assoc 51 arcdata))
)
(Command "_.Circle" ptpick 2) ; circle arrow head 2" radius
(ssget "l") ; use circle as cutting edge
(command "trim" "p" "" ArcEnt "") ; trim arc only
;;;========== Exit Sequence ============
(setvar "osmode" useros)
(setvar "CMDECHO" usercmd)
(setvar "angdir" userangdir)
(princ)
) ; end progn
) ; endif ARC
) ; end defun
(prompt "\nType ArcC to run")
(princ)
;;;========== End of Routine ============