- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
iLogic rule all of a sudden not working
Greetings all
I have been using an ilogic rule for some time without any issues. The code (see below) I got from Curtis Waguespacks's site from memory. A really good resource for productivity in my case; it writes data from a spreadsheet to the title block, labels etc.
All of a sudden it will no longer work! Any ideas on how to get this thing working again?
I have not changed a thing - before you ask...
'Browse for the Excel file
Dim oFileDlg As inventor.FileDialog = Nothing
InventorVb.Application.CreateFileDialog(oFileDlg)
oFileDlg.Filter = "Excel Files (*.xls;*.xlsx)|*.xls;*.xlsx"
oFileDlg.DialogTitle = "Select a Project Information Excel File"
oFileDlg.InitialDirectory = ThisDoc.Path
oFileDlg.CancelError = True
On Error Resume Next
oFileDlg.ShowOpen()
If Err.Number <> 0 Then
'exit if file not selected
Return
ElseIf oFileDlg.FileName <> "" Then
myXLS = oFileDlg.FileName
End If
'look at sheet1 of the spreadsheet
GoExcel.Open(myXLS, "Sheet1")
Dim oName As String = GoExcel.CellValue("A1")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B1")
oName = GoExcel.CellValue("A2")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B2")
oName = GoExcel.CellValue("A3")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B3")
oName = GoExcel.CellValue("A4")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B4")
oName = GoExcel.CellValue("A5")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B5")
oName = GoExcel.CellValue("A6")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B6")
oName = GoExcel.CellValue("A7")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B7")
oName = GoExcel.CellValue("A8")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B8")
oName = GoExcel.CellValue("A9")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B9")
oName = GoExcel.CellValue("A10")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B10")
oName = GoExcel.CellValue("A11")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B11")
oName = GoExcel.CellValue("A12")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B12")
oName = GoExcel.CellValue("A13")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B13")
oName = GoExcel.CellValue("A14")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B14")
oName = GoExcel.CellValue("A15")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B15")
oName = GoExcel.CellValue("A16")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B16")
oName = GoExcel.CellValue("A17")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B17")
oName = GoExcel.CellValue("A18")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B18")
oName = GoExcel.CellValue("A19")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B19")
oName = GoExcel.CellValue("A20")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B20")
oName = GoExcel.CellValue("A21")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B21")
oName = GoExcel.CellValue("A22")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B22")
oName = GoExcel.CellValue("A23")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B23")
oName = GoExcel.CellValue("A24")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B24")
oName = GoExcel.CellValue("A25")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B25")
oName = GoExcel.CellValue("A26")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B26")
oName = GoExcel.CellValue("A27")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B27")
oName = GoExcel.CellValue("A28")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B28")
oName = GoExcel.CellValue("A29")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B29")
oName = GoExcel.CellValue("A30")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B30")
oName = GoExcel.CellValue("A31")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B31")
oName = GoExcel.CellValue("A32")
iProperties.Value("Custom", oName) = GoExcel.CellValue("B32")
GoExcel.Close