KozMos AcDbTablePack

  A free Visual LISP API for coding with AcDbTable

กก

AcDbTablePack: Introduction

        AcDbTable is a new entity type since AutoCAD2005 which will be a fast and simple way building and maintaining table works within AutoCAD. The AcDbTable is a combination of MTEXT and lines (as EXPLODE an AcDbTable will get MTEXT and lines). Although AcDbTable is very effective, programming with AcDbTable must depend on ActiveX because normal Visual LISP functions such as "ENTXXX" can not be used to deal with AcDbTables, especially on HUGE tables with over 100 single cells.
        What we can modify in AcDbTable is called the AcDbTable CELL which contain a column ID and a row ID. The two integer is used to define the cell position in AcDbTable. In all situations, the ID numbers are the key accessing the AcDbTable cell. Unfortunately, getting the cell ID from graphic screen may contain little trouble because we can not get it by picking mouse, even more, the AutoCAD users may have to count in mind and answer the number to programs. This operation is undoubted unsuitable for users.

        AcDbTablePack is designed to help AutoCAD users and programmers working together with AcDbTable. AcDbTablePack will try to reduce the operation inconvenience by doing some intelligent determination and return directly normal Visual LISP arguments.

AcDbTablePack: The Package

        There are three files in AcDbTablePack:

  • AcDbTablePack.VLX:        program VLX file
  • AcDbTablePack.FAS:        program FAS file
  • AcDbTablePack.HTM:        help file (also this file)

        If you want to get more information and help on using or programming KozMos AcDbTablePack, please mail  to report.

AcDbTablePack: Published function(s)

tblpack-pickcell(3)
(tblpack-pickcell Point1 Point2 VirtualFillColorACI)
    Get the correct cell ID (row and column) from picked point(s)
    TblPack-PickCell is a very powerful function. we can get a single cell, a merged cell, or two single cells, even two merged cells within one AcDbTable. The different input arguments may cause different results:
กก
Argu1 Argu2 What will be done?
NIL NIL Nothing to do, return NIL
T NIL Prompt user to pick a point and return one cell (single or merged) information.
NIL T Prompt user to pick a point and return one cell (single or merged) information.
T T Prompt user to pick a point to define a cell (single or merged), then prompt users to pick another corner point to define another cell (single or merged), return complex cells information.
POINT NIL Define a cell (single or merged) by given point and return one cell (single or merged) information.
POINT T If a cell (single or merged) can be found by given point, prompt users to pick a corner point to define another cell (single or merged), return complex cells information.
T POINT If a cell (single or merged) can be found by given point, prompt users to pick a corner point to define another cell (single or merged), return complex cells information.
NIL POINT Define a cell (single or merged) by given point and return one cell (single or merged) information.
POINT POINT If cell can be found by both 2 given points, return complex cells information.
(tblpack-pickcell T nil 12)
(#<VLA-OBJECT IAcadTable 0bafa394> 3 5 3 5nil nil)
Argument 1 LIST An existing and valid point list (if the point is located in an AcDbTable cell)
T will prompt the user to pick a point in the cell
NIL means ignore the point in this argument
Argument 2 LIST An existing and valid point list (if the point is located in an AcDbTable cell)
T will prompt the user to pick a point in the cell
NIL means ignore the point in this argument
Argument 3 INT The VirtualFill color ACI(1~255)
T for 8(gray) as default
NIL means disable VirtualFill.
Return SUCCESS A 7-items-list and syntax as below:
Item0 VLA-OBJECT The AcDbTable object
Item1 INT The row ID of LEFT-UPPER cell
Item2 INT The column ID of LEFT-UPPER cell
Item3 INT The row ID of RIGHT-LOWER cell
Item4 INT The column ID of RIGHT-LOWER cell
Item5 BOOLE if the LEFT-UPPER cell is a merged cell
Item6 BOOLE if the RIGHT-LOWER cell is a merged cell

If only one single cell is picked, the LEFT-UPPER cell and RIGHT-LOWER cell will be same and item1=item3, item2=item4, item5=item6; if only one merged cell is picked, the LEFT-UPPER cell and RIGHT-LOWER cell will not be same.

FAILURE NIL
กก

//Koz Jono Yeoh//

Copyright(C) 1994-2009 KozMos Inc
All rights reserved.