Hii! I am trying to generate a list of all instances in a text file so that i can batch process all the instances to .stp format. Only the generic part is shown in the working directory. What can be done to get all the instances in the same folder??
Solved! Go to Solution.
I was assuming that you were using Windchill, but from the screen shot, it appears that you are not.
You will need to open every instance in the family table and then do a save-as to 'export' the instance to its individual state. Save as Step, IGES or part file as needed. You could write a mapkey that does the Save-As of the current file.
There are some automation tools, Autolit and toolkit, but those may require programming skills.
If you dont want to go with toolkit customization, search for xpr and xas file types. These are types of file available for part and assembly instances. Those files might not be present into directory as those are secondary files. Toolkit API are there to identify the same. Are you looking for API?
Just manually open generic file, go to family table, open instance file and save it. It would generate instancename.xpr or .xas based on part and assembly.
Thank you for your response!!
We dont have toolkit license and also im not a programmer. Im using trail fiels and a BASIC code for batch conversion of part fiels to step format.
As of now i use this: https://community.ptc.com/t5/System-Administration/PTC-Creo-Distributed-Batch/m-p/596053
I want to convert all the instances to step format using batch processing.
I could not resist
# That's all you need in Tcl # if your current model is the generic ps_famtab ftObj foreach name [ftObj names] { set m [ftObj open $name] ps_export step -model $m $m.stp ;#Out filename is box.prt.stp }
Even more less code 🙂
# Only one line in foreach :-) # if your current model is the generic ps_famtab ftObj foreach name [ftObj names] { ps_export step -model [ftObj open $name] $name.stp ;#Out filename is box.stp }
Thanks a lot 🙂
Thanks a lot!!
Can you please tell me from where can I install tcl for creo 3.0. Im using windows 7 PC. Also is it for free?
If you are looking for "FREE" -- check out CREOSON.com
The process would be as simple as listing instance names and then exporting each item found using JSON transactions in your language of choice.
There is also a Python Option if you want something easy to learn/use. Let me know if you have any questions.
Dave
A family table is a single part file that regenerates the instances from the generic when used. If you export a family table to disk, you will only have a single file.
To get all of the instances into the workspace, you need to do something that forces Creo to do that, The easiest method is to edit the generic which will cause all instances to be checked out to the workspace.
You can also do things with the family table editor if you only want a list of the file names. Cut the column from Excel and past that into a text file, for example.
Thank you for your response!!
For getting all the instances into the folder/working directory(if that is what you mean by workspace), you said that the easiest way was to edit the generic. What did you mean by that?
I have already tried putting into the text file using excel. But i was not able to use it for batch conversion to step format.
Since the family table is a single file, you only get the generic into the workspace by default. In order to export all instances, you will need to force the system to put all of them in your workspace. The easiest way is to open the family table - Tools-Family Table and then use the Edit button. This will ask you to check out all instances to your workspace.
Im sorry but im still not able to get the instances in my workspace. I have attached the image below.
P.S: I had selected all the rows and columns in the family table as shown in figure and then selected edit.
I was assuming that you were using Windchill, but from the screen shot, it appears that you are not.
You will need to open every instance in the family table and then do a save-as to 'export' the instance to its individual state. Save as Step, IGES or part file as needed. You could write a mapkey that does the Save-As of the current file.
There are some automation tools, Autolit and toolkit, but those may require programming skills.
Okay thank you for your response!!