iLogic Embedded Excel File Error

iLogic Embedded Excel File Error

Anonymous
Not applicable
1,741 Views
8 Replies
Message 1 of 9

iLogic Embedded Excel File Error

Anonymous
Not applicable

Hello All,

 

I have a query regarding the embedded excel file in iLogic. I have an Excel file embedded in ipt. file but when I try to use data values for parameters in skeleton from that excel file, it shows me an error message as below

 

“Error in rule: SFF Sizing Excel, in document: Main Skeleton.ipt

 

Exception from HRESULT: 0x800A01A8"

 

Whereas the interesting thing is when I open the embedded excel file and keep it open in background and then try to use data value from it, it goes smooth with no error.

 

Can you please help me over this issue?

 

Thank you

 

Please find the attached images for error information.  

 

0 Likes
1,742 Views
8 Replies
Replies (8)
Message 2 of 9

MechMachineMan
Advisor
Advisor
Read through this:

http://coderelief.net/2011/08/20/vsto-com-exception-0x800a01a8/

It's saying that however you had it coded, the file is trying to access an object that does not exist at that point in time. So it must want you to initialize and open your excel file to access the data stored within it.
This is different from how you code in inventor as inventor automatically opens its native files whenever they are called somewhere.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 3 of 9

Anonymous
Not applicable

Dear Justin,

 

I got it that i should use the Null function. But i dont know how to use it. My rule is as following.

 

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 57929 StartFragment: 314 EndFragment: 57897 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet

'General Rule
If (CompCode = "SFF040" Or CompCode = "SFF050") And DomeType = "Enlarged" Then
MessageBox.Show("Enlarged Dome Type is not available for SFF040 & SFF050", "Enlarged Dome Type")
DomeType = "Standard"
End If
If CompCode = "SFF030" Then
MessageBox.Show("SFF030 is not available at this time", "SFF030 Not Available")
CompCode = "SFF040"
End If
'Dome Type Based Rules
If DomeType = "Standard" Then

i = GoExcel.FindRow("3rd Party:Embedding 2", "Standard Dome", "Comp. code", "=", CompCode)

D1int = GoExcel.CurrentRowValue("D1int")
D2int = GoExcel.CurrentRowValue("D2int")
D3int = GoExcel.CurrentRowValue("D3int")
D4int = GoExcel.CurrentRowValue("D4int")
D5 = GoExcel.CurrentRowValue("D5")
D6 = GoExcel.CurrentRowValue("D6")
'Parameter("Main Skeleton:1", "H") = GoExcel.CurrentRowValue("H")
H1 = GoExcel.CurrentRowValue("H1")
H2 = GoExcel.CurrentRowValue("H2")
'H3 = GoExcel.CurrentRowValue("H3")
H4 = GoExcel.CurrentRowValue("H4")
H5 = GoExcel.CurrentRowValue("H5")
H6 = GoExcel.CurrentRowValue("H6")
H7 = GoExcel.CurrentRowValue("H7")
L1 = GoExcel.CurrentRowValue("L1")
L2 = GoExcel.CurrentRowValue("L2")
L3 = GoExcel.CurrentRowValue("L3")
L4 = GoExcel.CurrentRowValue("L4")
S1 = GoExcel.CurrentRowValue("S1")
S2 = GoExcel.CurrentRowValue("S2")
S3 = GoExcel.CurrentRowValue("S3")
S4 = GoExcel.CurrentRowValue("S4")
S5 = GoExcel.CurrentRowValue("S5")
S6 = GoExcel.CurrentRowValue("S6")
S7 = GoExcel.CurrentRowValue("S7")
S8 = GoExcel.CurrentRowValue("S8")
S9 = GoExcel.CurrentRowValue("S9")
S10 = GoExcel.CurrentRowValue("S10")
Floor_Ring_Thickness = GoExcel.CurrentRowValue("Floor Ring Thickness")
'QTY = GoExcel.CurrentRowValue("QTY")
Stiffening_Ring_Thickness = GoExcel.CurrentRowValue("Stiffening Ring Thickness")
Stiffening_Ring_Length = GoExcel.CurrentRowValue("Stiffening Ring Length")
Hs = GoExcel.CurrentRowValue("Hs")
Hs1 = GoExcel.CurrentRowValue("Hs1")
Hs2 = GoExcel.CurrentRowValue("Hs2")
Hs3 = GoExcel.CurrentRowValue("Hs3")
De1 = GoExcel.CurrentRowValue("De1")
De2 = GoExcel.CurrentRowValue("De2")
Db = GoExcel.CurrentRowValue("Db")
'Parameter("Main Skeleton:1", "Dm") = GoExcel.CurrentRowValue("Dm")
Pressed_Bottom_Height = GoExcel.CurrentRowValue("Pressed Bottom Height")


