Code:
Dim opartDocument As PartDocument
Dim opart As Part
Dim oSelection As Selection
Dim sStatus As String
Dim sFilter(0) As Variant'******Select Axissystem*****
Set opartDocument = CATIA.ActiveDocument
If (InStr(opartDocument.Name, ".CATPart")) <> 0 Then
Set opart = opartDocument.Part
Set oSelection = opartDocument.Selection
opart.Update
Set oHybridShapeFactory = opart.HybridShapeFactory
MsgBox "Select a local axis "
sFilter(0) = "AxisSystem"
sStatus = oSelection.SelectElement2(sFilter, "select a local axis", False)
'SelectElement2(iFilterType() As Variant, iMessage As String, iObjectSelectionBeforeCommandUsePossibility As Boolean) As String
Dim axiscoord(2)
Dim oaxissyst
Set oaxissyst = oSelection.Item(1).Value
oaxissyst.IsCurrent = 1
oaxissyst.Name = "Extrema"