Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
Hello.
I wrote a program to run Creo 5.0.2.0, open a CAD file in Creo 5.0.2.0 and explore this CAD file with Pro/TOOLKIT (C++) functions.
In my program, when I read a geometric tolerance gTol, I have this portion of code :
if (ProAnnotationElementGet(&gTol, &AnnotationElement) == PRO_TK_NO_ERROR)
{
ProAnnotationReference* pAnnotationReferences(nullptr);
if (ProAnnotationelemReferencesCollect(&AnnotationElement, PRO_ANNOTATION_REF_ALL, PRO_ANNOT_REF_FROM_ALL, &pAnnotationReferences) == PRO_TK_NO_ERROR)
{
if (pAnnotationReferences[0].type == PRO_ANNOT_REF_SINGLE)
{
ProType Type(PRO_TYPE_UNUSED);
ProSelection Selection(nullptr);
if (ProReferenceTypeGet(pAnnotationReferences[0].object.reference, &Type) == PRO_TK_NO_ERROR &&
ProReferenceToSelection(pAnnotationReferences[0].object.reference, &Selection) == PRO_TK_NO_ERROR)
{
switch (Type)
{
case PRO_SURFACE: gTolRefType = PROGTOLRTYPE_SURF; break;
case PRO_EDGE: gTolRefType = PROGTOLRTYPE_EDGE; break;
}
gTolReference = Selection;
}
}
If the Type is a surface or an edge, there is no problem.
But if the type is PRO_LOG_SRF, then I have no solution to retrieve the corresponding surfaces.
So, my question is : when I have a PROG_LOG_SRF entity, how can I retrieve the associated surfaces ?
Thank you for your help.