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.
SCREENCAST with the error https://knowledge.autodesk.com/community/screencast/065be0f6-b552-4fb6-ac68-0cbc29714808
Sorry for the imprecise information. Just adding this variable doesn't solve the issue with inventor 2020 if the computer has excel of some certain version.
Can I have your excel version on the computer?
We are trying to find the cause of this issue and will keep you posted.
Hello @JaneFan
I have tryied the variable UseLibxl = 1 and the error have changed to
Excel version: Microsoft office 2019 for home and business, version 2004 (build 12730.20250). My colleague has version Microsoft office 2019 for home and business, version 2004 (build 12730.20236).
Thank you.
PS. at home I have tried a clean uninstall of all Autodesk products (Inventor and Autocad) https://knowledge.autodesk.com/customer-service/download-install/remove-products/clean-uninstall and install Inventor again and the error still happens.
I don't see any process with that name or with similar name in task manager. Attached are screenshots with all processes running.
Yesterday i try you modell and get you error
Today i try i not get you error
I can't found what wrong
thats i try yesterday
Option 1:
Open Excel file from file.
Edit parameters.
Save Excel file (but don't close Excel).
Restart computer
Update part in Inventor.
Close Excel now.
Options 2
close excel process in task manager
then reboot computer.
this not solution but clue
today you modell works in my computer.
Dear Pavel
What will happen if you move the excel file to your local disc and re-link it to your assembly?
Move this excel file to e.g. C:\TEMP.
Could be this problem related to VPN?
Hello Damian,
if I use the file from a local disc, then I get a different error message.
Here is a screencast of the error in "action".
ERROR Message:
Error in rule: Cross Beam Selection, in document: PK-7009-GA-CFB.iam
Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).
More Info:
System.InvalidCastException: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Element not found. (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Excel.ApplicationClass.get_LanguageSettings()
at Autodesk.iLogic.Core.ExcelInterface.ComApplication.get_LanguageID()
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)
The Microsoft NET framework details is attached to this message as txt file, it is too long to past here... 1149 lines of text.
I tried the last thing that came to mind and I reinstalled Office on my home computer and it worked. The embedded and external excel tables are working again.
Fingers crossed :), I will try to do the same at work tomorrow.
Hi All,
Repair will also do the thing. Customer had also this problem. They did a repair on Office and now it is working fine again.
Jaap van der Zwan
Consultant Manufacturing at Cadac Group MFG BV | NL
_____________________________________________________________________________...
My Screencasts | My Articles
If my post answers your question, please click the "Accept as Solution" button. This helps everyone find answers more quickly!
Can't find what you're looking for? Ask the community or share your knowledge.