Hi @kkk_rbhbkkk . This is an example of how to get axis coordinates in MateConstraint:
Private Sub Main()
Dim oDoc As AssemblyDocument = ThisApplication.ActiveDocument
Dim oMT As MeasureTools = ThisApplication.MeasureTools
Dim oUOfM As UnitsOfMeasure = oDoc.UnitsOfMeasure
Dim oCstrs As AssemblyConstraints = oDoc.ComponentDefinition.Constraints
For Each oCstr As AssemblyConstraint In oCstrs
If oCstr.Type = ObjectTypeEnum.kMateConstraintObject Then
Dim oAxis As WorkAxisProxy
If oCstr.EntityOne.Type = ObjectTypeEnum.kWorkAxisProxyObject Then
oAxis = oCstr.EntityOne
Else If oCstr.EntityTwo.Type = ObjectTypeEnum.kWorkAxisProxyObject Then
oAxis = oCstr.EntityTwo
End If
If oAxis IsNot Nothing Then
Dim dX, dY, dZ As Double
dX = Abs(oUOfM.ConvertUnits(oAxis.Line.Evaluator.RangeBox.MinPoint.X, kCentimeterLengthUnits, oUOfM.LengthUnits))
dY = Abs(oUOfM.ConvertUnits(oAxis.Line.Evaluator.RangeBox.MinPoint.Y, kCentimeterLengthUnits, oUOfM.LengthUnits))
dZ = Abs(oUOfM.ConvertUnits(oAxis.Line.Evaluator.RangeBox.MinPoint.Z, kCentimeterLengthUnits, oUOfM.LengthUnits))
MessageBox.Show("X - " & dX & vbLf & _
"Y - " & dY & vbLf & _
"Z - " & dZ & vbLf, oCstr.Name)
End If
End If
Next
End Sub