You are on page 1of 1

Sub CATMain()

'-----------------------
' ACCESS DRAWING
'----------------------
' retrieve drawing document infrastructure
Dim DrwDoc As DrawingDocument
Set DrwDoc = CATIA.ActiveDocument

Dim shActiveSheet As DrawingSheet


Set shActiveSheet = DrwDoc.Sheets.ActiveSheet

Dim vwActiveView As DrawingView


Set vwActiveView = shActiveSheet.Views.ActiveView
'------------------
' CREATE TABLE
'-----------------
' table position: 350, 150
' number of rows equal to 10
' number of columns: 4
' row height: 20
' column width: 50
Dim tblTable As DrawingTable
Set tblTable = vwActiveView.Tables.Add(300, 300, 10, 5, 10, 50)

' set table caption


tblTable.SetCellString 1, 1, "SR.NO."
tblTable.SetCellString 2, 1, "01"
tblTable.SetCellString 3, 1, "02"
tblTable.SetCellString 4, 1, "03"
tblTable.SetCellString 5, 1, "04"
tblTable.SetCellString 6, 1, "05"
tblTable.SetCellString 7, 1, "06"
tblTable.SetCellString 8, 1, "07"
tblTable.SetCellString 9, 1, "08"
tblTable.SetCellString 10, 1, "09"
tblTable.SetCellString 1, 2, " PART NO."
tblTable.SetCellString 1, 3, "DISCRIPTION"
tblTable.SetCellString 1, 4, "QTY"
tblTable.SetCellString 1, 5, "REMARK"

End Sub

You might also like