Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
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;
}
Solved! Go to Solution.
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
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
It seems to work
Thank you.
