AnsweredAssumed Answered

Unprotect routes via script

Question asked by rtennill on Jul 12, 2017
Latest reply on Jul 12, 2017 by rtennill

I need to rotate a couple designs to make them consistent with other boards in a stack which means I need to un-glue and protect all objects. I am using a bit of scripting that I found on the forums here to find all protected route segments in a layout and it works great. Rather than go back and manually select and un-protect the traces, I decided to try and clear the protected status but it doesn't work. Should this work or am I just doing it wrong?


   'This will search all routesegments in design for protected status

  'if true it adds net to selection status then control "H" add highlight

  'to selected nets "N" will remove highlight from all nets afetwards.

  'based on script from

  Dim objroute As Object

  For Each objroute In ActiveDocument.RouteSegments

    If objroute.Protected = True Then

    Append("PROTECTED:" & objroute.Net.Name)

    objroute.Net.selected = True

    objroute.Protected = False

    End If

  Next objroute


automation error: "wrong number of parameters".


I also found that the RouteSegment.Protected property is not in the vx1.2 or vx2.1 automation documentation