Hi,
We are using Inventor API for an application that imports inventor files.
One of the API method SheetMetalComponentDefinition.Unfold() throws exception as below.
The issue is observed on the Inventor build SP1.1
Imp Note:
If the part is open in Inventor window, then the API works as expected, otherwise it fails.
It is also observed that, If we uninstall SP1.1 (both updates) the API works fine.
Additional Info:
OS: Windows 7
Inventor Professional 2013 64-Bit Edition
Build: 176 Release: 2013 SP1.1 64bit edition
Refer attached test application and test part.
Here is code snippet and exception data.
PartDocument partDocument = this.activeDocument as PartDocument;
SheetMetalComponentDefinition sheetMetalDefinition = partDocument.ComponentDefinition as
if (!sheetMetalDefinition.HasFlatPattern)
{
sheetMetalDefinition.Unfold();
MessageBox.Show("Unfold Part: Suceessful.");
}
Exception Detail
System.Runtime.InteropServices.COMException was caught
Message="Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
Source=""
ErrorCode=-2147467259
StackTrace:
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Inventor.SheetMetalComponentDefinition.Unfold()
The issue has high impact on product,
Hence I would apreciate if we get a solution (or atleast a workaround) soon.
Thanks in advance.
Hi,
yes, I also found only when the document is opened visible can the method work. This looks a problem to me. I logged it.
Currently, you have to open the document visible.
Hi,
Thanks for the follow up. Is there any update available on this issue?
Regards
Cool! Eight years, and yet no solution! Not even a hint in the Help!
Autodesk, you're the greatest!