请教一下,我创建了6个钢板用entity表示,钢板的厚度有三种分别用1,2,3表示。在entity的自定义属性里面创建了thickness的属性定义为integer型分别给每个钢板厚度赋值。在分流运输时,创建了一个flow对象,后接三个buffer,编辑了一个method对象添加给flow的exit从而根据厚度对钢板进行分流,我写的method如下:8 z, e+ B6 j( W, u1 j7 a: H, c+ k
:integer
- C6 Z* ?5 L" w9 His, w6 L: |8 c/ a+ l2 x
m :integer;Thickness :integer;/ o) r' H% p3 _+ o* v2 r
do0 K9 Y" W9 o, j! R# U, _; u: b
m=@.Thickness;/ U+ D6 A ^; e! V0 `+ w
if m=1then- t$ U% i5 \7 n ^$ G
return 1;1 I+ L2 R* Z* w, i% `3 w) n
elseif m=2then
$ L$ a! ~+ x% Wreturn 2;1 l* h/ _; U; B, c1 ]. d
else
' E$ C8 Z& i/ areturn 3 ;$ w6 H" B" @* Z( I
end;
6 |# T7 r5 V- \7 a; Xend;只有读了entity1可以被运输到相应的Buffer上,再读entity2就说不识别Thickness了,我想不明白了,请大家有时间帮忙解惑一下,不甚感激 |