• 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 i can get the data into the variable which is stored...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14150
  • 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 i can get the data into the variable which is stored in the mouse pointer ?

latha
latha over 15 years ago

 Hi,

How i can get the data into the variable which is stored in the mouse pointer ?

EX: From any txt file, i will select some data with mouse. By pressing mouse middle click , i can paste the data in my required location. But instead of pasting i need to get that data into some variable. Is there any SKILL command to store it in variable.

If it is there please let me know.

 

Thanks,

Varalakshmi.

 

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Your question is a bit strange, but I guess you should just create a form, and then you can paste the mouse contents into a field on the form?

    If  you're asking for a way in SKILL to just access the contents of the UNIX paste buffer without actually pasting, then I don't believe there is a way to do this.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • latha
    latha over 15 years ago

     Hi Andrew,

    I will agree my question is little bit strange, but i am asking this option for below purpose.

    Iam planning to select a co-ordinate from txt file, by pressing some bindkey in layout it has to zoom automatically to that coordinate.

    I already have a form method but still iam planning to optimize it.

    Please let me know if you have any idea to implement this.

    Thanks in Advance,

    Latha.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 15 years ago

    Hi Latha,

    One possibility might be to open a view() type window on the text, and then it's possible to  define a bindkey associated with the "Show File" window to do something - that could use hiGetTextSelection() to retrieve the selected text. You could even define a popup menu so that you could do various operations on the selected text. You'd probably also want a bindkey or menu to call hiUnselectTextAll().

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • dmay
    dmay over 15 years ago

    I created a utility to do this that works pretty well for our needs. I created a form with a string field at the top of the form and a list box field at the bottom. The user can hilight all or part of a text file and paste it (using the middle mouse button) into the string field. I have a button on the form that converts the string field into the list box like this:

       _ZOOMLIST_FORM->listBox->choices = parseString(_ZOOMLIST_FORM->textField->value "\n")

    This basically puts each line of the text file into a different entry in the list box. You can also enhance the form to allow you to load a text file into the list box instead. This is actually necessary if you exceed the 8K limit (don't remember if the limit is on the paste buffer or the text field).

    I then created a callback for the list box. Each time you click on an entry in the list box, the line is parsed and the first two numbers in the line are used as the coordinate pair to zoom to. I have two integer fields on the form that allow you to specify which digits from the line to use as your X and Y coordinates in the case where your coordinates are not the first two numbers on the line. By adding Next and Previous buttons on the form, you can quickly zoom from point to point in your file.

    My callback looks like this:

    procedure(myZoomListCB(_ZOOMLIST_FORM)
      let((coord coordx coordy)
        coord=car(_ZOOMLIST_FORM->lb->value)
        when(coord
            ;Integer value on the form specifying which digit is X value (def=1)
            coordx=_ZOOMLIST_FORM->coord1->value  
            ;Integer value on the form specifying which digit is Y value (def=2)
            coordy=_ZOOMLIST_FORM->coord2->value  
            rexCompile( "[xyXY] *[=:]")
            coord = rexReplace( coord " " 0)
            rexCompile( "[(){}=,:]")
            coord = rexReplace( coord " " 0)
            rexCompile( "\\. ")
            coord = rexReplace( coord " " 0)
            coord = parseString(coord)
            ;Get only the numbers from the rest of the data
            coord=mapcar( 'aelNumber coord)
            ;Keep non-nil values
            coord=setof(x coord x)
            ;When more than 2 digits found
            when(length(coord)>2
                coord=list(nthelem(coordx coord) nthelem(coordy coord))
            )
            if(geCoordp(coord)
                _ZOOMLIST_FORM->coord->value=coord
                _ZOOMLIST_FORM->coord->value=nil
            )
            if(_ZOOMLIST_FORM->coord->value then
                ;If coordinate is relative to lower level cell and user is editing in place, translate it
                when(_ZOOMLIST_FORM->eip->value
                    coord=geEditToWindowPoint(hiGetCurrentWindow() coord)
                )
                if(_ZOOMLIST_FORM->panZoom->value=="Pan" then
                    hiPan(hiGetCurrentWindow() coord)
                else
                    ;Zoom in with 5 micron radius around the point
                    hiZoomIn(hiGetCurrentWindow() 
                       list(xCoord(coord)-5.0:yCoord(coord)-5.0
                            xCoord(coord)+5.0:yCoord(coord)+5.0)
                    )
                )
            else
                hiGetAttention()
                printf("**ERROR: Not a valid coordinate pair in this string\n")
            )
        )
      ) ;let
    ) ;proc

    Good luck,

    Derek

    • 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