Sub CATMain()
Set ProductDocument1 = CATIA.ActiveDocument
Set Product1 = ProductDocument1. Product
Dim ProductDoc1_As_Document
Set ProductDoc1 = Catia.ActiveDocument
Dim Selection1_As_Selection
Set Selection1 = ProductDoc1.Selection
Product1.ApplyWorkMode DESIGN_MODE
selection1.Search "CATAsmSearch.MfConstraint,scr" 'hide Constrains
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
'~ Selection1.Search "CatPrtSearch.Surface,All" 'hide Surfaces
'~ Set visPropertySet1 = Selection1.visProperties
'~ VisPropertySet1.SetShow 1
'~ Selection1.Clear
Selection1.Search "CatPrtSearch.AxisSystem,All"
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.AxisSystem.Name=Axis' 'System*,All"
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.Line,All" 'hide lines
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.Curve,All" 'hide curves
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.Sketch,All" 'hide sketches
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.Point,All" 'hide points
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
Selection1.Search "CatPrtSearch.Plane,All" 'hide planes
Set visPropertySet1 = Selection1.visProperties
VisPropertySet1.SetShow 1
Selection1.Clear
'~ selection1.Search "CATGmoSearch.OpenBodyFeature,all" 'hide geometrical set
'~ Set visPropertySet1 = Selection1.visProperties
'~ VisPropertySet1.SetShow 1
'~ Selection1.Clear
Dim specsAndGeomWindow1 As Window
Set specsAndGeomWindow1 = CATIA.ActiveWindow
Dim viewer3D1 As Viewer
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
Dim viewpoint3D1 As Viewpoint3D
Set viewpoint3D1 = viewer3D1.Viewpoint3D
viewer3D1.Reframe
Set viewpoint3D1 = viewer3D1.Viewpoint3D
Set MyWindow = CATIA.ActiveWindow
Set MyViewer = MyWindow.ActiveViewer
End Sub