How do you use gePointToFig to select multiple nets

Discussion in 'Cadence' started by Martin, Apr 14, 2009.

  1. Martin

    Martin Guest

    Hi,

    I'd like to use the gePointToFig to select multiple nets from a
    schematic and add their names to a field on a form. At the moment I
    have to keep pressing the "select on Schematic" button on the form
    I've created and select them one by one. I'd like to press a button
    once, click on a number of nets in a schematic and then hit the ESC
    key.

    Cheers
    Martin
     
    Martin, Apr 14, 2009
    #1
  2. Martin

    Riad KACED Guest

    Hi Martin,

    You may find the following example helpful. You might need to fine
    tune it for your application.
    ;
    procedure(RKselectNets()
    enterPoints(
    ?prompts '("Select the first net ..."
    "Select the next net ...")
    ?doneProc "RKselectNetsdoneProc"
    )
    )
    ;
    procedure(RKselectNetsdoneProc(window _done points)
    let( (figure netName (netNames nil))
    foreach( point points
    figure = gePointToFig(window nil point)
    ;; only for figures with nets, i.e. not instance terms
    when(figure && figure~>objType=="line" && figure~>net
    netName = figure~>net~>name
    printf("Selected net: %s.\n" netName)
    netNames=cons(netName netNames)
    )
    )
    )
    )
    ;

    Execute RKselectNets() in your CIW and then click you nets. End your
    selection by Escape.
    When the enterpoints get to end signal, it executes the ?doneProc
    callback, i.e the RKselectNetsdoneProc function.
    You may need to add few lines into this function in order to interact
    wit your form.

    Hope this help !
    Regards,
    Riad.
     
    Riad KACED, Apr 14, 2009
    #2
  3. Martin

    Martin Guest

    Thanks Riad, works great.
    It was the enterPoints function that I was missing.

    Cheers
    Martin
     
    Martin, Apr 15, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.