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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Family Table instances in working directory

sparulekar
14-Alexandrite

Family Table instances in working directory

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??

1 ACCEPTED SOLUTION

Accepted Solutions
BenLoosli
23-Emerald II
(To:sparulekar)

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.

 

View solution in original post

15 REPLIES 15

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. 

RPN
17-Peridot
17-Peridot
(To:sparulekar)

I could not resist Smiley Very Happy 

 

# 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
}

 

 

More samples in the Family Table Section

sparulekar
14-Alexandrite
(To:RPN)

Thanks a lot 🙂

sparulekar
14-Alexandrite
(To:RPN)

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?

RPN
17-Peridot
17-Peridot
(To:sparulekar)
RPN
17-Peridot
17-Peridot
(To:sparulekar)

The wiki
https://wiki.tcl-lang.org/page/Tcl+for+Creo

Youtube
https://m.youtube.com/channel/UC97mLPJak54nCYnMJ7xhiig/videos

This is not a mapping interface, there is no need to deal with http or a server in between, it is Tcl which calls directly the Toolkits functions written in ‘C’ with a great performance.

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

BenLoosli
23-Emerald II
(To:sparulekar)

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.

 

sparulekar
14-Alexandrite
(To:BenLoosli)

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.

BenLoosli
23-Emerald II
(To:sparulekar)

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.

 

sparulekar
14-Alexandrite
(To:BenLoosli)

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.

BenLoosli
23-Emerald II
(To:sparulekar)

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.

 

sparulekar
14-Alexandrite
(To:BenLoosli)

Okay thank you for your response!!

Top Tags