• 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. How to following cursor of action in virtuoso

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 144
  • Views 19331
  • 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

How to following cursor of action in virtuoso

bojue00
bojue00 over 13 years ago

hi all

  i have a problem !

 How to following cursor of action in virtuoso ?

 how to get the X and Y coordinate of the cursor and dX(dY) on the status bar.

    Tank

  • Cancel
Parents
  • bojue00
    bojue00 over 13 years ago

    Paul

     thanks for your reply.

    I know these function.  I want to get to when the cursor moves auto print cursor( not pointer ) of coordinate.  Just like dX(dY) or X(Y) display on the status bar  in virtuoso.  I don't know what function may do it.

    Example:  1. Enter point (reference point)  in the draw path mode ( leHiCreatePath() ) .
                    2. Move cursor to anywhere.
                    3. Auto get current cursor of coordinate in the place.
                    4. Calculate between the last point entered(reference point) and cursor distance.

    So step 3 is important.  But almost function all need click the mouse to get point.'

    procedure( NextPathStartPoint()

     cvw = getCurrentWindow()
     GetCursorPoint = hiGetPoint(cvw)

     xStartNextPoint = xCoord( drStartNextPoint )
     yStartNextPoint = yCoord( drStartNextPoint )

     dxCoord = xCoord( GetCursorPoint ) - xStartNextPoint
     dyCoord = yCoord( GetCursorPoint ) - yStartNextPoint


     if(( dxCoord < GetCurrentPathWidth ) then

      NextPathDirectionMark = "up-down"

     else
      if(( dyCoord < GetCurrentPathWidth  ) then

       NextPathDirectionMark = "left-right"

      else
       println( list( "dx:" dxCoord ))
       println( list( "dy:" dyCoord ))
      );end if
     );end if


     when(( PathDirection == "Horizontal" )

      when(( NextPathDirectionMark == "up-down" )

       ;up-down direction
       if(( dyCoord > 0 ) then

        ;up
        yNewNextCoord = yStartNextPoint - GetCurrentPathWidth/2
        NewStartPoint = list( xStartNextPoint yNewNextCoord )

       else
          if(( dyCoord < 0 ) then

         ;down
           yNewNextCoord = yStartNextPoint + GetCurrentPathWidth/2
         NewStartPoint = list( xStartNextPoint yNewNextCoord )

          else
         NewStartPoint = drStartNextPoint
          );end if
       );end if
      );end when


      when(( NextPathDirectionMark == "left-right" )

       if(( dxCoord > 0 ) then

        ;right
        xNewNextCoord = x2RefPoint - xConOffsetCoord
        NewStartPoint = list( xNewNextCoord yStartNextPoint )

       else
          if(( dxCoord < 0 ) then

         ;left
         xNewNextCoord = x2RefPoint + xConOffsetCoord
         NewStartPoint = list( xNewNextCoord yStartNextPoint )

          else
         NewStartPoint = drStartNextPoint

          );end if
       );end if
      );end when

      println( list( "Horizontal: " NewStartPoint ))

     );end when

     

     when(( PathDirection == "Vertical" )

      when(( NextPathDirectionMark  == "up-down" )

       if(( dyCoord > 0 ) then

        yNewNextCoord = y2RefPoint - yConOffsetCoord
        NewStartPoint = list( xStartNextPoint yNewNextCoord )

       else
          if(( dyCoord < 0 ) then

         yNewNextCoord = y2RefPoint + yConOffsetCoord
         NewStartPoint = list( xStartNextPoint yNewNextCoord )
          else

         NewStartPoint = drStartNextPoint
          );end if
       );end if
      );end when

      when(( NextPathDirectionMark == "left-right" )

       if(( dxCoord > 0 ) then

        xNewNextCoord = xStartNextPoint - GetCurrentPathWidth/2
        NewStartPoint = list( xNewNextCoord yStartNextPoint  )

       else
          if(( dxCoord < 0 ) then

         xNewNextCoord = xStartNextPoint + GetCurrentPathWidth/2
         NewStartPoint = list( xNewNextCoord yStartNextPoint )

          else

         NewStartPoint = drStartNextPoint

          );end if
       );end if
      );end when

      println( list( "Vertical: " NewStartPoint))

     );end when


     when(( NewStartPoint != nil )

      deletePoint()
      enterPoint( ?points NewStartPoint )
     );end when


    );end procedure

            Tank

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • bojue00
    bojue00 over 13 years ago

    Paul

     thanks for your reply.

    I know these function.  I want to get to when the cursor moves auto print cursor( not pointer ) of coordinate.  Just like dX(dY) or X(Y) display on the status bar  in virtuoso.  I don't know what function may do it.

    Example:  1. Enter point (reference point)  in the draw path mode ( leHiCreatePath() ) .
                    2. Move cursor to anywhere.
                    3. Auto get current cursor of coordinate in the place.
                    4. Calculate between the last point entered(reference point) and cursor distance.

    So step 3 is important.  But almost function all need click the mouse to get point.'

    procedure( NextPathStartPoint()

     cvw = getCurrentWindow()
     GetCursorPoint = hiGetPoint(cvw)

     xStartNextPoint = xCoord( drStartNextPoint )
     yStartNextPoint = yCoord( drStartNextPoint )

     dxCoord = xCoord( GetCursorPoint ) - xStartNextPoint
     dyCoord = yCoord( GetCursorPoint ) - yStartNextPoint


     if(( dxCoord < GetCurrentPathWidth ) then

      NextPathDirectionMark = "up-down"

     else
      if(( dyCoord < GetCurrentPathWidth  ) then

       NextPathDirectionMark = "left-right"

      else
       println( list( "dx:" dxCoord ))
       println( list( "dy:" dyCoord ))
      );end if
     );end if


     when(( PathDirection == "Horizontal" )

      when(( NextPathDirectionMark == "up-down" )

       ;up-down direction
       if(( dyCoord > 0 ) then

        ;up
        yNewNextCoord = yStartNextPoint - GetCurrentPathWidth/2
        NewStartPoint = list( xStartNextPoint yNewNextCoord )

       else
          if(( dyCoord < 0 ) then

         ;down
           yNewNextCoord = yStartNextPoint + GetCurrentPathWidth/2
         NewStartPoint = list( xStartNextPoint yNewNextCoord )

          else
         NewStartPoint = drStartNextPoint
          );end if
       );end if
      );end when


      when(( NextPathDirectionMark == "left-right" )

       if(( dxCoord > 0 ) then

        ;right
        xNewNextCoord = x2RefPoint - xConOffsetCoord
        NewStartPoint = list( xNewNextCoord yStartNextPoint )

       else
          if(( dxCoord < 0 ) then

         ;left
         xNewNextCoord = x2RefPoint + xConOffsetCoord
         NewStartPoint = list( xNewNextCoord yStartNextPoint )

          else
         NewStartPoint = drStartNextPoint

          );end if
       );end if
      );end when

      println( list( "Horizontal: " NewStartPoint ))

     );end when

     

     when(( PathDirection == "Vertical" )

      when(( NextPathDirectionMark  == "up-down" )

       if(( dyCoord > 0 ) then

        yNewNextCoord = y2RefPoint - yConOffsetCoord
        NewStartPoint = list( xStartNextPoint yNewNextCoord )

       else
          if(( dyCoord < 0 ) then

         yNewNextCoord = y2RefPoint + yConOffsetCoord
         NewStartPoint = list( xStartNextPoint yNewNextCoord )
          else

         NewStartPoint = drStartNextPoint
          );end if
       );end if
      );end when

      when(( NextPathDirectionMark == "left-right" )

       if(( dxCoord > 0 ) then

        xNewNextCoord = xStartNextPoint - GetCurrentPathWidth/2
        NewStartPoint = list( xNewNextCoord yStartNextPoint  )

       else
          if(( dxCoord < 0 ) then

         xNewNextCoord = xStartNextPoint + GetCurrentPathWidth/2
         NewStartPoint = list( xNewNextCoord yStartNextPoint )

          else

         NewStartPoint = drStartNextPoint

          );end if
       );end if
      );end when

      println( list( "Vertical: " NewStartPoint))

     );end when


     when(( NewStartPoint != nil )

      deletePoint()
      enterPoint( ?points NewStartPoint )
     );end when


    );end procedure

            Tank

    • 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