Inventor Customization

Posts: 22
Registered: ‎11-09-2010
Message 1 of 2 (266 Views)

Export Flat Pattern to .STP From Drawing

266 Views, 1 Replies
02-05-2013 09:53 AM

Good Morning,


I am trying to write an external iLogic rule that will export the unfolded model of a sheet metal part in a drawing from a rule triggered in the .idw. These drawings will contain only one model reference. The reason for doing this from the drawing are as follows:


1) The location of the resulting .stp file must be the same directory as the .idw file. our file structure does not co-locate these files so the drawing path is required to locate the .stp file.


2) The current Drawing Rev level is to appended to the .stp file name. We do not populate the Rev iProperty in the part.


I have scabbed together some code from verious deep dark corners on the internet and Have arrived at the code posted below, but It errors during the .stp file creation with the following:


Error Message:

Error in rule: STEP Export With Rev, in document: 4000401-02 Blank Pattern.idw

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))


More Info:

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 Inventor.FlatPattern.Edit()

   at LmiRuleScript.Main()

   at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)

   at iLogic.RuleEvalContainer.ExecRuleEval(String execRule).


I have  attached the rule in question in case the formating flakes out...


This is a big deal for us as we have made lots of scrap due to our laser vendor cutting out of date files. Any help here would Greatly Appreciated.



Thomas Ruscher

Project Engineer

TJ Hale Co.



Valued Contributor
Posts: 100
Registered: ‎07-11-2011
Message 2 of 2 (248 Views)

Re: Export Flat Pattern to .STP From Drawing

02-05-2013 06:06 PM in reply to: truscher

Hi Thomas,


I tried this and only got a step file in folded format. It is the same like you export from part document from the menu.




You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community

Inventor Exchange Apps

Created by the community for the community, Autodesk Exchange Apps for Autodesk Inventor helps you achieve greater speed, accuracy, and automation from concept to manufacturing.

Connect with Inventor