Skip to main content
18-Opal
August 16, 2018
Solved

Delete a datum point with a specific name

  • August 16, 2018
  • 1 reply
  • 1853 views

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

Best answer by syalagudri

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.

1 reply

14-Alexandrite
August 16, 2018

Use ProModelitemNameGet to get feature name.

CHASEONHO18-OpalAuthor
18-Opal
August 16, 2018

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?

14-Alexandrite
August 16, 2018

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.