exporting part parameters to excel - several parts in a folder

exporting part parameters to excel - several parts in a folder

samspade
Advocate Advocate
655 Views
2 Replies
Message 1 of 3

exporting part parameters to excel - several parts in a folder

samspade
Advocate
Advocate

Hi, first - I am not an Inventor user now, though have been in the past. second, I have been searching these boards and the internet for 2 hours now. third, thanks for your time.

 

I work with parts that are modeled in inventor and used in an assembly - glass (part) in a curtainwall frame (ass'y). I have to order the glass, and I want to check if my glass order matches the glass sizes that have been used in the assemblies.  The glass parts are all in their own folder in the project.

 

I can't ask the Inventor users to do any additional work, I want to be able to extract this information myself without opening every unit and checking.

 

Any suggestion on how I can extract the width, height (custom parameters) and part name and get them into a useable format (excel)?

 

again, i am not currently using Inventor so my knowledge base is limited, but I am usually pretty capable.

 

Thank you in advance for any help. 

 

***actually, now I am thinking maybe exporting all the BOMs to excel, can that be done all to one master file for many assemblies?** thanks again!!

0 Likes
Accepted solutions (1)
656 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

To put all assemblies in one main assembly and export BOM, you have to activate the export of the custom parameters length and width as iProperties. The BOM can not display parameters, only iProperties.

Do you have write permissions to these files? Assuming you have:

- create a main assembly and put all the assemblies in

- create a new iLogic rule in the main assembly and copy the code below, save and run the rule*

- open the BOM and activate the "parts only" view

- add the two custom property columns for length and width

- remove all unused columns

- export BOM to excel

 

Dim oAssDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oRefedDoc As Document
Dim oUserParam As Inventor.UserParameter
Dim oUserParams As Inventor.UserParameters

For Each oRefedDoc In oAssDoc.AllReferencedDocuments
	If oRefedDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
		oUserParams = oRefedDoc.componentdefinition.parameters.userparameters
		For Each ouserparam In oUserParams
			If oUserParam.Name = "length" OrElse oUserParam.Name="width" Then
				oUserParam.ExposedAsProperty = True
			End If
		Next
	End If
Next

*  - modify the parameter names "length" and "width" if necessary

 

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
Message 3 of 3

samspade
Advocate
Advocate

Thank you very much for the help, I certainly appreciate it.

 

have a nice weekend.

0 Likes