Showing results for 
Search instead for 
Did you mean: 
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

Datum attachement location returns (0, 0, 0).


Datum attachement location returns (0, 0, 0).



I am using Pro/TOOLKIT to connect to a Creo session and to explore the active opened CAD file.


First of all, I need to retrieve the datum tags.


Here there is a skeleton of my program to do that.


ProEngineerConnect() ;

ProMdlCurrentGet() ;

ProMdlNameGet() ;

ProMdlTypeGet() ;

ProSolidSetdatumtagVisit(ProSetDatumTagVisitAction) ;


static ProError ProSetDatumTagVisitAction(ProSetDatumTag* pSetDatumTag, ProError, ProAppData    AppData)


// Obtention du label du datum tag.

  ProSetdatumtagLabelGet() ;


// Recherche des liens vers la géométrie à partir des références.


ProAnnotationReference*                         References(nullptr);


if (ProSetdatumtagReferencesGet(pSetDatumTag, &References) == PRO_TK_NO_ERROR)


     int ReferencesCount(0);


      if (ProArraySizeGet(References, &ReferencesCount) == PRO_TK_NO_ERROR)


         for (int i = 0; i < ReferencesCount; i++)


            switch (References[i].type)


               case PRO_ANNOT_REF_SINGLE:


                  ProSelection Selection(nullptr);

                  ProModelitem ModelItem = { PRO_TYPE_UNUSED, 0, nullptr };


                  if (ProReferenceToSelection(References[i].object.reference, &Selection) == PRO_TK_NO_ERROR &&

                      ProSelectionModelitemGet(Selection, &ModelItem)                     == PRO_TK_NO_ERROR)



                     switch (ModelItem.type)


                        case PRO_AXIS:

                        case PRO_SURFACE:


                                 Pro3dPnt           ptDatumFrameLocation;

                                 ProAnnotationPlane DatumFramePlane;

                                 ProPlanedata       DatumFramePlaneData;

                                 ProSelection       DatumAttachment(nullptr);

                                 Pro3dPnt           ptDatumAttachmentLocation;


                                 if ((ProSetdatumtagTextPointGet(pSetDatumTag, nullptr, nullptr, ptDatumFrameLocation) == PRO_TK_NO_ERROR || ProSetdatumtagTextLocationGet(pSetDatumTag, nullptr, ptDatumFrameLocation) == PRO_TK_NO_ERROR) &&

                                     ProSetdatumtagPlaneGet(pSetDatumTag, &DatumFramePlane)             == PRO_TK_NO_ERROR                                                                                                                  &&

                                     ProAnnotationplanePlaneGet(&DatumFramePlane, &DatumFramePlaneData) == PRO_TK_NO_ERROR                                                                                                                  &&

                                     ProSetdatumtagAttachmentGet(pSetDatumTag, &DatumAttachment)        == PRO_TK_NO_ERROR                                                                                                                  &&

                                     ProSelectionPoint3dGet(DatumAttachment, ptDatumAttachmentLocation) == PRO_TK_NO_ERROR)



BUG ! ->                       ptDatumAttachmentLocation == {0, 0, 0} !!!!


If the datum tag is connected to a geometrical tolerance, the datum tag attachement location returned by Pro/TOOLKIT is null !


For more informations, you can refer to the following case which has been opened for this problem :


Is it possible to have a correction for this problem ?


Thank you.


Best regards.


Top Tags