• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. I want to Join two different or same metals which are perpendicular...

Stats

  • Replies 2
  • Subscribers 143
  • Views 72
  • Members are here 0

I want to Join two different or same metals which are perpendicular like below picture using a single bindkey instead of Aligning. I am trying to make this happen through the bBox co-ordinates but i have struck at comparing the co-ordinates.

RM202509123737
RM202509123737 4 hours ago

i have implemented the below code 

hiSetBindKey("Layout" "<Key>h" "Swap_X2andY2()")

procedure(Swap_X2andY2()

Paths=nil
x=nil


foreach(x geGetSelSet() when(x~>objType=="pathSeg"
Paths=cons(x Paths)

)
)
when(length(Paths)>=2
Path1=car(Paths)
Path2=cadr(Paths)
print(Path1)
print(Path2)

Path1_BBox=Path1~>bBox
Path2_BBox=Path2~>bBox
print(Path1_BBox)
print(Path2_BBox)


path1_x1=caar(Path1_BBox)
path1_x2=car(car(cdr(Path1_BBox)))
path1_y1=cadar(Path1_BBox)
path1_y2=car(cdr(car(cdr(Path1_BBox))))

path2_x1=caar(Path2_BBox)
path2_x2=car(car(cdr(Path2_BBox)))
path2_y1=cadar(Path2_BBox)
path2_y2=car(cdr(car(cdr(Path2_BBox))))

print(path1_x1)
print(path1_x2)
print(path1_y1)
print(path1_y2)

print(path2_x1)
print(path2_x2)
print(path2_y1)
print(path2_y2)


if(path1_y2>=path2_y2      /////Here I am failing to do
print(yes)

Path2_BBox~>bBox=list(path1_x1:path1_y1 path1_x2:path2_y2)                ///trying to assign new bbox value to path2 and similarly for path1
)
)
)

  • Sign in to reply
  • Cancel
  • Andrew Beckett
    Andrew Beckett 2 hours ago

    Alignment would be fairly easy, but maybe you can use (or modify) the code I wrote to answer this post?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • RM202509123737
    RM202509123737 2 hours ago in reply to Andrew Beckett

    Thank you Andrew for your quick replay. The code which you wrote works for me.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information