cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Delete a datum point with a specific name

CHASEONHO
18-Opal

Delete a datum point with a specific name

How do I delete a datum point with a specific name?

I want to delete the datum points named PNT2 collectively as the following figure.
What if you do not know the ID of the feature?

 

Let's say you use ProFeatureVisitAction.
The ProFeature API does not have an API to get the name of a feature.
It seems impossible to delete a datum point with a specific name using ProFeatureVisitAction.

 

Do I know it wrong?
Or any other suggestions?

 

thanks 

Warm Regards,

SeonHo

1 ACCEPTED SOLUTION

Accepted Solutions

Use "ProFeatureGeomitemVisit" to get geom item 

 

Use following geometry visit function:

 

ProError GeomVisitFunction(ProGeomitem *p_handle, ProError status, ProAppData app_data)
{
ProPoint point;
ProGeomitemToPoint(p_handle, &point);

ProVector copoint;
ProPointCoordGet(point, copoint);


return PRO_TK_NO_ERROR;
}

 

 

 

API "ProPointCoordGet" gives you a vector with x , y and z position.

View solution in original post

3 REPLIES 3

Use ProModelitemNameGet to get feature name.

Thank you.
I will try your advice.
I would appreciate one more answer.
When using ProSolidFeatVisit (), can I get x, y, z values if the feature type is PRO_FEAT_DATUM_POINT?
If is possible, how do I get it?

Use "ProFeatureGeomitemVisit" to get geom item 

 

Use following geometry visit function:

 

ProError GeomVisitFunction(ProGeomitem *p_handle, ProError status, ProAppData app_data)
{
ProPoint point;
ProGeomitemToPoint(p_handle, &point);

ProVector copoint;
ProPointCoordGet(point, copoint);


return PRO_TK_NO_ERROR;
}

 

 

 

API "ProPointCoordGet" gives you a vector with x , y and z position.

Top Tags