Skip to main content
8-Gravel
January 28, 2025
Solved

Points and Coordinate Systems - how to get all points which use given csys as a reference?

  • January 28, 2025
  • 1 reply
  • 1085 views

Creo 10 C++ OTK

 

 

Situation is like that: I want to give the enduser possibility of select csys and highlight specific points which are refering to that csys. I can see all points attached to given csys thrugh the reference virewer. How can I achive this via API?

In other words - user cliks cysy and some points (of curve) becomes highlighted 🙂

 

Many thanks! 

Best answer by FV_01

with pro/toolkit, not OTK.

fast method, more coding: use ProSolidFeatVisit(...) to get datum point features. In ProFeatureVisitFilter(...) get datum point feature element tree and filter out everything which does not have coordinate system offset creation method, after that extract reference from that element tree and compare it to selected coordinate system - if there is a match - collect this point feature.

slow, although much less coding - ProSolidFeatVisit() and in ProFeatureVisitFilter() get a parent with  ProFeatureParentsGet(), should be only one parent feature, compare with selected csys.

HIH

1 reply

FV_0117-PeridotAnswer
January 29, 2025

with pro/toolkit, not OTK.

fast method, more coding: use ProSolidFeatVisit(...) to get datum point features. In ProFeatureVisitFilter(...) get datum point feature element tree and filter out everything which does not have coordinate system offset creation method, after that extract reference from that element tree and compare it to selected coordinate system - if there is a match - collect this point feature.

slow, although much less coding - ProSolidFeatVisit() and in ProFeatureVisitFilter() get a parent with  ProFeatureParentsGet(), should be only one parent feature, compare with selected csys.

HIH

8-Gravel
January 29, 2025

I thought it may be possible without visiting all solids, well 🙂 ... solution accepted.  Many thanks for response and your time!