Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/24/2024 in all areas

  1. This really is getting messy now... (defun c:jumper (/ *error* A AENT B1 B2 BDIS BENT DOC ENT OV P1 P2 UFLAG VL O W) (setq bDis 0.04072) ;; Arc Radius (Break Distance / 2.0 ) (defun *error* (msg) (and uFlag (vla-EndUndoMark doc)) (and ov (mapcar (function setvar) vl ov)) (and msg (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*") (princ (strcat "\n** Error: " msg " **")))) (princ)) (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)) vl '("PEDITACCEPT" "CMDECHO" "OSMODE") ov (mapcar (function getvar) vl)) (setvar "PEDITACCEPT" 1) (while (and (setq uFlag (not (vla-StartUndoMark doc))) (mapcar (function setvar) (cdr vl) '(0 32)) (setq p1 (getpoint "\nPick INTERSECTION: ")) (setq ent (entsel "\nPick LINE TO BREAK: "))) (setq p2 (osnap (cadr ent) "_nea") b1 (polar p1 (setq a (angle p1 p2)) bDis) b2 (polar p1 (+ pi a) bDis)) (setvar "OSMODE" 0) (command "_.break" b1 b2) (setq bEnt (entlast)) (if (> a (/ pi 2.)) (command "_.arc" b2 "_E" b1 "_A" 180.) (command "_.arc" b1 "_E" b2 "_A" 180.)) (setq aEnt (entlast)) (if (eq "LWPOLYLINE" (cdr (assoc 0 (entget (setq ent (car ent)))))) (progn (setq w (vla-get-ConstantWidth (setq o (vlax-ename->vla-object ent)))) (command "_.pedit" "_M" bEnt aEnt ent "" "_J" "" "") (vla-put-ConstantWidth (vlax-ename->vla-object (entlast)) w))) (setq uFlag (vla-EndUndoMark doc))) (*error* nil) (princ))
    1 point
×
×
  • Create New...