Skip to main content
18-Opal
Aug 16, 2018 5:04 AM UTC
Solved

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

14-Alexandrite
Aug 16, 2018 6:23 AM UTC

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.

3 replies

14-Alexandrite
Aug 16, 2018 5:22 AM UTC

Use ProModelitemNameGet to get feature name.

Translate
CHASEONHO18-OpalAuthor
18-Opal
Aug 16, 2018 5:52 AM UTC

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?

Translate
14-Alexandrite
Aug 16, 2018 6:23 AM UTC

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.

Translate