Hello all, I'm attempting to get the coordinates of the vertex of my surfaces in CATIA 3DExperience using the method GetCoordinates in VBA but the results it gives back is always 0,0,0. Can someone point out what I'm doing wrong or if GetCoordinates is not the correct method to use at all..
Thank you in advance.
My code goes something like this:
'Before begining I cleaned the Body to hide all elements that I wouldn't want to select, in this case Vertex in sketches, and points for example
'And then I select a Body before continue
Dim selectionVertex As selection
Set SelectionVertex = CATIA.ActiveEditor.selection
selectionVertex.Search "type = Geometric Feature & Visibility=Shown;sel"
selectionVertex.Search "Topology.Vertex; sel"
'Until here everything behave correctly as I can see Catia selected the vertex I need
Dim nVertexInBody = SelectionVertex.Count
For i=1 To nVertexInBody
Set oVertexInBody = selectionVertex.Item(j)
MsgBox "Vertex's coordinates are: " &vCoords(0) & "," & vCoords(1) &"," &vCoords(2)
Quan PHAM[Universite de Technologie de Compiègne] @ Nov 07, 2022 - 12:07 PM (Europe/Paris)