SKILL script: exiting when certain condition if found

V

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.
 
In article <1166036736.914690.230130@t46g2000cwa.googlegroups.com> "vlsidesign" <fordgwf@gmail.com> writes:

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.
If you embed the code within (prog () <your code here> ) then you can
use return().

-Pete Zakel
(phz@seeheader.nospam)

"Imitation is the sincerest form of plagarism."
 
Thanks Pete, this works great.

Pete nospam Zakel wrote:
In article <1166036736.914690.230130@t46g2000cwa.googlegroups.com> "vlsidesign" <fordgwf@gmail.com> writes:

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.

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

-Pete Zakel
(phz@seeheader.nospam)

"Imitation is the sincerest form of plagarism."
 

Welcome to EDABoard.com

Sponsor

Back
Top