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.?
Set copied_pt = pt.Copy(PartName,PartName,"")
Set mapping = copied_pt.PinMapping
Set syms = mapping.SymbolReferences(False)
For Each sym In syms
If sym.Default = True Then
symName = symName & "- Default"
msgbox "4.1- symbol name is : " &symName
symName = symName & "- NotDefault"
msgbox "4.2- symbol name is : " &symName
If symname = "generic_syms:RESF" Then
msgbox "4.3- symbol isnot default but is generic : " &symName
Set symRef = syms.Item(2)
msgbox "4.4- symbol isnot a default symbol and isnot generic symbol : " &symRef.Name
symRef.Delete() ' error message the operation isnot allowed
msgbox "4.5-Delete symref "
Next ' End of symbols Loop