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 for breaking lines

AutoCAD - Autolisp for breaking lines


Expert: Scott Cook - 10/21/2007

Question
Hi Scott,

I am creating an autolisp program for modifying which is to break lines at the intersecting points with other lines. Say the lines are the members of a truss or tower. Usually I draw the legs of the tower as a line from bottom to top. I need all the lines to be broken at every intersection among themselves. The resulting tower drawing to be exported to StaadPro (a structural design program). Thanks for your help.

Regards,

Ruslin.

Answer
you can do a fence selection to find all the lines that cross it. you can further limit that by layer or whatever. then you can find the intersection of the two by iterating through the selection set and getting the start and end point of each crossing line and using the inters function to get an intersection point. then you can use the break command to break the main line. when you do, you might want to turn off all the crossing lines. each time you break, it will create a new entity that isn't part of the original selection set. you might be better off rather than doing a bunch of breaks to erase the original line and draw a bunch of new lines.


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.