Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/17/2021 in all areas

  1. Another question related to the the sample drawing, why don't you have a common block? That's the beauty of a block. Seems like you're making more work for yourself.
    1 point
  2. Sure would .. I've come to like the shorter format whether right or wrong. I see you've removed the type test .. that will not work. Try something like: (if (setq a (vl-catch-all-error-p (vl-catch-all-apply 'vla-get-area (list (vlax-ename->vla-object ent)))) ) (setq bad (cons ent bad)) (setq area (+ area a) good (cons ent good) ) ) Create a self intersecting area then hatch by object to test:
    1 point
  3. Have a look at this can do as many toggles as you like. Multiple toggles.lsp
    1 point
  4. Here's a start: (defun c:foo (/ i n p s sp) ;; RJP » 2021-02-12 (if (setq s (ssget ":L" '((0 . "*POLYLINE")))) (progn (setq sp (vlax-ename->vla-object (cdr (assoc 330 (entget (ssname s 0)))))) (vl-cmdf "_.UNDO" "Be") (setvar 'cmdecho 0) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (setq p nil) (repeat (fix (setq i (vlax-curve-getendparam e))) (setq p (cons (vlax-curve-getpointatparam e i) p)) (setq i (1- i)) ) (if (and (setq i (ssget "_WP" p '((0 . "TEXT")))) (> (setq n (atof (cdr (assoc 1 (entget (setq i (ssname i 0))))))) 0) ) ;; Vl extrusion is not as editable? (progn ;; (setq r (car (vlax-invoke sp 'addregion (list (vlax-ename->vla-object e))))) ;; (vlax-invoke sp 'addextrudedsolid r (* 3 n) 0.) (vl-catch-all-apply 'vl-cmdf (list "_.extrude" e "" (* 3 n))) ) ) ) (vl-cmdf "_.UNDO" "End") (setvar 'cmdecho 1) ) ) (princ) )
    1 point
×
×
  • Create New...