全球FlexSim系统仿真中文论坛

标题: 一个flexsim树结构的小技巧 [打印本页]

作者: domcylai    时间: 2012-9-10 20:58
标题: 一个flexsim树结构的小技巧
给大家分享一个小经验,算是自己学习的一个心得吧。% _( C7 D; `0 Y9 ]. w. ?
/ K: \5 B- m4 ~2 M! R' m
大家使用flexsim做对象指代,特别是在树中查找对象的时候有很多方法,现在我教大家一个:如图
9 X1 n/ m2 a( e" R# Y" U5 E[attach]748[/attach]
+ C1 e4 r0 ]8 i3 b2 r当看到一些节点,这些节点只有一串数值,且后面还注释这一串地址,那么我告诉大家其实这串数值就是地址所指向的节点的引用。那么我们可以使用tonode()函数来返回该节点,还能使用up()函数返回该节点上级的节点,还能使用ownerobject()函数返回该实体。8 I6 {- G% y4 i# V

" {0 Z$ V: D/ p9 y7 n7 y7 D8 w2 _这么做的话,大大提高了建模速度。0 q/ r2 r2 s8 S. N. t
tonode() :   Assert type as a node pointer.
- M* N, F* r) x# B5 A. Yup():    This command returns the node in the tree that contains thenode.- ~( L9 u9 m/ D: `; F% b, T  P) M
ownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode.
  t  a9 ~9 `; N2 g
- v- v. D) v, y2 }& C  rtonode() :   Assert type as a node pointer.1 S3 O2 E9 ?- B* i9 U5 `
up():    This command returns the node in the tree that contains thenode.
( [& x9 H0 D9 j! K8 M, b$ vownerobject(): This command returns the node with object data attached to it that is the start of the sub-tree that thenode is in. In other words, it returns the object node that contains thenode.
作者: CraneJan    时间: 2012-9-10 21:02
学习,呵呵
作者: 雨花台    时间: 2012-9-10 21:05
MARK 下
作者: huangwei    时间: 2012-12-11 19:49
初学,学习
作者: a3348215    时间: 2013-4-4 09:39
学习一下!




欢迎光临 全球FlexSim系统仿真中文论坛 (http://www.flexsimasia.com/) Powered by Discuz! X3.3