[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Select an Object Before Breaking It
Tip# 3301 By Shawn Evjen On 15-Nov-2009
4.666665
Rated By 3 users
Categories : 2D Editing
Software type : AutoCAD 2010
Rename File To : No Files to download.
By selecting an object first, you can choose where to break it.

Shawn Evjen wrote a LISP routine that reorganizes the Break command, allowing you to select an object first, and then choose where to break it.

"Generally when I use the Break command, there are too many other objects where I want the actual break to occur. I was constantly selecting the entity where the drawing was a little emptier, and would need to specify the first point specifically. I reorganized the break command (shortcut 'B' for me) so I can select the entity, click the first break point, and either select a second point or press Return to make the break occur at the same point. No more typing @ to get it to break in the same place! Works in versions as old as AutoCAD 2000, and probably back further."
 

;; Redefined Break Command by Shawn Evjen 9/3/2009

;; Select entity then first point

;; If no second point is selected, it will break at first point

(defun c:b(/ item scmd fpt spt)

 (setq scmd (getvar "cmdecho") item nil)

 (setvar "cmdecho" 0)

 (princ " Select entity to break: ")

 (while (= item nil)
 (setq item (entsel))
 )
 (redraw (car item) 3)

 (setq fpt (getpoint " Specify First Break Point: "))

 (setq spt (getpoint " Specify Second Break Point: "))

 (if (= spt nil)
 (setq spt fpt)
 )

 (command "break" item "f" fpt spt)

 (setvar "cmdecho" scmd)
 (princ)
 )
 
Notes from Cadalyst Tip Patrol: The routine is very speedy and easy to use. However, if you don't want to mess with the code (though this is not a difficult one to mess with), then after you start the Break command, select your object, and type F on the Command line to select the first break point. If you want to pick a second break point, go ahead; otherwise type the @ symbol on the command line. This method takes a few more cumbersome steps than Shawn's code (and maybe both hands).

  

 

Average Rating:
4.666665


User comments


Log In