Else If DomeType = "Enlarged" Then

i = GoExcel.FindRow("3rd Party:Embedding 2", "Enlarged Dome", "Comp. code", "=", CompCode)

D1int = GoExcel.CurrentRowValue("D1int")
D2int = GoExcel.CurrentRowValue("D2int")
D3int = GoExcel.CurrentRowValue("D3int")
D4int = GoExcel.CurrentRowValue("D4int")
D5 = GoExcel.CurrentRowValue("D5")
D6 = GoExcel.CurrentRowValue("D6")
'Parameter("Main Skeleton:1", "H") = GoExcel.CurrentRowValue("H")
H1 = GoExcel.CurrentRowValue("H1")
H2 = GoExcel.CurrentRowValue("H2")
'H3 = GoExcel.CurrentRowValue("H3")
H4 = GoExcel.CurrentRowValue("H4")
H5 = GoExcel.CurrentRowValue("H5")
H6 = GoExcel.CurrentRowValue("H6")
H7 = GoExcel.CurrentRowValue("H7")
L1 = GoExcel.CurrentRowValue("L1")
L2 = GoExcel.CurrentRowValue("L2")
L3 = GoExcel.CurrentRowValue("L3")
L4 = GoExcel.CurrentRowValue("L4")
S1 = GoExcel.CurrentRowValue("S1")
S2 = GoExcel.CurrentRowValue("S2")
S3 = GoExcel.CurrentRowValue("S3")
S4 = GoExcel.CurrentRowValue("S4")
S5 = GoExcel.CurrentRowValue("S5")
S6 = GoExcel.CurrentRowValue("S6")
S7 = GoExcel.CurrentRowValue("S7")
S8 = GoExcel.CurrentRowValue("S8")
S9 = GoExcel.CurrentRowValue("S9")
S10 = GoExcel.CurrentRowValue("S10")
Floor_Ring_Thickness = GoExcel.CurrentRowValue("Floor Ring Thickness")
'QTY = GoExcel.CurrentRowValue("QTY")
Stiffening_Ring_Thickness = GoExcel.CurrentRowValue("Stiffening Ring Thickness")
Stiffening_Ring_Length = GoExcel.CurrentRowValue("Stiffening Ring Length")
Hs = GoExcel.CurrentRowValue("Hs")
Hs1 = GoExcel.CurrentRowValue("Hs1")
Hs2 = GoExcel.CurrentRowValue("Hs2")
Hs3 = GoExcel.CurrentRowValue("Hs3")
De1 = GoExcel.CurrentRowValue("De1")
De2 = GoExcel.CurrentRowValue("De2")
Db = GoExcel.CurrentRowValue("Db")
'Parameter("Main Skeleton:1", "Dm") = GoExcel.CurrentRowValue("Dm")
Pressed_Bottom_Height = GoExcel.CurrentRowValue("Pressed Bottom Height")

End If

InventorVb.DocumentUpdate()

iLogicVb.RunRule("Bottom Type")
iLogicVb.RunRule("Inlet Outlet Orientation")
iLogicVb.RunRule("Stiffening Rule")
0 Likes
Message 4 of 9

MechMachineMan
Advisor
Advisor
You need to open the excel workbook before you use it, otherwise inventor doesn't know what/where you are talking about.
You can do this via:


