SKILL script: exiting when certain condition if found

Discussion in 'Cadence' started by vlsidesign, Dec 13, 2006.

  1. vlsidesign

    vlsidesign Guest

    In Cadence Virtuoso I first select a pad inst and a pin (I do it in XL
    mode). My current script works then is called by a bindkey, it then
    centers the pin on top of the padinst. But sometimes I forget to
    de-select everything, and it then moves all the pins, etc. So I wanted
    to do a quick check and if I have more than two things selected it will
    abort the script. The "IF" statement is supposed to do that check, and
    then I have a foreach to handle calculating center of padinstance and
    then moving the pin, here is the IF portion:

    cv= GeGetEditCellView()
    twoObjects=geGetSelSet(cv)
    numObjects=geGetSelSetCount()
    if( numObjects != 2 then
    println( "Incorrect number of objects selected" )
    ;;;;;;;exit program but not Cadence Virtuoso session
    );end if


    Do I need to embed the "foreach" into the "else" portion of the "if"
    statement or can I give a function like 'exit' to exit the script. When
    I tried to use the exit function, it then exits my Cadence VIrtuoso
    session. ANy help is appreciated or pointing in the right direction is
    appreciated. Thanks.
     
    vlsidesign, Dec 13, 2006
    #1
  2. vlsidesign

    Guest Guest

    If you embed the code within (prog () <your code here> ) then you can
    use return().

    -Pete Zakel
    ()

    "Imitation is the sincerest form of plagarism."
     
    Guest, Dec 13, 2006
    #2
  3. vlsidesign

    vlsidesign Guest

    Thanks Pete, this works great.
     
    vlsidesign, Dec 14, 2006
    #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.