请教一下,我创建了6个钢板用entity表示,钢板的厚度有三种分别用1,2,3表示。在entity的自定义属性里面创建了thickness的属性定义为integer型分别给每个钢板厚度赋值。在分流运输时,创建了一个flow对象,后接三个buffer,编辑了一个method对象添加给flow的exit从而根据厚度对钢板进行分流,我写的method如下:, s# R6 U: ~9 `$ b* Q+ S1 x
:integer! L2 G# {; u/ L5 w" S; W9 r5 M0 W
is# B5 n1 C! f& C* F U8 \& t
m :integer;Thickness :integer;
- J N k+ g k! p% mdo3 v9 z# @) S5 M ~# R t$ g! Y
m=@.Thickness;& }6 ^% H/ N' D: J
if m=1then5 b: s1 @1 H" \
return 1;% l, k/ h" t( D6 s# ~: A- ]
elseif m=2then
) `) R/ ?0 Z- i- {& N# ~! J( `return 2;
) |8 G! w' u, g: U @! s( V; f- S% welse |! ~) r1 J- J( f( B
return 3 ;
! [" q8 n r% N+ Iend;+ e- k f6 |; R1 I; q9 Q
end;只有读了entity1可以被运输到相应的Buffer上,再读entity2就说不识别Thickness了,我想不明白了,请大家有时间帮忙解惑一下,不甚感激 |