Inventor Forum
Welcome to Autodesk’s Inventor Forums. Share your knowledge, ask questions, and explore popular Inventor topics.
This page has been translated for your convenience with an automatic translation service. This is not an official translation and may contain errors and inaccurate translations. Autodesk does not warrant, either expressly or implied, the accuracy, reliability or completeness of the information translated by the machine translation service and will not be liable for damages or losses caused by the trust placed in the translation service. To translate this discussion, select the language.

Inventor Forum

Reply
Post 1 of 12

Extract Part Numbers from IAM (assembly)?

213 Views, 11 Replies
07-29-2015 04:38 PM

From a Wondows7 Command Line... I would like to extract the part numbers of iam files in a folder. CSV output would work fine. I'd like to have 2 columns... one for the Parent Number and one for the Child of that assembly.  

 
Is there a way to do this?
 
Thanks
Post 2 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 07:23 AM in reply to: oneilldm

Just to clarify...

 

1. Why Windows command prompt? Does it have to be that? Do you have access to Inventor on the PC that you want to do this with?

2. So you want one column with the part number of each assembly file within a folder, and a second column for the child part numbers? So, if the assembly structure is like this:

 

Assy1

 - Part 1

 - Part 2

Assy 2

 -Part 1

 -Part 3

 

Then your CSV file would look like this:

 

Assy1PN,Part1PN

Assy1PN,Part2PN

Assy2PN,Part1PN

Assy2PN,Part3PN

 

Is that correct? I'm not sure I understand what result you want.

 

3. Do you only one one level deep for the children of each assembly, or is it possible you'll want the full child structure?

Post 3 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 09:14 AM in reply to: DRoam
Thanks for the reply... and your example is exactly correct!
I do have Inventor on the machine I want to run this from. It does not have to run from the command line... I was thinking that I would like to be able to have command line options like pointing to the IAM folder and specifying the destination of the CSV...
One level deep would be fine...
I want to create a "Where Used" database...

Thanks again
Post 4 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 09:22 AM in reply to: oneilldm

oneilldm wrote:
I want to create a "Where Used" database...

Ah I see, that makes sense!

 

I'm not sure of a good way to search through all of the assemblies in a folder and extract BOM information from it, except maybe this:

 

Could you create a Master Assembly and always place the assemblies you want to track inside of it? I'm sure from there we could find a way to push out the parent assemblies and their children, either using a straight-up export of the BOM or perhaps some iLogic. But this only works if you can keep up with putting any Assemblies you care about into this "Master Assembly." Is that a possibility or does it need to be more automated than that?

Post 5 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 10:15 AM in reply to: DRoam

He needs this but with batch processing and not 1 at a time..

I'm sure there is a way to do it.. I don't know that way..

.net/vba/apprentice or something 100% outside of Inventor

 

http://www.cbliss.com/inventor/iCode/BomXTractor.htm

 

actually.. edit....

