Community Tip - You can change your system assigned username to something more personal in your community settings. X

Translate the entire conversation 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

3 REPLIES 3
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!

Piotr
8-Gravel
(To:FV)

Small clarification - ProFeatureParentsGet wasn't  enough to get parents from from datum point. Method which works for me is 

 

ProFeature hFeat ... 
ProExtRefInfo *infos;
int nInfos;
ProFeatureExternParentsGet(&hFeat,PRO_ALL_REF_TYPES, &infos,&nInfos)

 

where hFeat  is datum point type. Once again. Thanks for your time and help here! 

Announcements

Top Tags