|
楼主 |
发表于 2013-3-26 13:35:03
|
显示全部楼层
通过小车的OnLane,onLaneA ,onLaneB这几个方法或者属性可以获取小车所在的Track
$ E. ^ b5 O: G, D. ZonLaneA ( a' j# f" d$ u" a$ ^" E% }* y& B
Usage: <MU_path>.onLaneA;
, S+ d8 }9 C Q<MU_path>.onLaneA[(<length>)];
3 w% ^3 l M7 A. L$ @
9 P) [# i) f; p( [0 I2 H* \The method onLaneA returns if the Transporter is located on lane A of a TwoLaneTrack (true) or not (false).
5 ?' Z! E; g8 q3 e
* y* x& C; w% t ^ TThe optional parameter of data type length designates the position starting from the front of the Transporter. When you do not enter the parameter, Plant Simulation uses the reference point. This parameter is of importance, when the Transporter stretches across several Tracks. ) f' N& p/ [0 a* r- f$ J
8 w/ p; r" _7 Y* L) O/ Z& k5 W
The return value has the data type boolean. & X; }; e+ E( e( R* F! C
/ ?* y4 }3 [) [- x9 c
Example: print .MUs.Transporter:1.onLaneA; " z' K" c6 a" A) s& A; h/ o; s
) r7 L. `5 g% l' X# O) Q, L
onLaneB
- e0 M$ u8 @; LUsage: <MU_path>.onLaneB;! h2 p6 T1 R7 q9 Y% D* K( Q. f2 ~2 V
<MU_path>.onLaneB[(<length>)]; , K, P& S( U& @0 I
7 W) @+ Z) w9 T! g n( H: Y* S) W6 QThe method onLaneB returns if the Transporter is located on lane B of a TwoLaneTrack (true) or not (false). ) B+ a$ L3 l1 N# v" L/ d' @- e% I
( S" T: D! m6 r. }
The optional parameter of data type length designates the position starting from the front of the Transporter. When you do not enter the parameter, Plant Simulation uses the reference point. This parameter is of importance, when the Transporter stretches across several Tracks.
8 @8 ~% Z' s. |$ t V3 I
$ b A5 Q; n0 C1 U0 {9 x( rThe return value has the data type boolean. 2 P8 T1 n% W! z6 N- o1 Q+ X' | t
9 U% r- |; \. F, Y. q) a
Example: print .MUs.Transporter:1.onLaneB; 6 S P$ e- V p7 {! i6 B4 }
# h/ w6 }+ F, f$ ?- Y( [
|
|