- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
at the end of March (March 27) I created a model, see the attachment packngo.zip, which worked normally. Yesterday I wanted to show a colleague on this model how to make an embedded excel table and use its data as parameters, but it stopped working and it shows errors.
It shows an error on my PC, it shows an error on a colleague's PC, and it also shows an error on my PC at home, but before that it worked normally on all PCs. We have another large model of our products which I have already used, at home and at work, this model also worked, but now it also shows an error message, this model also has embedded excel tables.
The error occurs if I run one of the following iLogic rules "Cross Beam Selection" or "Support Beam Selection Rule" or "End Beam Selection Rule" in the included model ("PK-7009-GA-CFB.iam" assembly). These are simple rules for selecting profiles from an embedded excel table.
The rules looks like this:
SourceFile = "3rd party:Embedding 10"
SheetName = "CrossBeam"
'CROSS BEAM
GoExcel.Open(SourceFile, SheetName)
Dim CrossBeamList As New ArrayList
GoExcel.TitleRow = 1
CrossBeamList = GoExcel.CellValues("A2", "A100")
Dim SelectedCrossBeam As String
Try
SelectedCrossBeam = InputListBox("CHOOSE CROSS BEAM", CrossBeamList, SelectedCrossBeam, Title := "CROSS BEAM", ListName := "Cross Beam List")
Parameter("CrossBeam") = SelectedCrossBeam
Catch
MsgBox("Cross Beam not chosen!", MessageBoxIcon.Warning, "ATTENTION !")
End Try
ColumnA = GoExcel.CellValue("A1")
rowNumber = GoExcel.FindRow(SourceFile, SheetName, ColumnA, "<=", SelectedCrossBeam)
Parameter("CBWidth") = GoExcel.CellValue("B" & rowNumber)
Parameter("CBHeight") = GoExcel.CellValue("C" & rowNumber)
Parameter("CBThk") = GoExcel.CellValue("D" & rowNumber)
GoExcel.Close
iLogicVb.RunRule("Pass Down Rule")
iLogicVb.UpdateWhenDone = True
The following error appear.
PC1 in work:
Error message:
Error in rule: Cross Beam Selection, in document: PK-7009-GA-CFB.iam
Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))
More info:
System.Runtime.InteropServices.COMException (0x8002802B): Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND))
at Microsoft.Office.Interop.Excel._Worksheet.get_Application()
at Autodesk.iLogic.Core.ExcelInterface.ComWorksheet.get_Application()
at iLogic.GoExcel.SetCurrentSheet(String fileName, String sheetName)
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
PC2 in work and PC home - the error is the same for these PCs:
Error message:
Error in rule: Cross Beam Selection, in document: PK-7009-GA-CFB.iam
Exception from HRESULT: 0x800A03EC
More info:
System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC
at Microsoft.Office.Interop.Excel._Workbook.Close(Object SaveChanges, Object Filename, Object RouteWorkbook)
at iLogic.GoExcel.Close()
at ThisRule.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
Here is also a link to google drive where are screenshots of the errors, zip file wtih the model and txt file with the errors.
I think this is a problem somehow related to excel, but I have no idea what. Strange is the problem is on 3 different PCs where it worked normally not so long ago.
I have a headache from this, because I cannot use our main model for new orders... and I will have go back and create it in Autocad.
Thank you in advance for any help yo ucan give me to fix this!
Best regards
Pavel
Solved! Go to Solution.