Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a Rule to Populate a List

Status
Not open for further replies.

jopal

Automotive
Dec 5, 2007
121
I'm trying to write a rule to control the multiple values of a parameters but not having any luck

it's a string parameter im using to try to control the values contained in a list of a length parameter

if
string parameter = a
then
length parameter = list (1in, 2in)

else

length parameter =list (3in,4in)

This is the error I get.
"impossible to affect a variable of type List in a variable of type Length. You can use the syntax <set x=y> if your intention is to operate a cast between 2 variables

 
Replies continue below

Recommended for you

to test this out create parameters Length.1, Length.2, String.1, List.1

/*Rule created by dbezaire 17/10/2012*/

let A (list)
let B (list)
let items (list)


A.Append(1in)
A.Append(2in)

B.Append(3in)
B.Append(4in)


if String.1 == "a"
items = A
else if String.1 =="b"
items = B

List.1 = items
Length.2.AuthorizedValues = items

Win XP64
R20/21, 3DVIA Composer 2012, ST R20
Dell T7400 16GB Ram
Quadro FX 4800 - 1.5GB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor