My LISP only lets me select one table at a time

My LISP only lets me select one table at a time

wjbGQR94
Participant Participant
782 Views
3 Replies
Message 1 of 4

My LISP only lets me select one table at a time

wjbGQR94
Participant
Participant

Hi there,

I have made a simple lisp that removes the property overrides of a table but I need to individually click each table.

I would like to be able to select all the tables on a drawing at once and use this command

Any advice would be most welcome!

Thanks!

0 Likes
Accepted solutions (1)
783 Views
3 Replies
Replies (3)
Message 2 of 4

xuantientutungXUK6E
Advocate
Advocate

(setq ss (ssget "x" (list (cons 0 "INSERT") (cons 2 "zi3042sht")))

Use this code above for reference.

it will select what you want in active drawing depended on the condition (list (cons 0 "INSERT") (cons 2 "zi3042sht"))

0 Likes
Message 3 of 4

ВeekeeCZ
Consultant
Consultant
Accepted solution

Here you go.

 

(vl-load-com)

(defun c:RPO ( / toggle ss i)

  (setq toggle 0)

  (if (setq ss (ssget '((0 . "ACAD_TABLE"))))
    (repeat (setq i (sslength ss))
      (vla-cleartablestyleoverrides (vlax-ename->vla-object (ssname ss (setq i (1- i)))) toggle)))
  (princ)
  )
Message 4 of 4

wjbGQR94
Participant
Participant

Exactly what I needed thank you so much

0 Likes