Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hi All,
Kindly suggest how to retrieve constraint of a component in assembly by toolkit
regards,
MS
You should consider to start here:
ProAsmcompConstraintsGet (ProAsmcomp *component,ProAsmcompconstraint **pp_constraints );
Read ProAsmcomp.h
Have fun 🤔
Hi RPN,
I used the following code
ProError err; ProMdl mdl; ProSelection* sel; int count; ProAsmcomp* cmp; ProAsmcompconstraint* constr; err = ProMdlCurrentGet(&mdl); err = ProSelect("membfeat",1,NULL,NULL,NULL,NULL,&sel,&count); err = ProSelectionModelitemGet(sel[0],(ProModelitem *)cmp); err = ProAsmcompConstraintsGet(cmp,&constr); return err;
but I could not retrieve the constraints
Regards,
Manjunath S
Sorry, I’m not at my desk, but As far I remember the selection option is invalid. Because you will get a PRO_FEATURE and not a PRO_PART or PRO_ASSEMBLY
Input Arguments:
component - The assembly component
Component Feature | membfeat | PRO_FEATURE |
Assemble component model | component | PRO_PART, PRO_ASSEMBLY |
Try this
err = ProSelect("component",1,NULL,NULL,NULL,NULL,&sel,&count);
Component and Feature ID are the same, you can also set the model item type to PRO_PART or PRO_ASSEMBLY manually in your code, after you have selected the feature, and extracted the model item. But this is the purpose of the „component“ option.
Hi,
When i use option "component" I couldn't select a part from sub assembly.
Is there any other way to proceed with this