I have a lot of drawings with two tables in them, and they are all over the place.
I'm able to change the columns widths using the following code:
(setq PipeList (vlax-ename->vla-object (car (entsel))))
(vla-setcolumnwidth PipeList 0 0.25)
(vla-setcolumnwidth PipeList 1 0.25)
(vla-setcolumnwidth PipeList 2 2.0)
(vla-setcolumnwidth PipeList 3 1.5)
(vla-setcolumnwidth PipeList 4 1.625)
(vla-setcolumnwidth PipeList 5 1.0)
(vla-setcolumnwidth PipeList 6 1.75)
I'm wondering if I could modify the assoc 10 value to a specific point of '(8.5 10.3675 0.0).
Thanks
KP
@kpennell wrote:I have a lot of drawings with two tables in them, and they are all over the place.
I'm wondering if I could modify the assoc 10 value to a specific point of '(8.5 10.3675 0.0).
Thanks
KP
Yes you can, but you mentioned you have TWO tables. which one goes to the specific point?
How about a table with these specifics:
(cons 0 "ACAD_TABLE")(cons 1 "FITTINGS LIST")
; goes to (8.5 10.3675 0.0)
and a table wth these specifics:
(cons 0 "ACAD_TABLE")(cons 1 "PIPE LIST")
; goes to ((0.0625 10.3675 0.0)
Thanks
KP
@kpennell wrote:How about a table with these specifics:
(cons 0 "ACAD_TABLE")(cons 1 "FITTINGS LIST")
; goes to (8.5 10.3675 0.0)
(cons 0 "ACAD_TABLE")(cons 1 "PIPE LIST")
; goes to ((0.0625 10.3675 0.0)
Thanks
KP
(defun c:mtb ( / ss e n ) (if (setq ss (ssget "_X" '((0 . "ACAD_TABLE") (1 . "PIPE LIST,FITTINGS 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 8.5 10.3675 0.0) '(10 0.0625 10.3675 0.0)) (assoc 10 e) e)) ) ) (princ) )
HTH
So now I have a new requirement on moving tables.
We have thousands of drawings, with different number of rows in each table per drawing. Our client want the "PIPE LIST" in the top left, and the "FITTINGS LIST" directly underneath. The position of the "PIPE LIST" table is easy. However the "FITTINGS LIST" table position will depend on the number of rows, or size of the "PIPE LIST". How can I position the "FITTINGS LIST" 1mm below the "PIPE LIST" table?
I think I need to collect all of the "141" dxf codes for the "PIPE LIST" and add them up to get the height. if i do that I can find the coordinate that I need for the "FITTINGS LIST".