Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

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

Piotr
8-Gravel

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! 

ACCEPTED SOLUTION

Accepted Solutions
FV
17-Peridot
17-Peridot
(To:Piotr)

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

View solution in original post

2 REPLIES 2
FV
17-Peridot
17-Peridot
(To:Piotr)

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

Piotr
8-Gravel
(To:FV)

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

Announcements

Top Tags