Reply

HRESULT: 0x80004005 (E_FAIL)

Getting an intermittent error when saving a Solid Edge Draft file using the function.

SolidEdgeDraft.DraftDocument.SaveAs

 

9 times out of ten this works fine, on occasions we get the following error:

 

 

System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)  at SolidEdgeDraft.DraftDocument.SaveAs(String NewName, Object IsATemplate, Object FileFormat, Object ReadOnlyEnforced, Object ReadOnlyRecommended, Object NewStatus, Object CreateBackup, Object UpdateLinkInContainer, Object UpdateAllLinksInContainer)

 

I realise Unspecified error doesn’t give much to go on!! Does anybody have any pointers as to where to start debugging this?

 

The same scenario with same actions will sometimes work and sometimes won't, the issue occurs on multiple machines. All running ST6 with latest service packs.

We have been seeing this issue for the best part of 12 months, however I am unable to reliably reproduce it consistently, hence having problems debugging it.

 

2 REPLIES

Re: HRESULT: 0x80004005 (E_FAIL)

I get error "Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"

in program line

"objFlatPatterns.Item(1).SetCutSizeValues(MaxCutSizeX:=oMaxCutSizeX, MaxCutSizeY:=oMaxCutSizeY, ShowRangeBox:=oShowRangeBox, AlarmOnX:=oAlarmOnX, AlarmOnY:=oAlarmOnY, UseDefaultValues:=oUseDefaultValues)"

 

I also looking for solution, but i didnt find any :/

Re: HRESULT: 0x80004005 (E_FAIL)

are your trying to do somethign else afte the saveas...  in which saveas may not be complete yet?

 

Maybe an ObjApp.doidle() would help?