Adds a table to a drawing.
Supported platforms: Windows only
VBA:
RetVal = object.AddTable(InsertionPoint, NumRows, NumColumns, RowHeight, ColWidth)
Type: Block, ModelSpace, PaperSpace
The objects this method applies to.
Access: Input-only
Type: Variant (three-element array of doubles)
The 3D WCS coordinates in the drawing where the table is inserted.
Access: Input-only
Type: Long
The number of rows in the table.
Access: Input-only
Type: Long
The number of columns in the table.
Access: Input-only
Type: Double
The height of the rows in the table.
Access: Input-only
Type: Double
The width of the columns in the table.
No additional remarks.
VBA:
Sub Example_AddTable() ' This example adds a table in model space Dim MyModelSpace As AcadModelSpace Set MyModelSpace = ThisDrawing.ModelSpace Dim pt(2) As Double Dim MyTable As AcadTable Set MyTable = MyModelSpace.AddTable(pt, 5, 5, 10, 30) ZoomExtents End Sub
Visual LISP:
(vl-load-com) (defun c:Example_AddTable() ;; This example adds a table in model space (setq acadObj (vlax-get-acad-object)) (setq doc (vla-get-ActiveDocument acadObj)) (setq pt (vlax-3d-point 0 0 0)) (setq modelSpace (vla-get-ModelSpace doc)) (setq MyTable (vla-Addtable modelSpace pt 5 5 10 30)) (vla-ZoomExtents acadObj) )