Rule Example(03) : Create a Loop in a Rule

Case1.


Let x(Point)

for x inside `ListTest`

{
if (x.GetAttributeReal("X") < 0.02)
x.SetAttributeReal("Z",0.10)
else
x.SetAttributeReal("Z",0.01)
}



























case 2.



Let x(Point)

let i = 1
let x(Point)

for i while i<=`ListTest` .Size()
{
x = `ListTest` .GetItem(i)
if (x.GetAttributeReal("X") < 0.01)
x.SetAttributeReal("Z",0.1)
else
x.SetAttributeReal("Z",0.2)
}





댓글 없음:

댓글 쓰기