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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Any way to externally create and import assembly structure into Creo?

mspierer
1-Visitor

Any way to externally create and import assembly structure into Creo?

I'm working in Creo 2.0 and am looking for a way to externally create the assembly structure of an assembly containing a collection of sub-assemblies (either in a text or excel file) and import it into Creo to create an assembly with full (though empty) structure.

Is something like this possible?

ACCEPTED SOLUTION

Accepted Solutions

You can probably accomplish the task by creating a script to build a trail file that will build the assembly structure. I would think you'd only need 5 "template" trail files & a few mapkeys (for things like saving, erase not displayed, etc.). 1 template for creating & saving parts 1 template for creating & saving assemblies 1 template for opening assemblies 1 template for adding parts to assemblies 1 template for adding assemblies to assemblies The script can read your structure file, and, using the templates, build the resultant trail file that you can run in Creo Parametric. My initial thought would be to create all the part and assembly files first saving them as you create them. That should be easy enough to script.  Then you can start at your lowest level assembly file [I'm assuming your structure is more then one level deep], open the assembly, add the components, and save the file.  Keep working your way up the assembly structure until you complete the top level assembly. If you're savy with AutoIT scripting, you should be able to accomplish the task without the trail files. Regards, Dan N.

View solution in original post

7 REPLIES 7

You can probably accomplish the task by creating a script to build a trail file that will build the assembly structure. I would think you'd only need 5 "template" trail files & a few mapkeys (for things like saving, erase not displayed, etc.). 1 template for creating & saving parts 1 template for creating & saving assemblies 1 template for opening assemblies 1 template for adding parts to assemblies 1 template for adding assemblies to assemblies The script can read your structure file, and, using the templates, build the resultant trail file that you can run in Creo Parametric. My initial thought would be to create all the part and assembly files first saving them as you create them. That should be easy enough to script.  Then you can start at your lowest level assembly file [I'm assuming your structure is more then one level deep], open the assembly, add the components, and save the file.  Keep working your way up the assembly structure until you complete the top level assembly. If you're savy with AutoIT scripting, you should be able to accomplish the task without the trail files. Regards, Dan N.

Thanks for the idea of using the trail file. I did it a bit different than suggested though. Basically...

- Create structure in Excel. This structure consists of a master assembly and the sub-assemblies under it.

- Write VBA code to export this information into a text file that is formatted correctly for the trail file.

- Open Creo and run the trail file. The trail file changes the directory, creates master assembly file, creates the sub-assembly files, and locates the each sub-assembly to the default position.

I'm still working on automating more of this, but this is a huge step forward.

I know this is a long shot since this is a 2 year old post.

 

I would like to do the same method you have done for automating the creation of assemblies.  All components are default placements. 

Do you have any example files I could look at.  Specifically what is the format for the trail file?  Going from excel to trail file I can probably handle, but I'm running into dead ends trying to figure out trail file format.  

 

Thank you!

TomU
23-Emerald IV
(To:ptc-4639841)

Take a look at Nitro-Cell.  I believe they have a free version that can easily control Creo from Excel.

https://www.simplifiedlogic.com/creo-automation

Thanks, 

 

That does look like it would work, unfortunately it is an approved program at my company, so likely is not an option.

If anyone else finds this, 

 

Through experimentation I've been able to make some progress on formatting a trail file. 

 

The attached file will do the following:

Create a new assembly 'level2'

Assemble 'asm0001' default placement

Assemble 'asm0002' default placement

...

Assemble 'asm0006' default placement

save

Create new assemble 'level1'

Assemble 'level2' default placement into level1

save

 

I will create a VBA script to take an excel list with differant levels into a trail file. 

 

I have 355 assemblies to go into 3 or 4 different levels, so this will speed things up. 

 

StephenW
23-Emerald III
(To:ptc-4639841)

This sub-forum https://community.ptc.com/t5/Customization/bd-p/customization deals with customization. You may want to look search it and ask questions there. It seems to me that it would suit your question much better.

Announcements
NEW Creo+ Topics: Real-time Collaboration


Top Tags