Opening inventor model with iLogic and save as .stp file

Opening inventor model with iLogic and save as .stp file

Anonymous
Not applicable
1,365 Views
1 Reply
Message 1 of 2

Opening inventor model with iLogic and save as .stp file

Anonymous
Not applicable

I have an ilogic rule created to do a save as .dxf and .pdf from the .idw file.  It will then open the .ipt file without any issues.  The problem I am having is that I also want it to do a save as .stp of the model after it opens the model.  I get the following error.

 

 

Error in rule: Save As DXF PDF and open, in document: Save As DXF PDF and open.iLogicVb

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

 

Does anyone know if I need to add something to the code?

 

Here is the code I have written.

 

strFolder="C:\Vault_Workspace\Save As\"&iProperties.Value("Project", "Part Number")
ThisDoc.Document.SaveAs(strFolder&"_Rev"&iProperties.Value("Project", "Revision Number")&(".dxf") , True)
ThisDoc.Document.SaveAs(strFolder&"_Rev"&iProperties.Value("Project", "Revision Number")&(".pdf") , True)
doc=ThisDoc.PathAndFileName(False)&".ipt"ThisDoc.Launch(doc)
strFolder="C:\Vault_Workspace\Save As\"&iProperties.Value("Project", "Part Number")
ThisDoc.Document.SaveAs(strFolder&"_Rev"&iProperties.Value("Project", "Revision Number")&(".stp") , True)
MessageBox.Show("STEP Created", "File Save")

Any help will be greatly appreciated!!

 

Thanks

 

 

 

0 Likes
1,366 Views
1 Reply
Reply (1)
Message 2 of 2

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

STEP file is for data exchange of the model. It is meaningless for a drawing document. In UI, Inventor does not either provide the option (*stp) when Save Copy As a drawing. Even with Inventor API (TranslatorAddin), it will also fail. Hope this explains.

0 Likes