设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7217|回复: 2

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

[复制链接]
发表于 2008-3-29 07:21:17 | 显示全部楼层 |阅读模式
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:
, q5 T' ~8 _  t# u/ z3 Jis7 K& [0 e4 q8 g* s' ~6 R% _/ o
do% f3 W9 i- N: j" |) o* b
Counter := counter +1;
  U1 I4 o: j" A  x print counter;% I- {7 K( F; r6 Z% h
if counter = 10# a( Y9 }% L8 v: Y
then @.quality := "bad";+ h6 }3 A9 u: q9 E
counter :=0;
- |. Y+ m0 G4 U- g, ~- O& z else @.quality :="good";   1 V( b5 C( m; m% o, ?
end;' @4 V+ S; B( D# J( S6 @
Print @.quality;
' e9 s. l, h  e( C" @( ^  Q( f* L @.move;1 x7 z* T' A8 z* B& z5 x7 ^# A
end;
, |3 E# P: J0 z& H$ y0 ~. W$ |) `2 r( \1 T: p: b% J

% N& w* |0 a; U: o7 p然后就出现了一下的错误:
7 H6 B# Y$ Q7 [/ NError in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.
+ b+ L+ ^* E$ f: O2 P
4 l8 i2 ^; x2 `# k6 Q6 w本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢!

最佳答案

查看完整内容

右键单击你的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-12-18 09:54 , Processed in 0.016089 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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