Learn more in our e-store

E-mail This Page
to a Colleague

"Congratulations on writing the best AutoCAD reference/ manual that I've ever seen. I've been an AutoCAD user since R10 and I've seen and used many, many books on ACAD. Yours is an exceptional work...thank you for providing such a complete resource."
- Mike Cauley

"I want to thank you for the AutoCAD Bible. I am a worshipper...in the space of a few months I've reached a level of proficiency with AutoCAD that I wasn't expecting to achieve so quickly...Your book lays it out very intelligently and the CD-ROM provides the hands-on experience that is necessary to truly imbibe the knowledge. The skill I have acquired has been a considerable contribution to my company."
-Jack Eastman

"I own four AutoCAD books and this one is by far the most useful. My computer suffered a major crash recently and I had to reload and recustomize AutoCAD. I could not have done it on my own without your book to guide me through some of the more difficult tasks. Thank you for such a great reference.
-Janice Owens

"I've been a fan of your AutoCAD books since the 2004 edition... Great work!"
- Dave Maynard

"I am paying so much for school and have learned more from just your book alone...I love and learned so much from your book already; people in my class are envious. Even my teachers are impressed with what I have learned and now ask me how to do things. I love the tutorials."
- Steven Scholtes

"The AutoCAD Bible is a textbook that is an object lesson in good design, concise and helpful writing, and a near-genius level of organisation. . . Your book has been the single most significant factor in my successful mastering of a new skill. . .there is not a paragraph that I would rewrite."
- Paul O'Kelly

"Just a note thanking you for the excellent AutoCAD resource book...Although an expert user of AutoCAD for the last ten years and a certified instructor, the book is a great source of new ideas, techniques, and review...Again, thank you for the superb reference book.
- Andrew Tait

"I'm a teacher at Oak Creek High School and I just purchased your book on ...and I am very impressed with the book. I teach drafting and architecture with CAD and this is the best book I ever purchased."
- Jim Ludeman

"Thanks for writing AutoCAD Bible ..... I'm finding information that I can use and understand!!!!"
-Bob Tuttle

"It is a real pleasure reading and learning with the aid of your book, the AutoCAD Bible. I literally was able to set up standard templates and do some basic parts drawing in the last two days (I bought the book two days ago). I immediately started into solid modeling to describe the parts I wanted to produce...Your lesson structuring and functional explanations are superb."
-Werner Kramer

"Most complete, concise & to the point AutoCAD book I have! ... clear, concise & to the point... We didn't have to spend as much time calling CAD consultants when we could find the information we needed at the flip of a page." Bravo!
-Bruce Hodder


"Great book. This is the first time that I have ever used AutoCAD or any other CAD software and you have made it so easy & enjoyable to learn. I really appreciate your ability to convey the concepts in your book and I really like the Step-by-Step Exercises."
-Howard Groves

"Every once in a while I run across a technical manual that is actually a joy to peruse and from which to learn. Your AutoCAD Bible is one such example. In the local bookstore I held four different versions of [books], and after reading through them all on the subject of 3DOrbit, yours alone was clear, concise, easy to understand, and got me out of a bind."
-Sandy Warren

"I use your book as a constant reference at my AutoCAD workplace. Whenever I have a question I go there for the answer and usually find it."
-Peter Elkin, AIA

"I have been using and recommending your work since I first noticed your work with the AutoCAD Bible... I've recommended this work as the 1st choice because of the logical layout, clarity of detailed explanation, common sense approach to meeting needs of a large group of users and finally, I felt that you stayed on task providing a user reference. I support, train and use AutoCAD and I appreciate your work as a suitable, readable, usable and reliable tool! Well DONE!"
-Dan Brewer

 

 

 

AutoCAD Tips & Tutorials

Break objects quickly

Michael Tabacinic sent me this e-mail:

"First off, I'd like to say, love your blog and love your tips; So helpful!
Especially the last one; coincidentally, I had been asking our CAD manager
for the past three weeks if there was a way to give the "Break at Point"
command (^C^C_break \_f \@ ) an alias, so that when we type "br" it does
that instead of the regular "break" command.

