Question
Part constraints
Hi,
I use the following code to get the constraint of selected component in assembly
ProError status;
ProSelection* sels;
int n_sels = 1;
ProFeature *feat;
ProAsmcomppath path;
ProAsmcomp *AsmComp;
ProAsmcompconstraint *constr;
status = ProSelect("part", n_sels, NULL, NULL, NULL, NULL, &sels, &n_sels);
if(status != PRO_TK_NO_ERROR || n_sels == 0) return status;
status = ProSelectionAsmcomppathGet(sels[0],&path);
status = ProFeatureInit(path.owner,path.table_num,feat);
status = ProAsmcompConstraintsGet((ProAsmcomp *)feat,&constr);
return status;
but I get error PRO_TK_INVALID_TYPE (-18)
Kindly help me

