Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Check if model is family table member

amit.dabade

New member
Hi,


Is there a way to check if assembly / model is a family table member (either instance or generic) using J-Link?


Thanks,
Amit
 
Amit:


Did you get an answer to this elsewhere? I'm interested to know. I did a very brute force method for figuring it out, but I think there must be good coding to do just this (rather than the hack below).


Brian


(getSolid is the current Solid) You can figure the other permutations that might come from this (like using other if statements to determine instance/generic).
FamilyTableRows allInstanceRows = null;
FamilyTableRows allGenericRows = null;
try{
allInstanceRows = getSolid.GetParent().ListRows();
}
catch(Exception x){

}
try{
allGenericRows = getSolid.ListRows();
}
catch(Exception x){

}
if(allInstanceRows!=null||allGenericRows.getarraysize()>0){
JOptionPane.showMessageDialog(null, "You have a family table object","Family Table Object",JOptionPane.INFORMATION_MESSAGE);
}
 
Brian,


Thanks a lot for your effort. But i figured this out the immediate next day of posting of this thread. I was not able to figure out how to close thread so it was still open. Below is my code.
import
com.ptc.cipjava.jxthrowable;
import
com.ptc.pfc.pfcFamily.FamilyMember;
import
com.ptc.pfc.pfcFamily.FamilyTableRows;
import
com.ptc.pfc.pfcModel.Model;
import
com.ptc.pfc.pfcSession.Session;
import
com.ptc.pfc.pfcSolid.Solid;
 

Sponsor

Articles From 3DCAD World

Back
Top