Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/04/2019 in all areas

  1. (defun c:POV (/ foo ss) ;; Points On Vertices (create points on vertices of selected Arcs, Lines, *Polylines, Splines) ;; Alan J. Thompson, 09.09.10 / 09.22.10 ;; Modified by Tharwat - Date: 04.Jul.19 (defun foo (p) (if (vl-consp p) (or (vl-member-if (function (lambda (a) (equal (list (car a) (cadr a)) (list (car p) (cadr p))))) plst) (setq plst (cons (cdr (assoc 10 (entmake (list '(0 . "POINT") '(8 . "Points") (cons 10 p))))) pLst)))) ) (if (setq ss (ssget '((0 . "ARC,LINE,*POLYLINE,SPLINE,CIRCLE")))) ((lambda (i / e eLst p pLst) (while (setq e (ssname ss (setq i (1+ i)))) (cond ((vl-position (cdr (assoc 0 (setq eLst (entget e)))) '("ARC" "LINE" "SPLINE")) (mapcar (function foo) (list (vlax-curve-getStartPoint e) (vlax-curve-getEndPoint e))) ) ((vl-position (cdr (assoc 0 eLst)) '("LWPOLYLINE" "POLYLINE")) (repeat (setq p (1+ (fix (vlax-curve-getEndParam e)))) (foo (vlax-curve-getPointAtParam e (setq p (1- p)))) ) ) (t (mapcar (function foo) (list (cdr (assoc 10 eLst)))) ) ) ) ) -1 ) ) (princ) )
    1 point
  2. Add Your layer name as indicated above.
    1 point
  3. Like this? (defun c:POV (/ foo ss) ;; Points On Vertices (create points on vertices of selected Arcs, Lines, *Polylines, Splines) ;; Alan J. Thompson, 09.09.10 / 09.22.10 ;; Modified by Tharwat - Date: 04.Jul.19 (defun foo (p) (if (vl-consp p) (or (vl-member-if (function (lambda (a) (equal (list (car a) (cadr a)) (list (car p) (cadr p))))) plst) (setq plst (cons (cdr (assoc 10 (entmake (list '(0 . "POINT") (cons 10 p))))) pLst)))) ) (if (setq ss (ssget '((0 . "ARC,LINE,*POLYLINE,SPLINE,CIRCLE")))) ((lambda (i / e eLst p pLst) (while (setq e (ssname ss (setq i (1+ i)))) (cond ((vl-position (cdr (assoc 0 (setq eLst (entget e)))) '("ARC" "LINE" "SPLINE")) (mapcar (function foo) (list (vlax-curve-getStartPoint e) (vlax-curve-getEndPoint e))) ) ((vl-position (cdr (assoc 0 eLst)) '("LWPOLYLINE" "POLYLINE")) (repeat (setq p (1+ (fix (vlax-curve-getEndParam e)))) (foo (vlax-curve-getPointAtParam e (setq p (1- p)))) ) ) (t (mapcar (function foo) (list (cdr (assoc 10 (entget e))))) ) ) ) ) -1 ) ) (princ) )
    1 point
  4. Hi, Alan has not posted in CADTutor for a quite long time and personally I hope he would resume participating in this forum again as before. Anyway try the following modification and let me know: (defun c:POV (/ foo ss) ;; Points On Vertices (create points on vertices of selected Arcs, Lines, *Polylines, Splines) ;; Alan J. Thompson, 09.09.10 / 09.22.10 ;; Modified by Tharwat - Date: 18.May.16 (defun foo (p) (if (vl-consp p) (or (vl-member-if (function (lambda (a) (equal (list (car a) (cadr a)) (list (car p) (cadr p))))) plst ) (setq plst (cons (cdr (assoc 10 (entmake (list '(0 . "POINT") (cons 10 p))) ) ) pLst ) ) ) ) ) (if (setq ss (ssget '((0 . "ARC,LINE,*POLYLINE,SPLINE")))) ((lambda (i / e eLst p pLst) (while (setq e (ssname ss (setq i (1+ i)))) (cond ((vl-position (cdr (assoc 0 (setq eLst (entget e)))) '("ARC" "LINE" "SPLINE")) (mapcar (function foo) (list (vlax-curve-getStartPoint e) (vlax-curve-getEndPoint e))) ) ((vl-position (cdr (assoc 0 eLst)) '("LWPOLYLINE" "POLYLINE")) (repeat (setq p (1+ (fix (vlax-curve-getEndParam e)))) (foo (vlax-curve-getPointAtParam e (setq p (1- p)))) ) ) ) ) ) -1 ) ) (princ) )
    1 point
×
×
  • Create New...