AnsweredAssumed Answered

Removing Symbol refernce from Part editor

Question asked by hsoli on May 25, 2016
Latest reply on May 25, 2016 by jeremy_parker

I am trying to remove the symbol reference from part PDB , Without deleting the symbol itself.

I found script which find successfully the correct partition and part then open pin mapping , browse symbol reference and delete the reference for no default.

The script runs without error but the symbol reference still exist.

what is wrong why symbolerefernce.delete()did not perform the function.?


       Dim mapping

     Dim copied_pt

     Dim PartName

      Set copied_pt = pt.Copy(PartName,PartName,"")

       Set mapping = copied_pt.PinMapping

       Set syms = mapping.SymbolReferences(False)


       For Each sym In syms

        symName =sym.Name

        If sym.Default = True Then

         symName = symName & "- Default"

         ' Debugging

         msgbox "4.1- symbol name is : " &symName


         symName = symName & "- NotDefault"

         ' Debugging

         msgbox "4.2- symbol name is : " &symName

         If symname = "generic_syms:RESF" Then

          ' Debugging

          msgbox "4.3- symbol isnot default but  is generic : " &symName


          Set symRef = syms.Item(2)



          ' Debugging


          msgbox "4.4- symbol isnot a default symbol and isnot generic symbol : " &symRef.Name

           symRef.Delete() ' error message the operation isnot allowed

          ' Debugging

          msgbox "4.5-Delete symref "

         End If

        End If

       Next ' End of symbols Loop