• 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 15850
  • 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
  • Guruprasad S
    Guruprasad S over 10 years ago

    Hi , iam using this skill to zoom , but in this skill we need to enter x , y coordinates everytime.

    I have a set of 100 x , y coordinates , it must be given one after the other automatically by pressing NEXT button PREVIOUS botton ..

    (8.925,5.026)

    (0.586,4.256)

    (2.548,8.412)

       ....

      ....

       ...

    (4.568,2.195)

    Can any one suggest me how that can be done .




    procedure( zoomToPointFormCB(form)
      let((point xCoordinate yCoordinate)
        xCoordinate=car(parseString(form->xyCoordinates->value ","))
        yCoordinate=cadr(parseString(form->xyCoordinates->value ","))
        point=list(cdfParseFloatString(xCoordinate) cdfParseFloatString(yCoordinate))
        printf("The Selected Point is: %L\n" point)
        zoomToPointCB(point)
      )
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPointCB.
    ; This is the main function, it does dynamically calculate the
    ; zoom ratio and then pan. It also put the ref point that is displayed

    ;---------------------------------------------------------------------------
    procedure( zoomToPointCB(point)
      let((windowId viewBBox zoomVal)
        windowId=hiGetCurrentWindow()
        hiZoomAbsoluteScale(windowId 1)
        viewBBox=hiGetViewBBox(windowId)
        zoomVal=max(abs(yCoord(upperRight(viewBBox))-yCoord(lowerLeft(viewBBox)))
                    abs(xCoord(upperRight(viewBBox))-xCoord(lowerLeft(viewBBox))))
        ;The zoom can be made even higher, just by seeting value
         zoomVal=20*zoomVal
        hiPan( hiGetCurrentWindow() point)
        hiZoomRelativeScale(windowId  zoomVal)
        unless(leEditorOptionsForm->options->displayRefPoint->value
         leEditorOptionsForm->options->displayRefPoint->value=t
        )
        leSetRefPoint(windowId~>cellView point)
      )
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPoint, main entry.
    ;---------------------------------------------------------------------------
    procedure(zoomToPoint()
      unless(boundp('zoomToPointForm)
        zoomToPointCreateForm()
      )
      hiDisplayForm(zoomToPointForm)
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPointCreateForm
    ;---------------------------------------------------------------------------
    procedure(zoomToPointCreateForm()
      let((xyCoordinates zoomLabel zoomButton)
       
        zoomLabel=hiCreateLabel(
          ?name 'zoomLabel
          ?labelText "Enter ',' Separated Points: ex 0.0,0.0"
          ?justification `center
        )
     
        xyCoordinates=hiCreateStringField(
          ?name 'xyCoordinates
          ?prompt "X,Y Coordinates"
          ?value "0.0,0.0"
        )           
        zoomButton=hiCreateButton(
          ?name 'zoomButton
          ?buttonText "Zoom & Pan"
          ?callback strcat("(zoomToPointFormCB " 'zoomToPointForm " )")
        )
                   
       zoomToPointForm=hiCreateAppForm(
          ?name 'zoomToPointForm
          ?formTitle " Zoom To Point"
          ?callback strcat("(zoomToPointFormCB " 'zoomToPointForm " )")
          ?buttonLayout '(OKCancelDef)
          ?fields list(
            list(zoomLabel 5:5 250:30 100 )
            list(xyCoordinates 5:40 250:30 100 )
        list(zoomButton  30:75 200:30  )
          )
        )
      )
    )
    ;---------------------------------------------------------------------------
    ; Bindkey definition
    ;---------------------------------------------------------------------------
    hiSetBindKey("Layout" "Alt<Key>z" "zoomToPoint()")

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Guruprasad S
    Guruprasad S over 10 years ago

    Hi , iam using this skill to zoom , but in this skill we need to enter x , y coordinates everytime.

    I have a set of 100 x , y coordinates , it must be given one after the other automatically by pressing NEXT button PREVIOUS botton ..

    (8.925,5.026)

    (0.586,4.256)

    (2.548,8.412)

       ....

      ....

       ...

    (4.568,2.195)

    Can any one suggest me how that can be done .




    procedure( zoomToPointFormCB(form)
      let((point xCoordinate yCoordinate)
        xCoordinate=car(parseString(form->xyCoordinates->value ","))
        yCoordinate=cadr(parseString(form->xyCoordinates->value ","))
        point=list(cdfParseFloatString(xCoordinate) cdfParseFloatString(yCoordinate))
        printf("The Selected Point is: %L\n" point)
        zoomToPointCB(point)
      )
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPointCB.
    ; This is the main function, it does dynamically calculate the
    ; zoom ratio and then pan. It also put the ref point that is displayed

    ;---------------------------------------------------------------------------
    procedure( zoomToPointCB(point)
      let((windowId viewBBox zoomVal)
        windowId=hiGetCurrentWindow()
        hiZoomAbsoluteScale(windowId 1)
        viewBBox=hiGetViewBBox(windowId)
        zoomVal=max(abs(yCoord(upperRight(viewBBox))-yCoord(lowerLeft(viewBBox)))
                    abs(xCoord(upperRight(viewBBox))-xCoord(lowerLeft(viewBBox))))
        ;The zoom can be made even higher, just by seeting value
         zoomVal=20*zoomVal
        hiPan( hiGetCurrentWindow() point)
        hiZoomRelativeScale(windowId  zoomVal)
        unless(leEditorOptionsForm->options->displayRefPoint->value
         leEditorOptionsForm->options->displayRefPoint->value=t
        )
        leSetRefPoint(windowId~>cellView point)
      )
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPoint, main entry.
    ;---------------------------------------------------------------------------
    procedure(zoomToPoint()
      unless(boundp('zoomToPointForm)
        zoomToPointCreateForm()
      )
      hiDisplayForm(zoomToPointForm)
    )
    ;---------------------------------------------------------------------------
    ; procedure : zoomToPointCreateForm
    ;---------------------------------------------------------------------------
    procedure(zoomToPointCreateForm()
      let((xyCoordinates zoomLabel zoomButton)
       
        zoomLabel=hiCreateLabel(
          ?name 'zoomLabel
          ?labelText "Enter ',' Separated Points: ex 0.0,0.0"
          ?justification `center
        )
     
        xyCoordinates=hiCreateStringField(
          ?name 'xyCoordinates
          ?prompt "X,Y Coordinates"
          ?value "0.0,0.0"
        )           
        zoomButton=hiCreateButton(
          ?name 'zoomButton
          ?buttonText "Zoom & Pan"
          ?callback strcat("(zoomToPointFormCB " 'zoomToPointForm " )")
        )
                   
       zoomToPointForm=hiCreateAppForm(
          ?name 'zoomToPointForm
          ?formTitle " Zoom To Point"
          ?callback strcat("(zoomToPointFormCB " 'zoomToPointForm " )")
          ?buttonLayout '(OKCancelDef)
          ?fields list(
            list(zoomLabel 5:5 250:30 100 )
            list(xyCoordinates 5:40 250:30 100 )
        list(zoomButton  30:75 200:30  )
          )
        )
      )
    )
    ;---------------------------------------------------------------------------
    ; Bindkey definition
    ;---------------------------------------------------------------------------
    hiSetBindKey("Layout" "Alt<Key>z" "zoomToPoint()")

    • 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