Jump to content

Table - Auto size height


sketch11

Recommended Posts

Is there a setting to automatically adjust the height of table rows. The adjustment is only made if the height increases, but not if it decreases.

Link to comment
Share on other sites

You can reset any row using (vla-SetRowHeight Objtable rownum rowht) you get how many rows then use a repeat to step through the rows.

 

; (vla-SetRowHeight Objtable row rowht) would change the 3rd row as rows start at 0.


(setq objtable (vlax-ename->vla-object (car  (entsel "\nPick table "))))
(setq rownum (vla-get-rows objtable))
(setq x 0)
(repeat (- rownum 1)
(vla-SetRowHeight Objtable (setq x (+ x 1)) rowht)
)

 

Link to comment
Share on other sites

Thanks BIGAL, I was asking with respect to a setting.

With the LISP, it's along the same lines as manually adjusting.

The reason is that more often than not, I forget to adjust or as the case may be, run the LISP.

 

In a similar manner to when the row increases in size, this is done automatically by AutoCAD.

Link to comment
Share on other sites

Use this pick an object reveals all sorts of stuff. Pick a table and a dim.

 

;;;===================================================================; 
;;; DumpIt                                                            ; 
;;;-------------------------------------------------------------------; 
;;; Dump all methods and properties for selected objects              ; 
;;;===================================================================; 
(defun C:Dumpit ( / ent) 
  (while (setq ent (entsel)) 
    (vlax-Dump-Object 
      (vlax-Ename->Vla-Object (car ent)) 
    ) 
  ) 
  (princ) 
)

 

  • Like 1
Link to comment
Share on other sites

OK thanks I tried it, there was a bunch of properties. The relevant one, I'm guessing it's relevant showed nothing.

 

 

RowHeight (RO) = ...Indexed contents not shown...

 

Link to comment
Share on other sites

I do see this in there. But if I type "VERTCELLMARGIN", it says unknown command.

VertCellMargin = 1.5

 

I can't understand what I'm supposed to do with "(vlax-put Obj 'VertCellMargin 5)".

I tried to enter into the command line but nothing works.

Link to comment
Share on other sites

OK thats just a std display of the command, the obj is a VL object that has been selected.

 

(setq obj (vlax-ename->vla-object (car  (entsel "Pick table"))))
(vlax-put Obj 'VertCellMargin 5)

 

Link to comment
Share on other sites

Sorry BIGAL you've lost me here.

I tried various things including entering into the command line ... I don't know what happened but the table had all rows with a margin of what is input from above ... so something worked ... but I don't know what I did.

 

But I still don't understand where the automation comes into it. Is this set and forget?

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...