Skip to main content
7-Bedrock
October 25, 2021
Question

Retrieving surfaces from PROG_LOG_SRF entity

  • October 25, 2021
  • 1 reply
  • 2179 views

I am using Creo Parametric - Release 5.0 (connected) 5.0 5.0.2.0

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 I use the following functions to retrieve the geometric entities on which the tolerance applies:
ProAnnotationElementGet(), ProAnnotationelemReferencesCollect(), ProReferenceTypeGet(), ProReferenceToSelection()

If the type of the selection obtained by ProReferenceToSelection() 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.

1 reply

17-Peridot
October 27, 2021

@DO_1054494,

 

As far as I know, the ProGeomitem of PRO_TYPE = PRO_LOG_SRF is not yet open to Toolkit users to access its geometry. If you use API ProSelectionModelitemGet() to get ProGeomitem of obtained ProSelection. Further, you may find unable to process these geomItems further as API ProGeomitemToSurface() may fail on these geomItems. Existing APIs like ProGeomitemdataGet() and ProGeomitemToSurface() does not seem to support such items. I think this item may not be of any significance for toolkit users in terms of Geometry. You can confirm whether such geomitem is inactive or not using API ProGeomitemIsInactive().

7-Bedrock
November 2, 2021

Hello.

Thank you very much for your answer.

So, if I understand well, there is no solution to get, with Pro/TOOLKIT, the surfaces "under" a PRO_LOG_SRF entity.

In my case, this PRO_LOG_SRF is active because it is pointed by a chamfer dimension.

Do I need to open a case in PTC support ?

 

17-Peridot
November 2, 2021

@DO_1054494,

 

Sure, in that case it would be better if you open up a PTC Technical Support case and share your issue in detail (attach model if required).