Worksheet = ("C:\Location")
Sheetno = ("Sheet1")
' Open excel
GoExcel.Open(Worksheet, Sheetno)

@Anonymous wrote:

Dear Justin,

 

I got it that i should use the Null function. But i dont know how to use it. My rule is as following.

 

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 57929 StartFragment: 314 EndFragment: 57897 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet

'General Rule
If (CompCode = "SFF040" Or CompCode = "SFF050") And DomeType = "Enlarged" Then
MessageBox.Show("Enlarged Dome Type is not available for SFF040 & SFF050", "Enlarged Dome Type")
DomeType = "Standard"
End If
If CompCode = "SFF030" Then
MessageBox.Show("SFF030 is not available at this time", "SFF030 Not Available")
CompCode = "SFF040"
End If
'Dome Type Based Rules
If DomeType = "Standard" Then

i = GoExcel.FindRow("3rd Party:Embedding 2", "Standard Dome", "Comp. code", "=", CompCode)

D1int = GoExcel.CurrentRowValue("D1int")
D2int = GoExcel.CurrentRowValue("D2int")
D3int = GoExcel.CurrentRowValue("D3int")
D4int = GoExcel.CurrentRowValue("D4int")
D5 = GoExcel.CurrentRowValue("D5")
D6 = GoExcel.CurrentRowValue("D6")
'Parameter("Main Skeleton:1", "H") = GoExcel.CurrentRowValue("H")
H1 = GoExcel.CurrentRowValue("H1")
H2 = GoExcel.CurrentRowValue("H2")
'H3 = GoExcel.CurrentRowValue("H3")
H4 = GoExcel.CurrentRowValue("H4")
H5 = GoExcel.CurrentRowValue("H5")
H6 = GoExcel.CurrentRowValue("H6")
H7 = GoExcel.CurrentRowValue("H7")
L1 = GoExcel.CurrentRowValue("L1")
L2 = GoExcel.CurrentRowValue("L2")
L3 = GoExcel.CurrentRowValue("L3")
L4 = GoExcel.CurrentRowValue("L4")
S1 = GoExcel.CurrentRowValue("S1")
S2 = GoExcel.CurrentRowValue("S2")
S3 = GoExcel.CurrentRowValue("S3")
S4 = GoExcel.CurrentRowValue("S4")
S5 = GoExcel.CurrentRowValue("S5")
S6 = GoExcel.CurrentRowValue("S6")
S7 = GoExcel.CurrentRowValue("S7")
S8 = GoExcel.CurrentRowValue("S8")
S9 = GoExcel.CurrentRowValue("S9")
S10 = GoExcel.CurrentRowValue("S10")
Floor_Ring_Thickness = GoExcel.CurrentRowValue("Floor Ring Thickness")
'QTY = GoExcel.CurrentRowValue("QTY")
Stiffening_Ring_Thickness = GoExcel.CurrentRowValue("Stiffening Ring Thickness")
Stiffening_Ring_Length = GoExcel.CurrentRowValue("Stiffening Ring Length")
Hs = GoExcel.CurrentRowValue("Hs")
Hs1 = GoExcel.CurrentRowValue("Hs1")
Hs2 = GoExcel.CurrentRowValue("Hs2")
Hs3 = GoExcel.CurrentRowValue("Hs3")
De1 = GoExcel.CurrentRowValue("De1")
De2 = GoExcel.CurrentRowValue("De2")
Db = GoExcel.CurrentRowValue("Db")
'Parameter("Main Skeleton:1", "Dm") = GoExcel.CurrentRowValue("Dm")
Pressed_Bottom_Height = GoExcel.CurrentRowValue("Pressed Bottom Height")


Else If DomeType = "Enlarged" Then

i = GoExcel.FindRow("3rd Party:Embedding 2", "Enlarged Dome", "Comp. code", "=", CompCode)