From another forum he has posted on (I'm just going to comment on here for now on instead of both as the amount of eyes/users is much greater here)

He just needs "where used" functionality.. Which Inventor (design assistant) and Vault already have.. 

So lets hear why those won't work or specifically what EXACTLY you need to happen.

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Stating the problem is often a better approach than asking how to do what you think the solution should be
-------------------------------------------------------------------------------------
2018 Product Design Suite Ultimate
Windows 10 64 bit
Core i7 4820k processor (OC'd to 4.4Ghz), Nvidia GTX 770, 16G RAM


Post 6 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 10:29 AM in reply to: mcgyvr
It's annoying to launch design assistant all of the time.

I actually made my own WhereUsed / Find Children subroutine in vb.net to avoid having to open design assistant all the time.
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

--------------------------------------

Linked In Button.PNG Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization



iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells
Post 7 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 10:45 AM in reply to: MechMachineMan

MechMachineMan wrote:
It's annoying to launch design assistant all of the time.

I actually made my own WhereUsed / Find Children subroutine in vb.net to avoid having to open design assistant all the time.

Just depends on the OP's needs..

If you just need to find out how many assemblies use 1 particular screw one time then its a no brainer to use DA..

Frankly I don't understand ANY company that doesn't have an ERP system of some sorts anyways...

Any decent ERP system will have where used.. 

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Stating the problem is often a better approach than asking how to do what you think the solution should be
-------------------------------------------------------------------------------------
2018 Product Design Suite Ultimate
Windows 10 64 bit
Core i7 4820k processor (OC'd to 4.4Ghz), Nvidia GTX 770, 16G RAM


Post 8 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 10:50 AM in reply to: mcgyvr
That's all a matter of ERP integration with CAD.

it is useful to have a whereused feature when you need to manage multiple
product lines with similar parts.
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

--------------------------------------

Linked In Button.PNG Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization



iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells
Post 9 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 10:56 AM in reply to: MechMachineMan

Yes... I need something very simple...

We don't use Vault... and I'm dealing with stuff before it get's to our ERP system.  I know we need a better system, but this is what I'm stuck with today. 

 


MechMachineMan wrote:
It's annoying to launch design assistant all of the time.

I actually made my own WhereUsed / Find Children subroutine in vb.net to avoid having to open design assistant all the time.

 

Post 10 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 11:04 AM in reply to: oneilldm
The thing about where used outside of design assistant is that you need to
have any possible document the part may be used in loaded in memory in
inventor and then it will find and list which ones are used where. Good for
similar product lines.
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.

--------------------------------------

Linked In Button.PNG Justin K
Inventor 2018.2.3, Build 227 | Excel 2013+ VBA
ERP/CAD Communication | Custom Scripting
Machine Design | Process Optimization



iLogic/Inventor API: Autodesk Online Help | API Shortcut In Google Chrome | iLogic API Documentation
Vb.Net/VBA Programming: MSDN | Stackoverflow | Excel Object Model
Inventor API/VBA/Vb.Net Learning Resources: Forum Thread

Sample Solutions:Debugging in iLogic ( and Batch PDF Export Sample ) | API HasSaveCopyAs Issues |
BOM Export & Column Reorder | Reorient Skewed Part | Add Internal Profile Dogbones |
Run iLogic From VBA | Batch File Renaming

Local Help: %PUBLIC%\Documents\Autodesk\Inventor 2018\Local Help

Ideas: Dockable/Customizable Property Browser | Section Line API/Thread Feature in Assembly/PartsList API Static Cells
Post 11 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 11:10 AM in reply to: DRoam

Really all I want is what DRoam described...


DRoam wrote:

Just to clarify...

 

...

2. So you want one column with the part number of each assembly file within a folder, and a second column for the child part numbers? So, if the assembly structure is like this:

 

Assy1

 - Part 1

 - Part 2

Assy 2

 -Part 1

 -Part 3

 

Then your CSV file would look like this:

 

Assy1PN,Part1PN

Assy1PN,Part2PN

Assy2PN,Part1PN

Assy2PN,Part3PN

 


 

Post 12 of 12

Re: Extract Part Numbers from IAM (assembly)?

07-30-2015 11:56 AM in reply to: oneilldm

So whats wrong with Design assistant? (Autodesk file menu, manage, design assistant.. in DA go to tools..find..where used)

 

And how can you have thousands of iam files to search whos boms aren't in ERP already?

 

Just asking questions to provide a proper answer and not steer you down a path of having to roll your own solution..

I see NO reason at this point to have to create anything for a where used in Inventor. Its already there.. 

 

Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Stating the problem is often a better approach than asking how to do what you think the solution should be
-------------------------------------------------------------------------------------
2018 Product Design Suite Ultimate
Windows 10 64 bit
Core i7 4820k processor (OC'd to 4.4Ghz), Nvidia GTX 770, 16G RAM


Post to the Community

Have questions about Autodesk products? Ask the community.

New Post