Table Cell Height

Hi All,

I need some help with my tables please. For some reason, a cell height must be typed in as double to work (for a cell height of 8, I have to type in 16).

I cannot think of anything requiring it to be doubled or see anything in the properties or tablestyle.

Any advice?

Thanks,
Ash

Comments

  • This may help

    ;; Sets the horizontal margin for the table cells
    (vla-put-HorzCellMargin custObj txtht )

    ;; Sets the vertical margin for the table cells
    (vla-put-VertCellMargin custObj txtht )

    ;; Set the alignment for the Data, Header, and Title rows
    (vla-SetAlignment custObj (+ acDataRow acHeaderRow acTitleRow) acMiddleCenter)

    ;; Set the text height for the Title, Header and Data rows
    (vla-SetTextHeight custObj acDataRow txtht)
    (vla-SetTextHeight custObj acHeaderRow (* txtht 1.2))
    (vla-SetTextHeight custObj acTitleRow (* txtht 1.5))
  • Hi @Ashleigh

    It's easier to figure stuff like this out if you share the drawing where this is happening.

    All the best,
    Billie
  • ALANH, I'm sorry, I'm not quite sure what to do with that. Is it a lsp?

    Billie, I have attached a drawing with the table. It happens with all new tables in any drawing, so it's clearly something in my setups.

    In my mind, a text height of 3 and a margin of 2 should make a minimum cell height of 7. If I type in a cell height of anything less than 15 I get 7.05, which doesn't make sense to me. From there, 15 gives 7.5, 16 gives 8 etc.

    Interestingly, it seems to only happen in the row with the style 'Title'.

    This is driving me a little nuts, hopefully the solution is easy :)

    Thanks,
    Ash
  • Hello.

    There is an issue with calculating the row height.
    This is being investigated - there is a development task dedicated to it.

    ---

    From my testing, regarding the first row of the table - the title, one approach could be to use the Vertical cell margin to adjust the cell height, without any direct adjustment of the Cell height.
    This works when increasing the cell height of the title row.

    So, for a text height of 3, using a Vertical margin of 2, the total cell height will be 7.
    The real value in the drawing is 7.05 - most likely this will be fixed with the task mentioned above.

    To get a cell height of 10, set the Vertical margin = (10 - 3) / 2 = 3.5
    The real value will be different, 10.05, but very close.

    To get a cell height of 18 (18.05), set the Vertical margin = (18 - 3) / 2 = 7.5

    If the text height is adjusted to 6, Cell height = 6 + 2 * 7.5 = 21
    In this case the real cell height will be 21.1.

    ---

    Another problem is that the cell height is not automatically adjusted downwards when the Vertical margin is reduced.
    To adjust the Cell height downwards, it needs to be directly adjusted, by typing in a lower value.

    With the last case, Vertical margin could be adjusted to 7.45.
    However, this won't change the cell height downwards - it will still be 21.1

    Inputting a lower value, 20 for instance, will adjust the cell height downward to its minimum possible value, which is 21 in this case.

    ---

    In summary, until a fix is published, the first row of the table could be adjusted like this:

    - To increase the cell height, use vertical margin considering also the text height - the cell height will automatically adjust.

    - To decrease the cell height, use vertical margin considering the text height, and manually adjust the cell height downwards, to get the minimum possible value.
  • Hi Virgil,

    Thanks very much for your detailed response!

    It's good to know this is a genuine problem and I wasn't going mad. I will use the workarounds you've mentioned until the fix is released.

    Thanks again,
    Ash