设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8003|回复: 2

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

[复制链接]
发表于 2008-3-29 07:21:17 | 显示全部楼层 |阅读模式
5仿真币
在eM-Plant中,新加入一个Method,里面的编程如下:
9 G) e9 R5 [$ s) F4 s* ~is2 d6 W- [  u5 c0 [7 ~  o6 C
do
# K: X& k5 I, I5 b Counter := counter +1;5 ?+ a; ?9 q$ h
print counter;& u( U) A) w6 g$ b
if counter = 10, `9 ?8 C# y) T9 r$ X9 p
then @.quality := "bad";( l0 j6 ?0 [9 t
counter :=0;6 g- S# @3 h1 ^" Y) e
else @.quality :="good";   % r& E2 G/ k6 O
end;8 D  K) a! W8 E, }' ]" f. `
Print @.quality;
$ ~1 ~( l: G( R- L" s1 C* b @.move;
5 [9 R0 P0 K1 A+ ~) L8 Jend;
. t* A$ F& e8 {: v( `
0 m! K; |% |* P/ W* o7 R& D8 y
( A2 G6 F3 E, U: ?( @然后就出现了一下的错误:; L3 L! i2 o. j! |4 z
Error in method '.Models.Frame_5.rework' in line 8: A 'VOID' cannot accept the method 'quality'.: _1 Z; z0 w. {4 x/ u; K( n7 H, f
" X) h# v6 @9 g2 r8 c8 n$ o+ Y
本人是个新手,想也想不明白,望那位仁兄能解答一下,谢谢!

最佳答案

查看完整内容

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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