设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6769|回复: 2

[求助] 有关em-plant的编程

[复制链接]
发表于 2008-3-29 07:21:17 | 显示全部楼层 |阅读模式
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:: g. o& z3 S; u. m9 U. e  \
is
9 I& ^' g+ N. \0 t( z" X2 Fdo
% D% T5 N2 a7 W Counter := counter +1;
& s9 Y0 l# d+ `6 o  I$ G print counter;
9 n+ B( D: O- j6 c  \ if counter = 105 b5 B4 X: S9 b  k4 o
then @.quality := "bad";
( ~5 k+ \4 p  D! w$ F counter :=0;
- p' C* V+ v! h+ b else @.quality :="good";   & a) H7 y/ b) t" e2 P3 l& ]
end;9 M- ]! \9 f% l' h5 W0 C
Print @.quality;1 E4 `  u; z, p6 c3 r5 f% k/ q% ]
@.move;
2 n6 \: n+ K0 {" `3 nend;
! B& Y+ w! ?3 F2 s0 I' l
5 N3 h- ?& q  ]! o+ D5 @6 S
+ m1 h/ L4 j- i. A然后就出现了一下的错误:
. k6 N+ A) \5 J: g# y5 v: {0 S+ BError in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.8 B; r7 G2 s8 u7 _

1 k, c& u; G9 F7 B+ p% t5 l  R本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢!

最佳答案

查看完整内容

右键单击你的entity(来源的那个),在最后一个选项卡里(Custom Attributes)添加一个quality,属性由你设置。
发表于 2008-3-29 07:21:18 | 显示全部楼层
右键单击你的entity(来源的那个),在最后一个选项卡里(Custom Attributes)添加一个quality,属性由你设置。
发表于 2008-3-30 14:09:04 | 显示全部楼层
quality'是entity设置的一个属性,你这A 'VOID' cannot accept the method 'quality',表示你entity里面还没有设置这个属性。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2025-10-19 14:35 , Processed in 0.013889 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表