Welcome to the COE Discussion Forums! 

 

To participate in the discussion forum, you must be logged in to the website.  If you forget your login information, please contact COE Headquarters at coe@coe.org or (800) 263-2255.

If you are new to the COE Discussion Forum and would like to participate, please register.


COE Community News

Follow COE on

COE DISCUSSION FORUM
nested if statments
Last Post 30 Jun 2006 12:49 PM by COE-FORUM-USER. 2 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
COE-FORUM-USER
New Member
New Member
Posts:0

--
30 Jun 2006 12:49 PM  
Hello All,

running catia v5 r12, not sure which service pack, on a unix machine.

Having had a look at the rather cryptic help regarding 'if statments', I am no wiser as to the syntax of nesting if staments.

What I have is a parameter: 'Seat Travel', with two options: '>133mm' or '=<133mm,' with a second parameter '%ile' with two options: '95%ile' or '99%ile'.

The required layout would be something like:

if 'seat travel' == >133mm

if %ile == '95%ile'
statment
else
statment

else 'steat Travel' == <133mm

as above

I get the impresion '[]' are involved but not sure how, I would appreciate if you could point me in the right direction.

Thanks for you help.
COE-Member
New Member
New Member
Posts:0

--
03 Jul 2006 11:54 AM  
Hi,

It works with following syntax:

/*Rule created by lpurma 03.07.2006*/

if Seat_travel >= 133mm
{
if percentige ==95
{
A=1
}
else
{
A=2
}
}
else if Seat_travel <133mm
{
if percentige ==95
{
A=3
}
else
{
A=4
}
}

Here statements are giving value to parameter called A (just to test it)


BR,
Lasse
COE-FORUM-USER
New Member
New Member
Posts:0

--
03 Jul 2006 12:21 PM  
Thanks for that. It worked without any problems.

My 'help' suggests using square brackets rather than curly, for breaking up the different levels!!
You are not authorized to post a reply.

Active Forums 4.1