georgi913 Posted February 1, 2010 Posted February 1, 2010 Hello guys, I'd like to ask you, if there is a lisp routine, where you can create lines between two polylines, that have the same number of points - every of which point/vertex is perpendicular with the one below or on top of it. It would be awesome because i have so many cross sections, where i have to do this, between every point that your head will hurt Thank you guys in advance! here's an example of what i need: example_.dwg Quote
Lee Mac Posted February 1, 2010 Posted February 1, 2010 Perhaps: (defun c:VLines (/ line ent1 ent2 i p1 p2) (vl-load-com) ;; Lee Mac ~ 01.02.10 (defun line (p1 p2) (entmake (list (cons 0 "LINE") (cons 10 p1) (cons 11 p2)))) (while (progn (setq ent1 (car (entsel "\nSelect First Polyline: "))) (cond ( (eq 'ENAME (type ent1)) (if (wcmatch (cdr (assoc 0 (entget ent1))) "*POLYLINE") (while (progn (setq ent2 (car (entsel "\nSelect Second Polyline: "))) (cond ( (eq 'ENAME (type ent2)) (if (wcmatch (cdr (assoc 0 (entget ent2))) "*POLYLINE") (progn (setq i (1- (vlax-curve-getStartParam ent1))) (while (and (<= (progn (setq p1 (vlax-curve-getPointatParam ent1 (setq i (1+ i)))) i) (vlax-curve-getEndParam ent1)) (setq p2 (vlax-curve-getPointatParam ent2 i))) (line p1 p2))) (princ "\n** Invalid Object **")))))) (princ "\n** Invalid Object **")))))) (princ)) Quote
georgi913 Posted February 1, 2010 Author Posted February 1, 2010 Thank you! It worked like a charm, you saved my ass Quote
Lee Mac Posted February 1, 2010 Posted February 1, 2010 Thank you! It worked like a charm, you saved my ass You're welcome 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.