Search the Community
Showing results for tags 'break plines'.
-
Suppose you have a list called ptlist that consists of points (i.e. (x, y, z) coordinates), and a polyline entity called pline. Not assuming that all these points are on the pline, can you recursively try to (command "break" pline) and subsequent resulting entities. I'm trying out the logic of this exercise, but I can't seem to correct my logic. Currently I have my code looking like this. ;; pline - polyline entity ;; pt - [LIST] (e.g. ((x1, y1, z1) (x3, y3, z3) (x2, y2, z3))) (setq plinelist nil) (foreach pt (MA:ptlist ss) ;; generates my list of points from a function that takes a selection set (setq plinelist (append pline plinelist)) ;; appends the polyline list with current pline (could be original, could be subsequent) ;; ensures the last on the list is the original pline (if (command "break" pline pt pt) ;; test to see if polyline can break with first point (setq pline (entlast)) ;; subsequent resulting pline to be added on plinelist on next iteration (progn ;; else if polyline can't break at pt (if (command "break" (last plinelist) pt pt) ;; tests the last pline (setq p1 (car plinelist) ;; placeholder of previous pline entity pline (entlast)) ;; new pline to append in the next iteration (if (command "break p1 pt pt) ;; else ;; p1 = nil empty if the first plinelist length is 1 (setq pline (entlast)) ) ) ) ) ) I know there's a simpler way of doing this but I can't seem to find it. If you fellas can help, that would be a great learning experience.
-
Break Lines at multiple locations & then insert footage of line
ORgrown posted a topic in AutoLISP, Visual LISP & DCL
AutoCAD Map5 Hoping for a routine (or two or three) that will: 1. Convert all Lines/LWPOLYLINES/etc to Plines (no object data on the layers I need converted) 2. BREAK each Pline at the Insertion points of EVERY instance of two different blocks that are inserted along the lines. 3. Insert TEXT or MText (ROMANS 8' on layer FTGS) for each PLINE (actual footage) - ROTATED parallel to line & ~7' to one side of the line (at this point I can see I'll have to edit to move a number of footages to the opposite side of a line, but better than a prompt to place each footage when I have over 2500 instances). Ultimately, I need exact footages captured between each of the different blocks (S-Vaults & S-Handholes only - NOT S-UGTic). Many of the lines run through these blocks without breaking. Lines should not break at S-UGTic blocks. Sample DWG attached. My sample will already show footages, but I'm finding they are not always accurate - being as little as 1' off to over 100' off. Because not all the lines are broken, I don't know how the footages were determined... Drawing2.dwg Please let me know if you have any other ideas, suggestions, reality checks...My deepest appreciation for what you guys do with LiSP!- 7 replies
-
- break lines
- break
-
(and 2 more)
Tagged with: