0 Members and 1 Guest are viewing this topic.
So other than creating a shape file to use this is not possible?
(defun c:TEst (/ w p1 p2 lst obj) (and (setq w (getdist "\nSpecify width: ")) (setq w (/ w 12.)) (setq p1 (getpoint "\nSpecify first point: ")) (setq lst (list p1)) (while (setq p2 (getpoint (car lst) "\nSpecify next point: ")) (grdraw (car lst) p2 -1) (setq lst (cons p2 lst)) ) ;_ while (setq obj (vlax-ename->vla-object (entmakex (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length lst)) ) ;_ list (mapcar '(lambda (x) (cons 10 x)) lst) ) ;_ append ) ;_ entmakex ) ;_ vlax-ename->vla-object ) ;_ setq (progn (mapcar '(lambda (#) (vl-catch-all-apply 'vla-offset (list obj (/ w #)))) '(2. -2.) ) ;_ mapcar (vla-delete obj) (redraw) ) ;_ progn ) ;_ and) ;_ defun
Thanks for the reply Mike. The part that had me confused was the double line in the definition
Quote from: ronjonp on March 11, 2010, 10:51:55 AMThanks for the reply Mike. The part that had me confused was the double line in the definition Is it REALLY a double line definition, or just TWO different features whose line types are similar lying next to each other in plan view?
Code: [Select](defun c:TEst (/ w p1 p2 lst obj) (and (setq w (getdist "\nSpecify width: ")) (setq w (/ w 12.)) (setq p1 (getpoint "\nSpecify first point: ")) (setq lst (list p1)) (while (setq p2 (getpoint (car lst) "\nSpecify next point: ")) (grdraw (car lst) p2 -1) (setq lst (cons p2 lst)) ) ;_ while (setq obj (vlax-ename->vla-object (entmakex (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length lst)) ) ;_ list (mapcar '(lambda (x) (cons 10 x)) lst) ) ;_ append ) ;_ entmakex ) ;_ vlax-ename->vla-object ) ;_ setq (progn (mapcar '(lambda (#) (vl-catch-all-apply 'vla-offset (list obj (/ w #)))) '(2. -2.) ) ;_ mapcar (vla-delete obj) (redraw) ) ;_ progn ) ;_ and) ;_ defun
Quote from: alanjt on March 11, 2010, 01:20:14 PM Code: [Select](defun c:TEst (/ w p1 p2 lst obj) (and (setq w (getdist "\nSpecify width: ")) (setq w (/ w 12.)) (setq p1 (getpoint "\nSpecify first point: ")) (setq lst (list p1)) (while (setq p2 (getpoint (car lst) "\nSpecify next point: ")) (grdraw (car lst) p2 -1) (setq lst (cons p2 lst)) ) ;_ while (setq obj (vlax-ename->vla-object (entmakex (append (list '(0 . "LWPOLYLINE") '(100 . "AcDbEntity") '(100 . "AcDbPolyline") (cons 90 (length lst)) ) ;_ list (mapcar '(lambda (x) (cons 10 x)) lst) ) ;_ append ) ;_ entmakex ) ;_ vlax-ename->vla-object ) ;_ setq (progn (mapcar '(lambda (#) (vl-catch-all-apply 'vla-offset (list obj (/ w #)))) '(2. -2.) ) ;_ mapcar (vla-delete obj) (redraw) ) ;_ progn ) ;_ and) ;_ defunThanks for the code Alan .. perhaps if I get bored I'll take it a bit further and plop the E's along it