vbacatia

Catia V5 dynamic hidden line removal with macro


In here

I try to run the customize view-Dynamic Hidden Line Removal with catscript. I try to use Macro-Start Recording,but it doesn't find it. How can I solve it?

The recording code is;

Dim specsAndGeomWindow1 As SpecsAndGeomWindow
Set specsAndGeomWindow1 =CATIA.ActiveWindow

Dim viewer3D1 As Viewer3D
Set viewer3D1 = specsAndGeomWindow1.ActiveViewer

Dim viewpoint3D1 As Viewpoint3D1
Set viewpoint3D1 = viewer3D1 Viewpoint3D1

Solution

  • Sub CATMain()
    
    Dim specsAndGeomWindow1 As SpecsAndGeomWindow
    Set specsAndGeomWindow1 = CATIA.ActiveViewer
    
    Dim viewer3D1 As Viewer3D
    Set viewer3D1 = specsAndGeomWindow1.ActiveViewer
    
    Dim viewpoint3D1 As Viewpoint3D
    Set viewpoint3D1 = viewer3D1.Viewpoint3D
    
    viewpoint3D1.RenderingMode = catRenderQuickHiddenLinesRemovalWithoutVertices
    
    End Sub