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

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

Getting item ids of edge vertices

pseetharam
1-Newbie

Getting item ids of edge vertices

Is there a way to get the item ids of the vertices of an edge?. I have a ProEdge object, and I want to get the ids of it's 2 vertices so I can init them as ProModelItem(s).
I know I can do this if I route it through a ProSelect call (ask the user to select a vertex) and then get the model item with a subsequent ProSelectionModelitemGet call, but I want to do this without any user interaction.

Thanks.
-Pradeep
2 REPLIES 2

Pradeep,
Read the API Wizard under User's Guide->Geometry->Visiting Geometry
Objects->Visiting Solid Geometry->Visiting Datum Points. This will
allow you to get a handle to a Datum Point so you can retrieve the Id.

Basically you need to call ProFeatureGeomitemVisit on your ProEdge
object and visit PRO_POINT objects. Remember that a point will be
visited twice if it is shared by two edges (just an FYI if you want the
distinct points).

Patrick Williams | CAM Systems | Steelcase Inc. | 616.698.4078



Dang, I knew and should have seen that. Got sidetracked trying to figure how to get a PRO_EDGE_START/PRO_EDGE_END types from an edge.

I guess I can visit the points, cast it to a model item and check it's type, OR do a simple uv eval of it's coordinates to see if the point is the start or the end vertex.

Thanks for the heads up about the double visitation for shared vertices.
Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags