Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/30/2020 in all areas

  1. Fair enough .. try this: (defun c:foo (/ a s) (if (and (setq a (getangle)) (setq s (ssget ":L" '((0 . "INSERT"))))) (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) (vla-put-rotation (vlax-ename->vla-object e) a) ) ) (princ) )
    1 point
  2. (assoc 8 (entget sn)) there is no entity sn
    1 point
  3. You might wish to consider my DCL Block Preview function, shared over at The Swamp.
    1 point
  4. replace area in (rtos area 2 2) with (cvunit area "sq m" "sq ft") (rtos (cvunit area "sq m" "sq ft") 2 2) or (rtos (* area 10.7639) 2 2)
    1 point
  5. Here is a quick example of how to achieve this using AutoLISP: (defun c:test ( / i l s ) (if (setq s (ssget '((0 . "INSERT")))) (repeat (setq i (sslength s)) (setq l (processblock (cdr (assoc 2 (entget (ssname s (setq i (1- i)))))) l)) ) ) (command "_.regen") (princ) ) (defun processblock ( n l / e x ) (cond ( (member n l)) ( (setq e (tblobjname "block" n)) (setq l (cons n l)) (while (setq e (entnext e)) (entmod (append (setq x (entget e)) '((62 . 9)))) (if (= "INSERT" (cdr (assoc 0 x))) (setq l (processblock (cdr (assoc 2 x)) l)) ) ) ) ) l )
    1 point
×
×
  • Create New...