• 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 15830
  • 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
  • kbhow
    kbhow over 15 years ago

     Hi,

    I wrote a simple code for you. This will prompt user a form to key in x and y coordinate.User can input scale as well.For eg: 1.5 2.6 2 (1.5 is x coord; 2.6 is y coord; and 2 is the scale) , or they can just input x and y coordinate only, for eg: 2.5 9.0 

    In the other hand, it will use ruler to create a marker at the coordinate.

     

    procedure( ZoomToPoint( x y @key

                                               (scale 1)

                                               (winId hiGetCurrentWindow())

                                               (cvId geGetEditCellView()))

        let(( (dx 2) (dy 2))

     

           ;----------------------------

           ; 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

            ;-------------------------------

            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))

     

        );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

     

     

     

     

     

    How

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • kbhow
    kbhow over 15 years ago

     Hi,

    I wrote a simple code for you. This will prompt user a form to key in x and y coordinate.User can input scale as well.For eg: 1.5 2.6 2 (1.5 is x coord; 2.6 is y coord; and 2 is the scale) , or they can just input x and y coordinate only, for eg: 2.5 9.0 

    In the other hand, it will use ruler to create a marker at the coordinate.

     

    procedure( ZoomToPoint( x y @key

                                               (scale 1)

                                               (winId hiGetCurrentWindow())

                                               (cvId geGetEditCellView()))

        let(( (dx 2) (dy 2))

     

           ;----------------------------

           ; 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

            ;-------------------------------

            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))

     

        );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

     

     

     

     

     

    How

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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