cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Export Model Tree to Excel in Creo Parametric 2.0

mwick
7-Bedrock

Export Model Tree to Excel in Creo Parametric 2.0

Hello,

I was wondering if there was an easy way to export the model tree from Creo Parametric 2.0 to MS Excel? I can get it to Save as a .txt file then open that in MS Excel, but unless all the levels are expanded it will not dispaly children of assemblies/weldments. I was wondering if someone has a mapkey or suggestion they could share.

Thanks in advance,

Mike


This thread is inactive and closed by the PTC Community Management Team. If you would like to provide a reply and re-open this thread, please notify the moderator and reference the thread. You may also use "Start a topic" button to ask a new question. Please be sure to include what version of the PTC product you are using so another community member knowledgeable about your version may be able to assist.
ACCEPTED SOLUTION

Accepted Solutions
dschenken
21-Topaz I
(To:mwick)

The best way is with a Macro on the Excel side - The columns of output are variable width based on the contents. Levels of indenture in the first column are prefixed with spaces.

You need to set and save a tree.cfg file to make the rest easier - once you know the order of the titles, then you can get their positions from the file and use that to split each line into it's correct parts and assign any other factors. For example - taking the number of spaces that prefix an item to get the level of indenture or to skip processing Group or Pattern entries.

If you post a simple copy of your model tree text file I will write an example Macro. They are pretty easy. Make it a fake assembly.

View solution in original post

13 REPLIES 13
TomD.inPDX
17-Peridot
(To:mwick)

Would this help?

expand-all.png

To some degree it does, but it also expands the features under the part as well. I am looking to generate a Bill of Materials from the Model Tree. So I basically need the part number, title, rev, quantity, etc.

TomD.inPDX
17-Peridot
(To:mwick)

Right; you want to set up the tree and save the tree configuration to show these parameters. You can turn off the features for assemblies (tree filters). You can add columns for the parameters (tree columns).

Again, if you want to import these into Excel, plan the tree carefully as spaces in any field will get in the way. Maybe add these to the end.

StephenW
23-Emerald III
(To:mwick)

You can turn off the features under tree filters.

Mahesh_Sharma
22-Sapphire I
(To:mwick)

Mike,

Any specific reason of exporting this information from Model tree? I think you can use BOM report (generated using Tools > Bill of material). This report can export in text format.

From what I found I need more information from the report than it is giving. If there was a way to customize it, it may work as well.

Mahesh_Sharma
22-Sapphire I
(To:mwick)

Mike,

Were you able to customize BOM referring the document in last reply?

Yes I was able to after some trial and error.

Thanks

Mahesh_Sharma
22-Sapphire I
(To:mwick)

Mick,

Please mark the post as answered and add your inputs about resolving this issue. Your inputs will help others to solve similar issues.

In Excel, you can manage the import of the text file. You need a little planning since your delimiter is only a space. if you have spaces in your column, it will not work well unless you can delimit with specific field widths.

In the down arrow under paste in Excel, use the Text Import Wizard.

StephenW
23-Emerald III
(To:mwick)

The way I do it is by creating a repeat region BOM so I can add the parameters and make it recursive to the level I want and then export that to a text file.

It works for me but everyone's expectations are different.

dschenken
21-Topaz I
(To:mwick)

The best way is with a Macro on the Excel side - The columns of output are variable width based on the contents. Levels of indenture in the first column are prefixed with spaces.

You need to set and save a tree.cfg file to make the rest easier - once you know the order of the titles, then you can get their positions from the file and use that to split each line into it's correct parts and assign any other factors. For example - taking the number of spaces that prefix an item to get the level of indenture or to skip processing Group or Pattern entries.

If you post a simple copy of your model tree text file I will write an example Macro. They are pretty easy. Make it a fake assembly.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags