Automating Conversion of STEP files to Inventor Files

Automating Conversion of STEP files to Inventor Files

Anonymous
Not applicable
1,029 Views
3 Replies
Message 1 of 4

Automating Conversion of STEP files to Inventor Files

Anonymous
Not applicable

I'm working with a FIRST FRC Robotics team. We'd like to convert the STEP files we get from vendors into Inventor files so we can use them more easily to create the design of our robot. The problem is, there are several thousand parts, so doing it by hand, while possible, would take too much time for the number of students we have.

 

I've written a script that renames the parts files, including the internal references, to match our part numbering system, but now I need to do the actual conversion. The simplest way appears to be to open each part in Inventor, which then creates a .ipt file in the project, and then close the part - rinse repeat. It seems like the perfect job for some kind of scripting or macro language. Inventor uses VBA, which I haven't touched for years, but I'm working on picking it back up.

 

I've done a lot of searching, but haven't found anything that works. Can someone please help me?

 

Thanks,

  Ray

 

Below is my test routine. In it, I'm just trying to open a STEP file in Inventor. The part filename comes from the filenames.txt file.

 

Sub ProcessDoc()
    ' Open filename file
    Dim File_Path As String
    File_Path = "C:\Users\Ray\Desktop\Unzipped Parts\filenames.txt"
    MsgBox "Trying to open " + File_Path
    Dim fs, f, ts, s
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFile(File_Path)
    Set ts = f.OpenAsTextStream(1, -2)
    s = ts.ReadLine
    MsgBox s
    Set oInv = ThisApplication.Documents.Open(s)
    ts.Close
End Sub


0 Likes
1,030 Views
3 Replies
Replies (3)
Message 2 of 4

Mark.Lancaster
Consultant
Consultant

Programming questions should be posted over in the Inventor Customization Forum: https://knowledge.autodesk.com/support/inventor-products/troubleshooting/caas/sfdcarticles/sfdcartic...

 

However my first question is, what version of Inventor are you using?  If its 2016, the handling of importing STEP files is different now due to the ANYCAD technology.  Which means the STEP file can be imported as a reference file or converted to an IPT/IAM depending on what the STEP file is composed of.

Mark Lancaster


  &  Autodesk Services MarketPlace Provider


Autodesk Inventor Certified Professional & not an Autodesk Employee


Likes is much appreciated if the information I have shared is helpful to you and/or others


Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

0 Likes
Message 3 of 4

Anonymous
Not applicable

I'm using 2014. I'll post this over in the other forum, too.

 

Thanks,

  Ray

0 Likes
Message 4 of 4

Daniel248
Collaborator
Collaborator

 


@Anonymous wrote:

I'm working with a FIRST FRC Robotics team. We'd like to convert the STEP files we get from vendors into Inventor files so we can use them more easily to create the design of our robot. The problem is, there are several thousand parts, so doing it by hand, while possible, would take too much time for the number of students we have.


Hi Ray,

 

Have you considered using the Task Scheduler with the 'Import' option?

(import options dialogue looks somewhat different in 2014, but still works)

 

New Picture.png

 

0 Likes