Skip to main content
1-Visitor
January 3, 2007
Question

Getting item ids of edge vertices

  • January 3, 2007
  • 2 replies
  • 828 views
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

    13-Aquamarine
    January 5, 2007
    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



    1-Visitor
    January 8, 2007
    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.