Hole Data
Hole Data
by Elise Moss
Available from SDC Publications www.sdcacad.com
Exercise 16-8
Estimated Time:
30 minutes
In this project, we will export hole data from a part into an Excel spreadsheet.
1.
Create a block in Inventor and place
several different holes in it.
Press OK.
4.
5.
6.
7.
8.
Go to ProjectReferences.
9.
12.
In this case,
we will be
CommonDialog1.FilterIndex = 1
creating a
CommonDialog1.DialogTitle = "Extract Data To:"
new Excel
CommonDialog1.ShowSave
FileN = CommonDialog1.FileName
file to be used
FrmHoleData.txtFileName.Text = FileN
to store our
End Sub
Hole Data.
14.
As before, most of our code happens when you press the Extract Hole Data command button.
16.
17.
18.
19.
We want to add a
workbook.
We set the active
worksheet to Sheet
1.
20.
We define where we are going to start on the sheet.
22.
data.
26.
'Excel Variables
On Error GoTo 0
'Maximize Excel
Excel.Visible = True
'Open new workbook
Set excelWorkBook = Excel.Workbooks.Add
'select sheet 1 of the workbook
Excel.Sheets("Sheet1").Select
Set excelSheet = Excel.ActiveWorkbook.Sheets("Sheet1")
End Sub