HRESULT: 0x80004005 while run external iLogic on one of the two IPTs

HRESULT: 0x80004005 while run external iLogic on one of the two IPTs

Maxim-CADman77
Advisor Advisor
1,384 Views
4 Replies
Message 1 of 5

HRESULT: 0x80004005 while run external iLogic on one of the two IPTs

Maxim-CADman77
Advisor
Advisor

I have attached couple IPTs (first is referencing the second as Derived).

I wonder why I'm getting "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))" when running single-line external iLogic (supposed just to show the name of material) on one of them?

MsgBox (ThisDoc.Document.ComponentDefinition.Material.Name,,"Part's material name is:     ")

If it possible to recompose this rule in a way compatible with both IPTs?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
1,385 Views
4 Replies
Replies (4)
Message 2 of 5

frederic.vandenplas
Collaborator
Collaborator
Accepted solution

Hi @Maxim-CADman77

This is plain vba code that i "converted" to iLogic

Vba:

Dim oDoc As PartDocument
Set oDoc = ThisApplication.ActiveDocument
MsgBox (oDoc.ActiveMaterial.DisplayName)

iLogic:

.

Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveDocument
MsgBox (oDoc.ActiveMaterial.DisplayName)
If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"
0 Likes
Message 3 of 5

Maxim-CADman77
Advisor
Advisor

I can confirm - MsgBox with material name now appears for both IPTs. Thus the initial issue is solved but ... still Error 80004005 pops if iLogic editor is opening while Angle_MIR part is active.

Seems like Angle_Mir.ipt is somehow defected, right?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 4 of 5

MjDeck
Autodesk
Autodesk

Angle_MIR.ipt is a sheetmetal part, but it has no sheetmetal parameters. That's what causes the iLogic error. It also seems to be missing other things that would make it a useful sheet metal part. Notice that you can't create sheet metal features or a flat pattern. The part was created in Inventor R10, and it's possible that the component mirror operation at that time did not properly use the sheet metal template. The part units are centimeters, and that might mean that it was created with no template at all. 

If you can, I'd recommend deleting it and creating a new mirrored part from Angle.ipt.


Mike Deck
Software Developer
Autodesk, Inc.

0 Likes
Message 5 of 5

Maxim-CADman77
Advisor
Advisor

Thank you, Mike!

PS: Hope you can also look at this thread - https://forums.autodesk.com/t5/inventor-customization/occasional-quot-object-variable-or-with-block-...

 

Please vote for Inventor-Idea Text Search within Option Names

0 Likes