I'm having the same issue, intermittently. My border lands on a layer that is hidden and can not be moved to a different layer with out deleting it and re-adding.
I hope someone find a solution to this.
following macro will change the Layer of all sketch segments and annotations in drawing template.
Open your Drawing and run this code
'vLayName --> target-layer name
Dim swApp As SldWorks.SldWorks
Dim swDoc As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swSketch As SldWorks.Sketch
Dim swSketchSeg As SldWorks.SketchSegment
Dim swAnn As SldWorks.Annotation
Dim swView As SldWorks.View
Dim vSketchSeg As Variant
Dim vLayName As String
Dim vAnn As Variant
Set swApp = CreateObject("SldWorks.Application")
Set swDoc = swApp.ActiveDoc
Set swDraw = swDoc
Set swSketch = swDoc.GetActiveSketch2
vSketchSeg = swSketch.GetSketchSegments
vLayName = "FORMAT"
For i = 0 To UBound(vSketchSeg)
Set swSketchSeg = vSketchSeg(i)
swSketchSeg.Layer = vLayName
Set swView = swDraw.GetFirstView
vAnn = swView.GetAnnotations
For j = 0 To UBound(vAnn)
Set swAnn = vAnn(j)
swAnn.Layer = vLayName
This is true for sketch segment etc, but automatic borders are not sketch segments and are unaffected by this macro.
The only way I have found to edit the layer for an Automatic Border is to launch the "Automatic Border Editor" and manually change the layer.
It looks like the API does not extend to this tool (Automatic Border Editor). You seem to be able the launch it with API but can't actually run any of its command with API.
for me is working fine, as long you not edit the drawing format. And yes, automatic border behave for API like an inaktive sketch. The only thing you have to do, is change the value of "vLayName" to name of your target layer - in this case "ZONES" (and Layer ZONES must exist).