Ok, voici la macro ( je suis en train de la faire, alors la mise en forme n'est pas faite ) Public Sub nbPoints()
Dim objPoly As AcadLWPolyline
Dim basePnt As Variant
Dim nbPoints, Pt As Integer
Dim Tableau(200) As String
Dim MtextObj As AcadMText
a = 0: Pt = 1
ThisDrawing.Utility.GetEntity objPoly, basePnt, "Selectionner une polyligne :"
For Each Coordinate In objPoly.Coordinates
Tableau(nbPoints) = Coordinate
nbPoints = nbPoints + 1
Next
'MsgBox "Cette polyligne à : " & nbPoints / 2 & " pts(x,y)"
Do While Tableau(a) <> ""
Texte = Texte & "\P" & Pt & " X=" & Tableau(a) & " Y=" & Tableau(a + 1)
' Set MtextObj = ThisDrawing.ModelSpace.AddMText([surligneur]**ICI**[/surligneur] , 200, Texte)
Pt = Pt + 1
a = a + 2
Loop
Texte = "Tableau des coordonnées\P" + Texte
'Saisie du point d'insertion
returnPnt = ThisDrawing.Utility.GetPoint(, "Cliquez le coin Haut Gauche du Cadre :")
'Insert le texte au point d'insertion
Set MtextObj = ThisDrawing.ModelSpace.AddMText(returnPnt, 200, Texte)
MtextObj.Height = 3
' MtextObj.StyleName = "Time"
MtextObj.Update
End Sub
J'aimerai mettre **ICI** les coordonnées du point pour écrire le matricule du point aux sommets de la polyligne Merci...