ababs Posted yesterday at 04:09 PM Posted yesterday at 04:09 PM Hello everyone, I’m trying to create a LISP to help with pipe takeoffs in AutoCAD. Here’s what I want it to do: I have a plan with pipes of different sizes drawn as lines or polylines. I want to create a takeoff layer (e.g., "M-TakeOff-CWS"). Instead of redrawing, I just select a line or polyline segment and choose a pipe size. The code should automatically split the selected segment at all intersections with other lines or polylines. Each resulting sub-segment is duplicated in place on the takeoff layer. The duplicated segments get a color based on the chosen size. The original line or polyline stays intact. Later, I want to filter by color/size to calculate total lengths. I’ve tried several approaches, but I’m struggling with: Splitting segments automatically at intersections. Duplicating them on a new layer. Assigning colors by size. Does anyone have a simple LISP example or guidance for this workflow? Thanks in advance! Quote
CivilTechSource Posted 21 hours ago Posted 21 hours ago Can you upload an example *.dwg file please to see how we can help. Quote
BIGAL Posted 17 hours ago Posted 17 hours ago Welcome aboard. Yes need a sample dwg showing a before and after, breaking at intersections various examples are out there. When asking for help you nearly always should provide a sample dwg or some images. Quote
ababs Posted 9 hours ago Author Posted 9 hours ago i need to duplicate the original layer and for each size assign a color instead of redrawing them manually Quote
mhupp Posted 2 hours ago Posted 2 hours ago I would just have a menu to pick what type then loop a polyline picking points. creating the polyline on that layer with the color code maybe a thickness as well. and have the ability to switch type. Quote
Tharwat Posted 1 hour ago Posted 1 hour ago Have a close look at my Water Supply program which should facilitate your work significantly. Trial version is outdated now. https://autolispprograms.wordpress.com/water-supply-2/ Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.