Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/24/2023 in all areas

  1. I guess I'm just talking to myself here but in case it helps someone in the future here is how I got it working.. Selects blocks named: Door, Window, Sink Located on Layer 0 Current tab/layout only Changes them to another layer. (defun c:m4321 () (setq xxx (ssget "X" (list '(0 . "INSERT") (cons 2 "Door,Window,Sink") (cons 8 "0") (cons 410 (getvar "ctab")) ))) (command "_change" xxx "" "p" "la" "MyLayer" "") (princ))
    1 point
  2. 1 point
  3. Try this untested program. (defun c:Test (/ pck int ent sel rot get) ;;----------------------------------------------------;; ;; Author : Tharwat Al Choufi ;; ;; website: https://autolispprograms.wordpress.com ;; ;;----------------------------------------------------;; (and (princ "\nSelect single block to get rotation from : ") (or (setq pck (ssget "_+.:S:E" '((0 . "INSERT")))) (alert "Null or invalid object.! Try again") ) (princ "\nSelect blocks to apply rotation on : ") (setq rot (assoc 50 (entget (ssname pck 0))) int -1 sel (ssget "_:L" '((0 . "INSERT"))) ) (while (setq int (1+ int) ent (ssname sel int) ) (and (setq get (entget ent)) (entmod (subst rot (assoc 50 get) get)) (= (cdr (assoc 66 get)) 1) (mapcar '(lambda (u) (vla-put-rotation u (cdr rot))) (vlax-invoke (vlax-ename->vla-object ent) 'getattributes) ) ) ) ) (princ) ) (vl-load-com)
    1 point
  4. Assuming you mean columns instead of rows, try the following: (defun c:dimtxtexp ( / des dim enx idx sel txt ) (if (and (setq sel (ssget '((0 . "TEXT,MTEXT,*DIMENSION")))) (setq des (open "f:\\BrianD\\Dims.csv" "a")) ) (progn (repeat (setq idx (sslength sel)) (setq enx (entget (ssname sel (setq idx (1- idx))))) (if (wcmatch (cdr (assoc 0 enx)) "*DIMENSION") (setq dim (cons (rtos (cdr (assoc 42 enx))) dim)) (setq txt (cons (cdr (assoc 1 enx)) txt)) ) ) (while (or dim txt) (write-line (strcat (cond ((car txt)) ("")) "," (cond ((car dim)) ("")) "," (cond ((cadr dim)) ("")) ) des ) (setq txt (cdr txt) dim (cddr dim) ) ) ) ) (if (= 'file (type des)) (close des)) (princ) )
    1 point
×
×
  • Create New...