设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6073|回复: 2

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

[复制链接]
发表于 2008-3-29 07:21:17 | 显示全部楼层 |阅读模式
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:
9 U( y4 l9 y$ s( p& Yis2 w3 `) F0 L' n
do: c: ^8 F6 o0 t5 r0 u9 D4 f
Counter := counter +1;
2 J; @: v  S: N$ q2 z7 J" N print counter;
2 e# ~# o" O5 M& E0 b! g if counter = 10, w3 V. E3 @3 s+ L7 U) Y8 u
then @.quality := "bad";% V1 ^3 D& ]& S2 J
counter :=0;
; A1 v/ g* b3 ?$ F* [; N. { else @.quality :="good";   . f4 N0 b! B9 F! z5 K. t
end;
- C7 s4 Z" P* Z) Q. D Print @.quality;
! m% |2 r4 A1 ^/ x0 L8 Q$ u' _ @.move;3 t4 e1 n% [0 O) H
end;) t* t7 s( H6 _8 R4 t  d
; V8 {  z. U6 U

( A8 Q- f# m  Q+ g  D1 S3 \! r  D然后就出现了一下的错误:/ c) W& ]6 j, p. w; |" m- @2 U
Error in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.1 U7 V! b3 c1 N6 }% q

  `& L% a$ P7 R" S. N4 O本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢!

最佳答案

查看完整内容

右键单击你的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-7-6 11:05 , Processed in 0.016711 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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