Your tip doesn't exactly solve the issue, but it helps a little; I figured I might as well ask: Any idea how to achieve what I've been trying to do for weeks? (The CAD manager said he'd look into a solution through lsp programming, but hasn't found anything so far)"

The tip Michael mentioned explains how to create a keyboard shortcut, but he wanted to type br. To do this, you need to create an AutoLISP command with that name. Michael's question launched me into an effort to write an AutoLISP program. However, for some reason, I tried to write a program that would break an object at the original point specified, so that you could break an object with one point specification.

  • First of all, that's not what Michael was asking for. His menu macro is equivalent to the Break at Point button on the Modify toolbar, which requires you to first select the object and then specify the break point.
  • Second, I already had an AutoLISP program that breaks an object with one point specification. It's from Alan Praysman and available as a free download with my Breaking a Line into Two tip.

But lots of interesting code came out of the process, so I thought I'd share it with you.

I'm not a programmer, so anything I write is very amateurish. But here's what I came up with (note that I used bap instead of br):

;;;breaks object at the point you use to select it
(defun c:bap (/ object breakpoint)
(terpri)
(setq breakpoint (getpoint "Specify the break point "))
(setq object (ssget breakpoint))
(command "_break" object breakpoint "@")
(princ)
)

I sent this back to Michael, noting that it doesn't have any error trapping. Specifically, it just fails if you don't select an object.

It defines a command, BAP, that asks for a break point. You can use an object snap. Then it breaks the object at that point.

Meanwhile, I sent this to Lee Ambrosius of Hyperpics.com. Lee is a real programmer and he sent this back. He notes that even this code is missing some error trapping for the situation where a user presses Esc before breaking the line.

(defun c:bap ( / object breakpoint)
  (terpri)
   ;; Set a single object
  (if (setq object (ssget ":S"))
    (progn
      ;; Use the redraw function to highlight the selected object
      (redraw (ssname object 0) 3)
       ;; Get the second break point
      (if (setq breakpoint (getpoint "\nSpecify the break point "))
         ;; Use the Break command to break the selected object at the selected point
        (command "._break" object breakpoint "@")
         ;; Inform the user that no point was selected
        (progn
            (prompt "\nNo point selected.")
            (redraw (ssname object 0) 4)
        )
      )
    )
     ;; Inform the user that no object was selected
    (prompt "\nNo object selected")
  )
 (princ)
)

This code does the same thing as mine, but adds some error trapping and a couple of other nice features.

Meanwhile, Michael replied:

Thank you very much for your help Ellen. I used your LISP function to learn how LISP works, and then tweaked it to get it to do what I wanted. I'm not sure how well it works, as I'm not a programmer either, so I don't know if it's foolproof, but it does what I need it to so far. . .

The main reason I had to tweak your version was because if two lines (or more) crossed each other, I could only use the command on the line that was on top in the drawing order, which wasn't always the one I wanted.

There was another problem too, which my LISP command can't solve either. . . The problem is the following:  The point I want too break a line at is where a 2nd line would intersect it if I were to extend it.  To select this point, I drag an OTRACK line that extends from the 2nd line to the intersection.  But when I click on the intersection, either the line stays intact, or the line breaks at a different point.

When I perform the same actions using the "Break At Point" icon in the "Modify" toolbar, it does what I want it to.  I'm not sure if it's a LISP thing, or if it has to do with my AutoCAD settings, or with the program itself, or something else. If you have any ideas on that, I'd love it if you could send them over hear to help me solve this...  otherwise I'll have to settle for the tweaked LISP command..."

Here is Michael's code:

;;;breaks selected object at the point you pick
(defun c:bap (/ object breakpoint)
 (terpri)
 (setq object (entsel))
 (setq breakpoint (getpoint "pick  breakpoint "))
  (command "break" object "f" breakpoint "@")
 (princ)
)

Now, you have four AutoLISP routines that can help you break objects quickly. You can see how even non-programmers can enjoy writing code and create something useful. Of course, you need to know something about AutoLISP, but amateurs can still create very useful programs. Give it a try!

 

New tips come out each week. Don't miss out!
Sign up for the AutoCAD Tips Newsletter
& get a free dynamic blocks tutorial

Or Find More Tips