Bindkey needed to list shapes beneath cursor

V

vtcad

Guest
Could anyone supply me a bindkey to return a list of shapes beneath my
cursor in a Layout Window, or a starting point for the code?

thanks,
 
On May 22, 11:32 am, vtcad <Roland.Fonta...@gmail.com> wrote:
Could anyone supply me a bindkey to return a list of shapes beneath my
cursor in a Layout Window, or a starting point for the code?

thanks,
I think whomever answers this, will probably need to know if you
interested in "only" the shapes that are at the 0 toplevel of
hierarchy, or also in subcells?
 
This should do what you want it to do. (cdba) ----

procedure(getShapesUnderPt(@optional cv pt level(0))
let(( retShapes retOvlaps out )
unless(cv cv = geGetWindowCellView())
unless(pt pt = enterPoint(?prompts list("Enter Point")))
if(cv~>lib then
retOvlaps = dbGetTrueOverlaps(cv list(pt pt) t level)
retShapes = foreach(mapcar x retOvlaps
while(listp(x)
x = cadr(x)
)
x
)
retShapes = setof(x retShapes x~>objType != "inst")
out = makeTable( "outTable" nil)
foreach(x retShapes out[x] = t)
else
hiGetAttention()
printf("%L is not a valid cellView \n" cv)
)
out[?]
)
)







On May 22, 1:32 pm, vtcad <Roland.Fonta...@gmail.com> wrote:
Could anyone supply me a bindkey to return a list of shapes beneath my
cursor in a Layout Window, or a starting point for the code?

thanks,
 
Hi Dominic,

May I add a comment on your above code ? just to make it more clear
for vtcad.
This code is by default running on the Top level (0), means that the
functions returns only the sahpes underneath the cursor at the Top
level. If for example you click on a Pcell, it will return nil.
So one has to move the : level(0) to 1, 2, ... 20 or whatever desired
depth. You either hard code this value or give as an argument when
calling getShapesUnderPt. But in this case, you have to provide the cv
and pt arguments as well since the order is important with @optional.
You can use @key otherwise.
At the end, the function returns a list of dbOject that could be
easily translated to layer/purpose pair with foreach loop + ~>lpp.
Thanks Dominic for this code ;-)

Riad.
 
On May 23, 6:37 pm, Riad KACED <riad.ka...@gmail.com> wrote:
Hi Dominic,

May I add a comment on your above code ? just to make it more clear
for vtcad.
This code is by default running on the Top level (0), means that the
functions returns only the sahpes underneath the cursor at the Top
level. If for example you click on a Pcell, it will return nil.
So one has to move the : level(0) to 1, 2, ... 20 or whatever desired
depth. You either hard code this value or give as an argument when
calling getShapesUnderPt. But in this case, you have to provide the cv
and pt arguments as well since the order is important with @optional.
You can use @key otherwise.
At the end, the function returns a list of dbOject that could be
easily translated to layer/purpose pair with foreach loop + ~>lpp.
Thanks Dominic for this code ;-)

Riad.
Thanks, the code works great.
 

Welcome to EDABoard.com

Sponsor

Back
Top