A polyline over another polyline segment

A polyline over another polyline segment

Anonymous
Not applicable
1,326 Views
6 Replies
Message 1 of 7

A polyline over another polyline segment

Anonymous
Not applicable

Hello,

 

there are a way to draw a polyline over a segment of another polyline? I would like to draw a polyline of a vertex X until vertex Y and then go to another direction. I think that a way to copy only a segment without explode all the polyline will work too.

 

Thanks

0 Likes
Accepted solutions (1)
1,327 Views
6 Replies
Replies (6)
Message 2 of 7

john.uhden
Mentor
Mentor

I made an XOFFSET command that will offset or clone polyline segments even if nested in a block or xref, but I've never thought about continuing the new entity.

John F. Uhden

0 Likes
Message 3 of 7

Kent1Cooper
Consultant
Consultant

Just have ENDpoint Object Snap among your running Osnap modes, and you can snap to vertices as you draw the new Polyline.

OsnapEND.PNG

Kent Cooper, AIA
0 Likes
Message 4 of 7

john.uhden
Mentor
Mentor
You had better add midpoint for bulged segments.

John F. Uhden

0 Likes
Message 5 of 7

CodeDing
Advisor
Advisor
Accepted solution

@Anonymous ,

 

This will work on PLines WITHOUT bulges (i need more practice to handle that), I think this is close to what you might be looking for:

(defun c:OPL ( / e eg MultiAssoc pList p1 p2)
  (if (and (setq e (car (entsel "\nSelect Polyline: ")))
           (eq "LWPOLYLINE" (cdr (assoc 0 (setq eg (entget e))))))
    (progn
      (setq MultiAssoc (lambda (k l / i) (if (setq i (assoc k l)) (cons (cdr i) (MultiAssoc k (cdr (member i l)))))))
      (setq pList (MultiAssoc 10 eg))
      (while (not p1)
        (initget 1) (setq p1 (getpoint "\nSelect 1st Vertex on PLine: "))
        (setq p1 (reverse (cdr (reverse p1))))
        (setq p1 (member p1 pList))
      );while
      (while (not p2)
        (initget 1) (setq p2 (getpoint "\nSelect 2nd Vertex on PLine: "))
        (setq p2 (reverse (cdr (reverse p2))))
        (setq p2 (member p2 pList))
      );while
      (if (< (length p1) (length p2))
        (setq pList (member (car p1) (reverse p2)))
        (setq pList (reverse (member (car p2) (reverse p1))))
      );if
      (setq pList
        (cons
          "_.PLINE"
          (apply 'append (mapcar '(lambda (p) (list "non" p)) pList))
        );cons
      );setq
      ;execute final command
      (apply 'command-s pList)
    );progn
  );if
  (princ)
);defun

 

Best,

~DD

Message 6 of 7

Anonymous
Not applicable

Thank you very much! It is exactly what I need.

0 Likes
Message 7 of 7

diagodose2009
Collaborator
Collaborator

Eu folosec programul pp_imprejmure.vlx,  pentru a determina(found) intersectiile, rotatiile vertexilor,

vertexill-multplicatii in desen.Eu setez "CircleRad" 0.1. si eu tastez Q2[enter]

For  checking, segment, intersection of polylines, or you need verifying polylines,

you must pp_pimrejmuire.vlx

 

0 Likes