iLogic error using embedded excel table Inventor 2020.3

iLogic error using embedded excel table Inventor 2020.3

Pav3L
Advocate Advocate
3,918 Views
16 Replies
Message 1 of 17

iLogic error using embedded excel table Inventor 2020.3

Pav3L
Advocate
Advocate

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

0 Likes
Accepted solutions (3)
3,919 Views
16 Replies
Replies (16)
Message 2 of 17

Pav3L
Advocate
Advocate
0 Likes
Message 3 of 17

JaneFan
Autodesk
Autodesk

Hey @Pav3L , 

 

Please try to add a user variable UseLibxl and set it to value 1, like this: UseLibxl = 1, then reboot computer to check the behavior.

var.PNG




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 4 of 17

JaneFan
Autodesk
Autodesk

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. 

 

 




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 5 of 17

Pav3L
Advocate
Advocate

Hello @JaneFan 

I have tryied the variable UseLibxl = 1 and the error have changed to 

errorerrormore infomore info

 

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). 

officeoffice

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.

0 Likes
Message 6 of 17

JMGunnar
Collaborator
Collaborator

Have you try too rename "BEAM LIST" to Embedding 10 

 

GoExcel.Close

is not finding excel worksheet  to close

 

 

 

 

 

 

 

Excel.close.png

0 Likes
Message 7 of 17

Pav3L
Advocate
Advocate

I did try it now and it did not help, the error stays the same.

0 Likes
Message 8 of 17

JMGunnar
Collaborator
Collaborator

Check in taskmanager for Excel 32 bit process 

remove process 

Reboot computer

0 Likes
Message 9 of 17

Pav3L
Advocate
Advocate

I don't see any process with that name or with similar name in task manager. Attached are screenshots with all processes running.

0 Likes
Message 10 of 17

JMGunnar
Collaborator
Collaborator

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.

 

 

 

 

 

0 Likes
Message 11 of 17

damian.lewczyk
Autodesk Support
Autodesk Support

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?


Damian Lewczyk
Technical Support Specialist
Autodesk
0 Likes
Message 12 of 17

Pav3L
Advocate
Advocate

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.

 

0 Likes
Message 13 of 17

Pav3L
Advocate
Advocate
Accepted solution

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.

Message 14 of 17

JaneFan
Autodesk
Autodesk

Thanks for sharing the information @Pav3L , please let us know the result after the try at work.  




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 15 of 17

Pav3L
Advocate
Advocate
Accepted solution

I can happily report that reinstalling the Office also helped at work!

Message 16 of 17

JaneFan
Autodesk
Autodesk

Great to know the news and thanks for sharing! 🙂




Jane Fan
Inventor/Fusion QA Engineer
0 Likes
Message 17 of 17

-JvdZ-
Participant
Participant
Accepted solution

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!

0 Likes