Skip to main content
1-Visitor
May 18, 2016
Solved

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

  • May 18, 2016
  • 1 reply
  • 6084 views

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?

Best answer by dnordin

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.

1 reply

dnordin16-PearlAnswer
16-Pearl
May 23, 2016

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.

mspierer1-VisitorAuthor
1-Visitor
June 1, 2016

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.

8-Gravel
August 28, 2018

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!