Jump to content

Recommended Posts

Posted

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.

Posted

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)
)

 

Posted

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.

Posted

Happy to find out if there is some way to do it looked a couple of times. Its not exposed in properties.

Posted

Run Dumpit on  a table like dims a stack of options maybe just one needs to be reset.

Posted

Sorry BIGAL but I can't understand what you mean.

Posted

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
Posted

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...

 

Posted (edited)

Ok found maybe an answer you need to work out the cell margins. But again by program

 

(vlax-put Obj 'VertCellMargin 5)

Edited by BIGAL
Posted

OK I'm guessing "entmake" is a LISP routine ... to make a Table?

 

Posted

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.

Posted

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)

 

Posted

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?

 

 

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...