Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Export Flat Pattern to .STP From Drawing

1 REPLY 1
Reply
Message 1 of 2
truscher
732 Views, 1 Reply

Export Flat Pattern to .STP From Drawing

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.

 

Regards,

Thomas Ruscher

Project Engineer

TJ Hale Co.

 

 

Tags (3)
1 REPLY 1
Message 2 of 2
cean_au
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.


Regards

 

Cean

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report