AboutScott 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.
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.