cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

PRO_LOG_SRF

DO_1054494
7-Bedrock

PRO_LOG_SRF

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.

 

0 REPLIES 0
Top Tags