1 Reply Latest reply on Jan 27, 2014 10:43 AM by nathaniel.arbizu

    Is there a way to highlight a user defined property on VSS traces?

    diane.j.dickoff

      I am looking for a way to select all traces with a user defined property and highlight them. Any suggestions?

      Thanks,

        • 1. Re: Is there a way to highlight a user defined property on VSS traces?
          nathaniel.arbizu
          Dim pcbDoc, tr, withProp, prop, propName, propValue, netName, net
          
          propName="PROPNAME"
          propValue="VALUE"
          netName="VSS"
          
          Set pcbDoc=Application.ActiveDocument
          pcbDoc.Validate(CreateObject("MGCPCBAutomationLicensing.Application").GetToken(pcbDoc.Validate(0)))
          
          Set withProp = Utility.NewObjects()
          Set net = pcbDoc.FindNet(netName)
          If Not net Is Nothing Then
               For Each tr in net.Traces(epcbSelectAll)
                    Set prop = tr.FindProperty(propName)
                    If Not prop Is Nothing Then
                         'Comment out the following If statement to ignore the property value comparison
                         If prop.Value = propValue Then
                              withProp.Add tr
                         End If
                    End If
               Next
               pcbDoc.UnHighlightAll
               withProp.Highlighted = True
          Else
               MsgBox "Net """ & netName & """ is not found."
          End If