There's nothing special going to create the overall slot. It's just using the existing set of constraints. Here's a sample program that creates the identical result using the API.
Public Sub BuildSlot()
Dim sk As PlanarSketch
If Not TypeOf ThisApplication.ActiveEditObject Is Sketch Then
MsgBox "A sketch must be active."
Exit Sub
Else
Set sk = ThisApplication.ActiveEditObject
End If
Dim tg As TransientGeometry
Set tg = ThisApplication.TransientGeometry
Dim line1 As SketchLine
Dim arc1 As SketchArc
Dim line2 As SketchLine
Dim arc2 As SketchArc
Set line1 = sk.SketchLines.AddByTwoPoints(tg.CreatePoint2d(0, 0), tg.CreatePoint2d(10, 0))
Set arc1 = sk.SketchArcs.AddByCenterStartEndPoint(tg.CreatePoint2d(10, 2), line1.EndSketchPoint, tg.CreatePoint2d(10, 4))
Set line2 = sk.SketchLines.AddByTwoPoints(arc1.EndSketchPoint, tg.CreatePoint2d(0, 4))
Set arc2 = sk.SketchArcs.AddByCenterStartEndPoint(tg.CreatePoint2d(0, 2), line2.EndSketchPoint, line1.StartSketchPoint)
' Add constraints.
Dim geomConstraints As GeometricConstraints
Set geomConstraints = sk.GeometricConstraints
Call geomConstraints.AddTangent(line1, arc1)
Call geomConstraints.AddTangent(line2, arc1)
Call geomConstraints.AddTangent(line2, arc2)
Call geomConstraints.AddTangent(line1, arc2)
Call geomConstraints.AddParallel(line1, line2)
Dim centerLine As SketchLine
Dim centerPoint As SketchPoint
Set centerLine = sk.SketchLines.AddByTwoPoints(tg.CreatePoint2d(-1, 2), tg.CreatePoint2d(11, 2))
centerLine.Construction = True
Set centerPoint = sk.SketchPoints.Add(tg.CreatePoint2d(5, 2), False)
Call geomConstraints.AddMidpoint(centerPoint, centerLine)
' Add constraints to tie line to the slot.
Call geomConstraints.AddCoincident(centerLine, arc1.CenterSketchPoint)
Call geomConstraints.AddCoincident(centerLine, arc2.CenterSketchPoint)
Call geomConstraints.AddCoincident(centerLine.StartSketchPoint, arc2)
Call geomConstraints.AddCoincident(centerLine.EndSketchPoint, arc1)
End Sub
And you can't reference an arc as a line. They're two different types.