×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Using a Rule to Populate a List

Using a Rule to Populate a List

Using a Rule to Populate a List

(OP)
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

RE: Using a Rule to Populate a List

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources