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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Translate the entire conversation x

check if Family table exist

akok
12-Amethyst

check if Family table exist

Hey

 

I have a code to check if there is a family table in the part.

 

This will in Creo 5 return the name of the instance if it ends with "flat" or "flat1"

But in Creo 11 I get a fatal error.

I thing it is because I don't have a Family table in the part.

How can I check of the part have a Family table?

 

FamilyMember familyMember = (Solid) model;
FamilyTableRows familyTableRows = familyMember.ListRows();
// Find if a flat version existtube

for (int i = 0; i < familyTableRows.getarraysize(); i++) {
FamilyTableRow familyTableRow = familyTableRows.get(i);
if (familyTableRow.GetInstanceName().contains("FLAT1")) flat_name = familyTableRow.GetInstanceName();
else if (familyTableRow.GetInstanceName().contains("FLAT")) flat_name = familyTableRow.GetInstanceName();
if (!"".equals(flat_name)) break;
}

ACCEPTED SOLUTION

Accepted Solutions
RandyJones
20-Turquoise
(To:akok)

If you are running Creo Parametric 11.0.3.0 or earlier you probably are having this issue:

https://www.ptc.com/en/support/article/CS430963

"Creo Parametric exits when attempting to use Jlink method FamilyTableMember.ListColumns()"

Fixed in Creo Parametric 11.0.4.0

View solution in original post

2 REPLIES 2
RandyJones
20-Turquoise
(To:akok)

If you are running Creo Parametric 11.0.3.0 or earlier you probably are having this issue:

https://www.ptc.com/en/support/article/CS430963

"Creo Parametric exits when attempting to use Jlink method FamilyTableMember.ListColumns()"

Fixed in Creo Parametric 11.0.4.0

akok
12-Amethyst
(To:RandyJones)

It seems to work

Thank you.

Announcements

Top Tags