@J_Pfeifer_ , I think the documentation has been updated, but is wrong.
Here are a couple of examples to do this per sketch, by pushing the sketch entities to a layer that is not visible, or visible depending upon if the sketch is to be shown.
The first does this for a sketch, for a view associated to a view:

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
oSketchName = "Sketch1"
Dim oDrawingSketch As DrawingSketch
oDrawingSketch = ActiveSheet.DrawingViews.ItemByName("VIEW1").NativeEntity.Sketches.Item(oSketchName)
oLayerVisible = InputRadioBox("Select one:", "Sketch On", "Sketch Off", True, oSketchName & " visible state")
'[get layers
Dim oVisibleLayer As Layer = oDrawDoc.StylesManager.Layers.Item("Sketch Geometry(Default)")
Dim oNotVisibleLayer As Layer
Try
oNotVisibleLayer = oVisibleLayer.Copy("Invisible Sketches")
Catch
oNotVisibleLayer = oDrawDoc.StylesManager.Layers.Item("Invisible Sketches")
End Try
oNotVisibleLayer.Visible = False
']
'[edit sketch
oDrawingSketch.Edit
For Each oEnt As SketchEntity In oDrawingSketch.SketchEntities
If oLayerVisible = False Then
oEnt.Layer = oNotVisibleLayer
Else
oEnt.Layer = oVisibleLayer
End If
Next
oDrawingSketch.ExitEdit
']
This 2nd example does this for a sketch that is on the sheet, and not associated to a view:

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument
oSketchName = "Sketch2"
Dim oDrawingSketch As DrawingSketch
oDrawingSketch = ActiveSheet.NativeEntity.Sketches.Item(oSketchName)
oLayerVisible = InputRadioBox("Select one:", "Sketch On", "Sketch Off", True, oSketchName & " visible state")
'[get layers
Dim oVisibleLayer As Layer = oDrawDoc.StylesManager.Layers.Item("Sketch Geometry(Default)")
Dim oNotVisibleLayer As Layer
Try
oNotVisibleLayer = oVisibleLayer.Copy("Invisible Sketches")
Catch
oNotVisibleLayer = oDrawDoc.StylesManager.Layers.Item("Invisible Sketches")
End Try
oNotVisibleLayer.Visible = False
']
'[edit sketch
oDrawingSketch.Edit
For Each oEnt As SketchEntity In oDrawingSketch.SketchEntities
If oLayerVisible = False Then
oEnt.Layer = oNotVisibleLayer
Else
oEnt.Layer = oVisibleLayer
End If
Next
oDrawingSketch.ExitEdit
']