How do I access coordinates of a vertex?

Pernelle Marone-Hitz
Pernelle Marone-Hitz Member, Moderator, Employee Posts: 732
First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
edited June 2023 in Structures

How do I access coordinates of a vertex?

Tagged:

Answers

  • Pernelle Marone-Hitz
    Pernelle Marone-Hitz Member, Moderator, Employee Posts: 732
    First Comment First Anniversary Ansys Employee Solution Developer Community of Practice Member
    Answer ✓

    First, access the vertex through GeoData, for example through its Id like:

    geoData = ExtAPI.DataModel.Project.Model.Analyses[0].GeoData
    vertex = geoData.GeoEntityById(27)
    

    Then the coordinates can be accessed with:

    vertex.X
    vertex.Y
    vertex.Z