Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Extract Part Numbers from IAM ( assembly ) 1

Status
Not open for further replies.

oneilldm

Mechanical
Nov 23, 2001
47
0
0
US
From a Windows7 Command Line... I would like to run a program that would extract the parts list from all the iam files in a folder. CSV output would be fine. I'd like to get 2 columns... one for the parent (repaets as needed) and the other for the related child part number. Is there a way to do this? Thanks
 
Replies continue below

Recommended for you

How many files are you talking about here?
There are plenty of tools to export boms from open assemblies in Inventor but outside of Inventor will require some custom coding/.net/vba/apprentice stuff..

This works outside of Inventor but only seems to do 1 iam file at a time

This works inside of Inventor on open assembly files.. and adds some additional functionality over what the Inventor BOM dialog has
 
Thanks for the reply! I've tried BomXTractor, which is great, but like you said... it does one at a time... and the output is really more than I need.

I could have thousands of IAM files to look at.

I've done a lot of VB for MS Access... but I haven't used it in Inventor (2012) yet.
If I have a good example of some code... I may be able to take it from there...

Thanks again!
 
Why?
Inventor (via Design Assistant) and Vault have that build it already..
If thats not what you want then be a bit more specific about exactly how/why/what this tool will do..
I'm positive there is a way to get what you need without having to roll something from scratch..
 
Mflayler, Mcgyvr,

Are you both implying that Vault is a "preferred" solution over other alternative?
You would only say such a thing if you each have positive experiences using Autodesk's Vault.

The OP's organization is still using Inventor 2012. Trying to get the Vault would force them to upgrade all of their Autode$k product$ to the late$t ver$ion.

oneilldm,

Have you anticipated that the parts could be nested several levels deep? An assembly can be inserted into another assembly, and so on. 2 columns probably won't work.

STF
 
Thanks for the reply! I still don't quite have a solution...
The two column solution would work fine because the output would be...
"...from all the iam files in a folder." It would output the list from the sub-assembly iam's as well.

I have an exe program that does that today... but it was written a long time ago, by someone that is no longer with the company and nobody has the code.

It almost does what I need.

The problem is that I can't point to a folder... and direct the output. The exe has to be in the same folder as the iam's...

I can make this work... but it is slower and more cumbersome...

Thanks again
 
This is going to sound soooooo '80's but... your EXE file sounds pretty crude, too, so I'll give this a whirl:

There is a DOS way to do this. Have you ever written a "Batch file". They still work through the command line in Windows.
The essentials of the *.BAT file will be to give a sequence of DOS commands in order to accomplish the task. The routine will first copy the EXE file to each folder in turn, run the EXE, direct the output of the EXE to a text file, rename the output file to contain a trace of the folder path, move the text file to a folder where the rest of them will be stored, then move to the next folder and repeat.

CD C:MD A\listfolder
...
copy C:\A\thing.exe C:\B\folder
cd C:\B\folder
thing.exe > list.txt
ren list.txt list_B_folder.txt
move list.txt C:\A\listfolder
del thing.exe
CD c:...

You don't have to type this a thousand times. You just have to type it once, and use something like a spreadsheet to duplicate the command sequences, updating the applicable folder path each time. Then extract from the spreadsheet a text-only version of the commands (clipboard & notepad).

When finished, you will have a hundred text files that you can concatenate.

Yes it sounds crazy. You only have to do it once, right?

STF
 
Thanks SparWeb... I liked the 80's !

I've done many Batch Files... I like your solution. I never thought about using a spreadsheet to duplicate the command sequences... good one! But...

The folders where the iam files reside are Read Only and I can't put my exe file in there or write a text file there.

So... what we've been doing is copying all the iam files to a temporary location... and running the program from there. Just seems really inefficient. Now you would expect that we could get some support on this but... the support is not there... but we still need to get the work done...

Thanks again


 
Vault wouldn't cost anything as Inventor 2012 comes free with Vault anyway. If they needed Workgroup or Professional, then yes there is a cost.

On another note, I have some spreadsheets that will extract Part Numbers from an entire folder of files by using the Apprentice server through Excel. It would probably do what you want but would have to be run everytime you want the information.
 
Status
Not open for further replies.
Back
Top