I am pasting a SKILL script. Maybe you could modify it per your requirement and get what you are looking for.
------------------------SKILL Script---------------------------
The following SKILL procedure searches for top level pads containing a particular
string ("_io" in this example) and output those into an ASCII file. With this code,
when there is no label at top level matching the request criteria, then it gives
a line in the CIW saying so. There are no popup windows with this procedure.
You can change/add the print statements, cell list in this code as desired. The
procedure has to be called using searchPadLabel() in CIW after loading the SKILL code.
procedure(searchPadLabel()
let((cv mylabel out mybBox)
out=outfile("./padlist")
foreach(newpads '("top_pads_new" "bottom_pads_new" "right_pads_new" "left_pads_new")
cv=dbOpenCellViewByType("new_pads_lib" newpads "layout" nil "r")
mybBox=cv~>bBox
mylabel=leSearchHierarchy( cv mybBox 0 "label"
list( list( "text" "==" "_io" ))
)
if(mylabel then
fprintf(out "\nThe labels for the cell %s are : \n" newpads)
foreach(lab mylabel
;printf("%s " lab~>theLabel)
fprintf(out "\t %s\t" lab~>theLabel)
fprintf( out "\t%f\t%f\n" (car lab~>xy) (cadr lab~>xy))
);foreach
else
fprintf(out "\nNo labels found in cell %s that satisfy the search criteria..\n"
newpads)
printf("\nNo labels found in the cell %s that satisfy the search criteria..\n"
newpads)
);if
);foreach
close(out)
);let
);procedure
###############upto here################
Note : Consider the leSearchHierarchy() function used in the above code :
---------------------------
mylabel=leSearchHierarchy( cv mybBox 0 "label"
list( list( "text" "==" "_io" ))
)
---------------------------