• 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. help - skill code for goto xy coordinate

Stats

  • Locked Locked
  • Replies 23
  • Subscribers 146
  • Views 15842
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

help - skill code for goto xy coordinate

zeroskills
zeroskills over 15 years ago

i would like some help on skill code for goto xy coordinate. we used to have this skill code, it does this...

pop up goto xy form, just input x and y coordinate then view size, like how zoom in or out you want it. then there will be an "X" ruler mark on the coordinate.

 

  • Cancel
Parents
  • Satya
    Satya over 15 years ago

    Hi All!! I have modifide kbhow code to zoom and create x marker..please check it out!!

     

    procedure( ZoomToPoint( x y @key
     (scale 1)
     (winId hiGetCurrentWindow())
     (cvId geGetEditCellView()))

    let(( (dx 1) (dy 1) qcBbox)
    ;----------------------------
    ; Zoom to point with scale
    ;----------------------------
    hiZoomWindowAtPoint(winId scale x:y)
    printf("\nCmd: Zooming to Point %L %L with scale %L\n" x y scale)
    ;-------------------------------
    ; Create cross mark using ruler
    ;-------------------------------
    qcBbox = list( list( (x - dy) (y - dy)) list( (x + dx) (y + dx)))
    leCreateRuler( cvId list(x:y x+dx:y+dy))
    leCreateRuler( cvId list(x:y x+dx:y-dy))
    leCreateRuler( cvId list(x:y x-dx:y+dy))
    leCreateRuler( cvId list(x:y x-dx:y-dy))
    hiZoomIn(winId qcBbox)
      );let
     );proc
    procedure( zoomGUI()
     let(()
     ;----------------
     ; Create form
     ;----------------
    hiCreateAppForm(
    ?name 'zoomGui
    ?formTitle "Zoom and Mark"
    ?callback "zoomGuiCB(zoomGui->column->value)"
    ?fields list(
     list( hiCreateStringField(
     ?name 'column
     ?prompt "Go to:"
     ) 5:5 200:25 50)
     );
     ?buttonLayout 'OKCancel
     ?help ""
      );
    hiDisplayForm(zoomGui)
     );let
     );proc
    procedure( zoomGuiCB(input)
     let((dX dY (zscale 1))
     value = parseString(input " ")
     ;-----------------------
     ; Process form' value
     ;-----------------------
     if( length(value) == 2 then
     dX = atof(car(value))
     dY = atof(cadr(value))
     else
     if( length(value) == 3 then
    dX = atof(car(value))
    dY = atof(cadr(value))
    zscale = atof(caddr(value))
     else
    warn("Zoom to Pt => Invalid input! Input must be x y scale")
     );if
     );if
     ;--------------------------
     ; Calling function to zoom
     ;--------------------------
    ZoomToPoint(dX dY ?scale zscale)
    );let
    );proc
    hiSetBindKey("Layout" "Ctrl<Key>p" "zoomGUI()")

     

    Satya..

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Karthik Punna
    Karthik Punna over 6 years ago in reply to Satya

    Hi Satya,

    I'm using your code,

    But it showing an error while working on it i.e., too few arguments (at least 2expected , 1 given) - ((length ((value ==2)then (dx = atof(&)) (dy = atof(&))...))

    Could you please suggest me  how to fix the error .

    Regards,

    Karthik P.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Karthik Punna
    Karthik Punna over 6 years ago in reply to Satya

    Hi Satya,

    I'm using your code,

    But it showing an error while working on it i.e., too few arguments (at least 2expected , 1 given) - ((length ((value ==2)then (dx = atof(&)) (dy = atof(&))...))

    Could you please suggest me  how to fix the error .

    Regards,

    Karthik P.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 6 years ago in reply to Karthik Punna

    You appear to have mangled the code somehow when copying and pasting it, and have added spaces in some places and probably removed them elsewhere. I copied the code and loaded it, and it worked fine. The error suggests that you have a space after the length function name (in SKILL in C-style you must not have a space between the function name and the following open parenthesis.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Karthik Punna
    Karthik Punna over 6 years ago in reply to Andrew Beckett

    Thank You , Andrew

    Karthik P.

    • Cancel
    • Vote Up 0 Vote Down
    • 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