• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Autodesk Inventor Customization

    Reply
    Valued Contributor
    Posts: 86
    Registered: ‎07-13-2007
    Accepted Solution

    SaveAs Stp

    908 Views, 4 Replies
    09-30-2010 06:29 AM

    I'm trying to start up Inventor, open an assembly and save it to stp using API (C#).

     

    This works perfectly fine with parts, but not with assemblies.

     

    doc.SaveAs("fil.stp", true); // doc is an iam-file (Inventor.Document)

     

    ...gives me error: "Invalid parameter... HRESULT: 0x80070057 (E_INVALIDARG))".

     

    I start up Inventor visually so I know that the assembly opens up correctly with all parts and subassemblies.

    If I do it manually it works fine with Export -> CAD Format -> STEP (stp).

     

    Does anyone have any ideas why or what I'm doing wrong?

     

    Thanks!

     

    Please use plain text.
    Employee
    Posts: 84
    Registered: ‎11-13-2007

    Re: SaveAs Stp

    09-30-2010 11:57 AM in reply to: simonsson

    Can you try providing that full path for the output file, rather than just "fil.stp"? I tried the following VBA macro on the active assembly document in Inventor 2011 and it works for me.

     

    Sub SaveAsSTP()
    
        Dim oDoc As Document
        Set oDoc = ThisApplication.ActiveDocument
        
        Call oDoc.SaveAs("C:\temp\test.stp", True)
        
    End Sub

     

    Please use plain text.
    Valued Contributor
    Posts: 86
    Registered: ‎07-13-2007

    Re: SaveAs Stp

    10-01-2010 02:46 AM in reply to: sanjay.ramaswamy

    I found the problem. Inventor was not ready loading when I opened the assembly. Thanks!

    Please use plain text.
    New Member
    Belero
    Posts: 1
    Registered: ‎03-28-2011

    Re: SavAs Step

    03-28-2011 01:42 AM in reply to: simonsson

    Hi,

     

    Would it be possible to add options for the step export within the code?

    Specifically, does the export step have savecopyas options that can be set just like in the dxf/pdf translator addin?

     

    Goal: I want to preset the export options for the step file.

     

    options I would like to "grab" & "set":

    - Application Protocol: 203 or 214, then 214 alone, 214 IS or 214 DIS.

    - Include Sketches (True/False I guess)

     

     

    regards

     

    Please use plain text.
    Valued Mentor
    Ktelang
    Posts: 268
    Registered: ‎09-23-2010

    Re: SaveAs Stp

    11-14-2012 07:46 AM in reply to: sanjay.ramaswamy

    How can I access the saving options.

    I want to exclude the sketches while saving as stp

    ------------------------------------------------------------------------------
    Config :: Intel (R) Xeon (R) CPU E31245 @ 3.30 GHz, 16.0 GB, 64bit win7
    Inventor 2013 and Vault Basic 2013
    -----------------------------------------------------------------------------
    Please use plain text.