AllExperts > AutoCAD 
Search      
AutoCAD
Volunteer
Answers to thousands of questions
 Home · More AutoCAD Questions · Answer Library  · Encyclopedia ·
More AutoCAD Answers
Question Library

Ask a question about AutoCAD
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Scott Cook
Expertise
I`ve been using AutoCAD since 1987 and programming AutoLISP nearly as long. I can answer questions about programming AutoCAD (except ARX) and production enhancement techniques. I cannot answer questions about AutoCAD crashes or DWG corruption. AutoCAD PROGRAMMING (menus, lisp) related questions only!

Experience
Since 1987. Author of Plot2000 software for for AutoCAD, http://www.plot2000.com. PROGRAMMING QUESTIONS ONLY PLEASE. Questions that are NOT related to programming or AutoCAD customization (menus and lisp only please) are outside the scope of my volunteer services and will NOT BE ANSWERED.
 
   

You are here:  Experts > Computing/Technology > Computer-Aided Design > AutoCAD > autolisp

AutoCAD - autolisp


Expert: Scott Cook - 10/30/2007

Question
I want a lisp routine that will simplify this action for me.  I'm using this on P&IDs.  Where two lines intersect I insert two breaklines on the vertical line on either side of the horizontal line and trim the vertical line between those two breaklines.  Currently I insert the breaklines as a block on the intersection and trim after that.  I know there must be a lisp routine that will do it all at once.  The key is that the horizontal line needs to stay intact while the vertical line is trimmed.

Answer
well, I have done this, but I can't share the routine because it was work-for-hire for another company.
basically, I used a circle drawn at the intersection of the two lines, with the diameter equal to the trim gap times the drawing scale. then I would temporarily erase the horizontal line and use the trim command to trim the vertical line, then unerase the horizontal one. the (entdel ename) function can be used to delete, then undelete the horizontal line. you will have to select both of them with the ssget function using a little crossing box and determine which one is the vertical one by looking at the resulting data with entget.

Add to this Answer    Ask a Question



  Rate this Answer
   Was this answer helpful?
Not at allDefinitely              
   12345  

     
About Us | Advertise on This Site | User Agreement | Privacy Policy | Help
Copyright  © 2008 About, Inc. About and About.com are registered trademarks of About, Inc. The About logo is a trademark of About, Inc. All rights reserved.