请教一下,我创建了6个钢板用entity表示,钢板的厚度有三种分别用1,2,3表示。在entity的自定义属性里面创建了thickness的属性定义为integer型分别给每个钢板厚度赋值。在分流运输时,创建了一个flow对象,后接三个buffer,编辑了一个method对象添加给flow的exit从而根据厚度对钢板进行分流,我写的method如下:
" |! ], C" B& w# L. m# o/ B:integer; Y: |+ d2 ~8 V' @2 }
is
" S5 f8 L) n' o g- ]$ f! om :integer;Thickness :integer;) e) \5 A' h: [0 ?
do, I9 C0 f* }( N8 q3 Z' d
m=@.Thickness;
8 t( v# X! j2 E/ z0 O$ V1 Dif m=1then* z2 A$ M z! Z( d9 G# |. H7 O
return 1;
7 I r, S* I$ A1 Zelseif m=2then
% i/ U! N6 {& |1 ~return 2;% h4 ~2 R9 I: ]- B* F9 B; i
else
% I$ X9 ~: E' y' P. n8 u" Areturn 3 ;' |/ m* v$ r, j; N$ _
end; m1 G+ C8 |& T
end;只有读了entity1可以被运输到相应的Buffer上,再读entity2就说不识别Thickness了,我想不明白了,请大家有时间帮忙解惑一下,不甚感激 |