Friday, August 21, 2009

Creating Automatic Gap on Crossed Lines

This is for our basic lines/arcs/circles friends out there.
Sometimes we have to isometric or schematic sketches and need to use ye old lines/arcs/circles commands. When they cross I'd like to have a standard gap created so that from drafter to drafter they will look the same.

Thanks to a fantastic person on the Autodesk Discussion Groups (Big shout out of thanks to Mep09Developer !!!!) I now have a snappy little tool to do this.

First I will give the lisp code, and then I will tell you how I pushed it into a button/drop down in the cui.

Enjoy!!

Lisp file (Again....huge thanks to Mep09Developer!!!):

;;; C:GAPLINE - creates gaps at line intersections so that one of the lines remains unchanged
;;; From http://discussion.autodesk.com/forums/thread.jspa?threadID=739827&tstart=0
;;; By "Mep09Developer" on 08-10-09

(defun C:GL (/ gap intpt gapent circle)
(prompt "GAP LINE")
(while 'T
(setq gap 4
intpt (osnap (getpoint "\nSpecify intersection point: ") "INT")
);setq
(if intpt
(progn
(setq gapent (car (entsel "\nPick entity to gap: ")))
(setvar "CMDECHO" 0)
(command "CIRCLE" intpt gap)
(command "TRIM" (setq circle (entlast)) "" (list gapent intpt) "")
(command "ERASE" circle "")
(setvar "CMDECHO" 1)
(prompt "\n")
);progn
);if
);while
(princ)
)

Info to get it onto a drop-down or button in the cui, use "/" for the file path name, the file name for the lisp was called "GapLine2":

^C^C(load "[file location]/Support/GapLine2");(C:GL);

No comments: