Modify Sketch Constraint Value

Sub CATMain()

For j = 1 To CATIA.ActiveEditor.Selection.Count
   
    Dim aa As Constraint
    Set aa = CATIA.ActiveEditor.Selection.Item(j).Value
   
    If InStr(aa.Name, "Radius") <> 0 Then
        aa.Dimension.Value = 500
    End If
   
Next

End Sub