• 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 15847
  • 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
Reply
  • 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
Children
  • 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
  • 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
  • Karthik Punna
    Karthik Punna over 6 years ago in reply to Satya

    HI Satya/Andrew,

    The Above code is only for the single coordinate with scaling factor like (2.0 5.0 2) .

    I want improve the code like it should be take multiple coordinates at single time and mark the same multiple coordinates at a time.

    could you please help me out in this.

    Regards,

    Karthik  P.

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

    Karthik,

    Given this code was written 9 years ago and I can't see other posts by Satya (at least not recently), I suspect you won't get an answer. Not sure I have the time to take the code, reformat it (to understand it - the indentation is missing) and update it, especially when it doesn't really make sense to have it zoom to multiple coordinates - after all, much of the point of the code was to zoom to the specified location - you can't zoom to multiple locations.

    If you want to modify it yourself though, you could remove the zooming part (the hiZoom* functions in the code above) and then have a loop which did something like this (replacing part of the code above).

    ; Process form value
    while(value
      if( length(value) == 2 then
        dX = atof(car(value))
        dY = atof(cadr(value))
        zscale = 1 ; NOTE DEFAULT HERE
      else
        if( length(value) >= 3 then  ; NOTE CONDITION CHANGED
          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)
      ; remove three values
      value=cdddr(value)
    )

    I've not tested the above - it's just a quick typed bit of code which probably would do what you want - and if not, probably gives you the basis of what you need.

    Andrew.

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

    Thank You, Andrew

    Regards,

    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