D1int = GoExcel.CurrentRowValue("D1int")
D2int = GoExcel.CurrentRowValue("D2int")
D3int = GoExcel.CurrentRowValue("D3int")
D4int = GoExcel.CurrentRowValue("D4int")
D5 = GoExcel.CurrentRowValue("D5")
D6 = GoExcel.CurrentRowValue("D6")
'Parameter("Main Skeleton:1", "H") = GoExcel.CurrentRowValue("H")
H1 = GoExcel.CurrentRowValue("H1")
H2 = GoExcel.CurrentRowValue("H2")
'H3 = GoExcel.CurrentRowValue("H3")
H4 = GoExcel.CurrentRowValue("H4")
H5 = GoExcel.CurrentRowValue("H5")
H6 = GoExcel.CurrentRowValue("H6")
H7 = GoExcel.CurrentRowValue("H7")
L1 = GoExcel.CurrentRowValue("L1")
L2 = GoExcel.CurrentRowValue("L2")
L3 = GoExcel.CurrentRowValue("L3")
L4 = GoExcel.CurrentRowValue("L4")
S1 = GoExcel.CurrentRowValue("S1")
S2 = GoExcel.CurrentRowValue("S2")
S3 = GoExcel.CurrentRowValue("S3")
S4 = GoExcel.CurrentRowValue("S4")
S5 = GoExcel.CurrentRowValue("S5")
S6 = GoExcel.CurrentRowValue("S6")
S7 = GoExcel.CurrentRowValue("S7")
S8 = GoExcel.CurrentRowValue("S8")
S9 = GoExcel.CurrentRowValue("S9")
S10 = GoExcel.CurrentRowValue("S10")
Floor_Ring_Thickness = GoExcel.CurrentRowValue("Floor Ring Thickness")
'QTY = GoExcel.CurrentRowValue("QTY")
Stiffening_Ring_Thickness = GoExcel.CurrentRowValue("Stiffening Ring Thickness")
Stiffening_Ring_Length = GoExcel.CurrentRowValue("Stiffening Ring Length")
Hs = GoExcel.CurrentRowValue("Hs")
Hs1 = GoExcel.CurrentRowValue("Hs1")
Hs2 = GoExcel.CurrentRowValue("Hs2")
Hs3 = GoExcel.CurrentRowValue("Hs3")
De1 = GoExcel.CurrentRowValue("De1")
De2 = GoExcel.CurrentRowValue("De2")
Db = GoExcel.CurrentRowValue("Db")
'Parameter("Main Skeleton:1", "Dm") = GoExcel.CurrentRowValue("Dm")
Pressed_Bottom_Height = GoExcel.CurrentRowValue("Pressed Bottom Height")

End If

InventorVb.DocumentUpdate()

iLogicVb.RunRule("Bottom Type")
iLogicVb.RunRule("Inlet Outlet Orientation")
iLogicVb.RunRule("Stiffening Rule")

 


--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 5 of 9

Anonymous
Not applicable

This is used for linked excel file but how to open an embedded file?

0 Likes
Message 6 of 9

MechMachineMan
Advisor
Advisor
Find where it is stored.

--------------------------------------
Did you find this reply helpful ? If so please use the 'Accept as Solution' or 'Like' button below.

Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization


iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming| Continuous Pick/Rename Objects

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells | Fourth BOM Type
0 Likes
Message 7 of 9

Anonymous
Not applicable
Its Embedded so now it is within the ipt file not in any of my drives.
0 Likes
Message 8 of 9

Anonymous
Not applicable

I think it is a bug in Inventor 2014.

I made a separte ipt file with embedded excel with limited values in it.

Now when i close the excel file it sometimes works and some times give me the same error.

As soon as i open the embedded excel file it it always runs smooth. 

0 Likes
Message 9 of 9

Anonymous
Not applicable
Gave me following error
"System.Runtime.InteropServices.COMException (0x800A01A8): Exception from HRESULT: 0x800A01A8
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Microsoft.Office.Interop.Excel.Range.get__Default(Object RowIndex, Object ColumnIndex)
at iLogic.GoExcel.FindColumn(String columnName)
at iLogic.GoExcel.CurrentRowValue(String columnName)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)"
0 Likes