Message 1 of 7
[iLogic] Deleting Custom Table & Entering Values
Not applicable
11-02-2011
08:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all,
I need to insert a table on one of my Inventor drawings, however, it will vary in size (Fixed colums, variable number of rows). I have searched the forum and found this snippet of code to add a 2x20 table.
Sub Main()
Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
oSheet = oDrawDoc.ActiveSheet
' Set the column titles
Dim oTitles() As String = {"Member","Pos. From Datum A"}
Dim oPoint As Point2d
oPoint = ThisApplication.TransientGeometry.CreatePoint2d(1, 28.7)
' Create the custom table
Dim oCustomTable As CustomTable
oCustomTable = oSheet.CustomTables.Add("Infill Spacing", oPoint, 2, 20, oTitles)
End SubThe Problem
I now need to be able to do two things:
1. Delete all custom tables that may be on the drawing ( I may have more than 1 custom table on the drawing)
2. Access the individual rows and colums in a specific table so I can write a variable into them.
I have searched high and low for the API commands, but cant seem to find them. As always, any help is appreciated.
Many Thanks