Lisp routine to change table column width and text size

amyers77
edited February 2023 in LISP
Hi, I'm looking for a lisp that will allow me to set the text size of all the cells in a certain column of a table to 0.01 and also the cell width of the cells in that column to 0.01 effectively making that column invisible.

Can anyone help?

Comments

  • A couple of possible solutions, google for examples.

    SetCellTextHeight
    SetColumnWidth
  • Will have a look thanks!
  • BeachinItHere
    edited May 2023
    I had a breakthrough on this, thanks to ALANH's help! I'm sharing my code, enjoy! At first it was adding the new row data as a very small text height, now I can actually influence the text height (aka size font size etc etc etc).



    ; Set the text height of the cells in the new row
    (setq cell 0)
    (repeat 3
    (vla-SetCellTextHeight tableObject numRows cell textHeight) ; Set the cell's text height
    (setq cell (1+ cell))
    )

  • Another question I have is on the data I'm getting from the 1st cell of column 1. It's of the same table except it goes {1,2,3,4,5,6,1} for the data in that 1st column worth of cells... Anyhow, what's with the extra formatting looking info of "{\fArial|b0|i0|c0;" before the data that will show in the cell?

    Select table:
    Entity type: ACAD_TABLE
    1st row = {\fArial|b0|i0|c0;Line #
    2st row = {\fArial|b0|i0|c0;1
    3st row = {\fArial|b0|i0|c0;2
    4st row = {\fArial|b0|i0|c0;3
    5st row = {\fArial|b0|i0|c0;4
    6st row = {\fArial|b0|i0|c0;5
    7st row = 6
    8st row = 1
    Printed all cell data from the first column.

    Is there a way to add that prefix worth of formatting details to the cells I'm creating?