Skip to main content
8-Gravel
Jan 28, 2025 5:35 PM UTC
Solved

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

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! 

FV_01
FV_01Answer
Jan 29, 2025 12:24 AM UTC

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

3 replies

FV_01
FV_0117-PeridotAnswer
Jan 29, 2025 12:24 AM UTC

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

Translate
8-Gravel
Jan 29, 2025 6:48 AM UTC

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

Translate