设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6790|回复: 2

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

[复制链接]
发表于 2008-3-29 07:21:17 | 显示全部楼层 |阅读模式
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:
6 x' v: @% r/ f- Z  _is
2 Z. \* U9 Y, P, ydo# H  s7 r, P5 {
Counter := counter +1;) I3 _2 l* S) a; v& u
print counter;$ s8 D! G! c& M+ {, @1 M! D2 n7 n
if counter = 10+ |0 J, e. B3 r# W* O/ R
then @.quality := "bad";$ A0 V# h- B2 b7 P; H
counter :=0;
$ I9 B' I! c$ a/ e+ U! y5 m+ q" Y' r else @.quality :="good";   
5 x0 ~2 g1 I+ g! _8 A" p end;
% d% {$ A( N+ k0 y" \ Print @.quality;
% h% ~$ o3 J* @" K @.move;5 n) W$ c3 I7 ~0 y! r; b+ _
end;
" d; G. C* {: l# K8 [2 d! s
$ H; b# f8 R# m. ?
0 i$ {8 j% i: O0 C然后就出现了一下的错误:# z) g' q# p7 Q4 F8 D4 E
Error in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.* H- O! |' K, \

; Y4 V5 o  _/ B本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢!

最佳答案

查看完整内容

右键单击你的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-21 13:10 , Processed in 0.017157 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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