10-16-2019
01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
10-16-2019
01:31 PM
Thank you for your reply. I was actually able to get my original code (see below) to work. I identified the wrong problem. The problem wasn't the array, it was putting that array in a custom table (see line 23). My desired output is attached (see screen shot
Sub Main
Dim oDrawDoc As DrawingDocument
Dim oSheet As Sheet
Dim oTitles() As String
Dim oContents() As String
Dim oCustomTable As CustomTable
oDrawDoc = ThisDoc.Document
oSheet = oDrawDoc.ActiveSheet
' oTitles = {"DWG TYPE", "FAB STATUS", "DRAWING NUMBER", "REV. NO.", "DESCRIPTION" }
oTitles = {"DWG TYPE", "FAB STATUS"}
Dim MyArray(0 To 1, 0 To 1) As Object
MyArray(0, 0) = "00"
MyArray(0, 1) = "01"
MyArray(1, 1) = "11"
MyArray(1, 0) = "10"
MsgBox("myarray(0,0) = " & myarray(0,0))
' oCustomTable = oPSheet.CustomTables.Add("PRINT REQUEST FORM", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 3, 4, oTitles, oContents)
oCustomTable = oSheet.CustomTables.Add("Sample Table", ThisApplication.TransientGeometry.CreatePoint2d(15, 15), 2, 2, oTitles,MyArray) '''here's my problem line of code
end sub