Author Topic: ac Vertical Alignment middle in a Table  (Read 2459 times)

0 Members and 1 Guest are viewing this topic.

DEVITG

  • Bull Frog
  • Posts: 481
ac Vertical Alignment middle in a Table
« on: March 08, 2007, 07:35:07 AM »
With this defun I want to locate a text in a cel , in VerticalAlignmentmiddle

Code: [Select]
(defun fill-cell ( txt heig  row col styl color)
(vla-settext tabla row col txt)
(vla-SetCellTextStyle tabla row col styl)
(vla-SetCellTextHeight tabla row col heig)
(vla-put-colorindex acmcol color)
(vla-SetCellContentColor tabla row col acmcol)
(vla-setcellalignment tabla row col  acVerticalAlignmentmiddle)

);_
(fill-cell "TERRENO NATURAL" 7 2 0 "ROMAND" 4)



Shown at the dwg.
But it does not work
Could you help me ?

Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Jeff_M

  • King Gator
  • Posts: 4098
  • C3D user & customizer
Re: ac Vertical Alignment middle in a Table
« Reply #1 on: March 08, 2007, 11:39:24 AM »
From the Help, there is no acVerticalAlignmentmiddle....:
Quote from: Help File
AcCellAlignment enum; the cell alignment

acBottomCenter

acBottomLeft

acBottomRight

acMiddleCenter

acMiddleLeft

acMiddleRight

acTopCenter

acTopLeft

acTopRight


Jeff_M

  • King Gator
  • Posts: 4098
  • C3D user & customizer
Re: ac Vertical Alignment middle in a Table
« Reply #2 on: March 08, 2007, 11:40:37 AM »
I would guess that you'd want acMiddleCenter.

DEVITG

  • Bull Frog
  • Posts: 481
Re: ac Vertical Alignment middle in a Table
« Reply #3 on: March 08, 2007, 01:11:40 PM »
Hi , as I put on the right table , I need it to be vertical , the RED text .
If it can not be done ,I will try to arrange the table in in 2 or more tables.
Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Jeff_M

  • King Gator
  • Posts: 4098
  • C3D user & customizer
Re: ac Vertical Alignment middle in a Table
« Reply #4 on: March 08, 2007, 04:25:41 PM »
OK, sorry, I hadn't looked at your drawing.


(vla-setcellalignment tbl 2 0 acMiddleLeft)
(vla-settextrotation tbl 2 0 acdegrees270)

DEVITG

  • Bull Frog
  • Posts: 481
Re: ac Vertical Alignment middle in a Table
« Reply #5 on: March 08, 2007, 06:36:12 PM »
Hi Jeff , that was the trick .
Thanks for it.
Another fact :
I noticed that when filling a table the task is developed in a slow pace , and it get slow , step by step,  when the rows are bigger .
i have a list with about 300 item an in each row 3 cell are fill
when I try with 30 , it run quick row by row , but when I run the whole list , the row pace is slower.

Location @ Córdoba Argentina Using ACAD 2019  at Window 10

Jeff_M

  • King Gator
  • Posts: 4098
  • C3D user & customizer
Re: ac Vertical Alignment middle in a Table
« Reply #6 on: March 08, 2007, 07:35:56 PM »
I discovered this little trick from somewhere.......

Place this in your code after creating the table but prior to adding any data to the table:
Code: [Select]
(vla-put-RegenerateTableSuppressed table :vlax-true);;don't regen table with every addition/change
Then, once the table is filled add this:
Code: [Select]
(vla-put-RegenerateTableSuppressed table :vlax-false);;Now we can regen the table
This really helps to speed things up, since the table is regenerated with EVERY cell change by default.