Hey all..
the following code, sets a table with specific characteristics, and places it at a specific point. The interesting thing is that the user does not have to select the table.
However the second portion, where I'm trying to specify the height of each row, the user has to select the table. I can't find a way, not understand how I can achieve this. I've been swapping out the (car (entsel)) with combinations of (entget (entlast)) and (entlast), and I'm just not getting it.
See below
(if (setq ss (ssget "_X" '((0 . "ACAD_TABLE")(1 . "PIPE LIST"))))
(repeat (setq i (sslength ss))
(setq e (entget (ssname ss (setq i (1- i))))
n (cdr (assoc 1 e)))
(entmod (subst (if (eq n "PIPE LIST")
'(10 0.0625 10.3675 0.0)
)
(assoc 10 e) e))
)
)
(princ)
(vl-load-com)
(setq PipeList (vlax-ename->vla-object (car (entsel)))) ;;select table and get table object.
(vla-setrowheight PipeList 0 0.25)
(vla-setrowheight PipeList 1 0.2125)
(vla-setrowheight PipeList 2 0.2125)
(vla-setrowheight PipeList 3 0.2125)
(vla-setrowheight PipeList 4 0.2125)
(vla-setrowheight PipeList 5 0.2125)
(vla-setrowheight PipeList 6 0.2125)
(vla-setrowheight PipeList 7 0.2125)
(vla-setrowheight PipeList 8 0.2125)
(vla-setrowheight PipeList 9 0.2125)
(vla-setrowheight PipeList 10 0.2125)
(vla-setrowheight PipeList 11 0.2125)
(vla-setrowheight PipeList 12 0.2125)
(vla-setrowheight PipeList 13 0.2125)
(vla-setrowheight PipeList 14 0.2125)
(vla-setrowheight PipeList 15 0.2125)
(vla-setrowheight PipeList 16 0.2125)
As you can see, the first already selects the table without the user having to to select it. I'd like the same to be true for adjusting the row heights.
Thanks in advance,
KP
Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.

Clik here to view.
