Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/06/2019 in all areas

  1. I'm not sure why you would need a lisp routine for this, but if that's the case, you need to post your question in the Lisp section. https://www.cadtutor.net/forum/forum/15-autolisp-visual-lisp-amp-dcl/ Also, can I ask why you reported my post as spam?
    1 point
  2. The following will offset to the current layer: (defun c:mdoff ( / d i l o r s ) (setq l (getvar 'clayer)) (initget 6) (if (and (setq d (getdist "\nSpecify offset distance: ")) (setq s (ssget "_:L" '( (0 . "ARC,CIRCLE,ELLIPSE,*LINE") (-4 . "<NOT") (-4 . "<AND") (0 . "POLYLINE") (-4 . "&") (70 . 80) (-4 . "AND>") (-4 . "NOT>") ) ) ) ) (repeat (setq i (sslength s)) (setq i (1- i) o (vlax-ename->vla-object (ssname s i)) ) (foreach x (list d (- d)) (if (not (vl-catch-all-error-p (setq r (vl-catch-all-apply 'vlax-invoke (list o 'offset x))))) (foreach y r (vla-put-layer y l)) ) ) ) ) (princ) ) (vl-load-com) (princ)
    1 point
  3. Glad to help You could use something like this to be able to choose your color before drawing the line: (defun c:foo (/ c p1) (if (and (setq c (acad_colordlg 1)) (setq p1 (getpoint "\nPunto Inicial:"))) (entmakex (list '(0 . "line") (cons 10 p1) (cons 11 (polar p1 (* 1.5 pi) 0.18)) (cons 62 c))) ) (princ) )
    1 point
×
×
  • Create New...