admin管理员组文章数量:1277333
I've used event to add an image after 5 seconds.
image.add("C:\Users\me\Pictures\1.jpg");
But it doesn't work.
The image won't show after 5 seconds.
Is it possible to show image after run the model running?
[![enter image description here][1]] [1]: .png
I've used event to add an image after 5 seconds.
image.add("C:\Users\me\Pictures\1.jpg");
But it doesn't work.
The image won't show after 5 seconds.
Is it possible to show image after run the model running?
[![enter image description here][1]] [1]: https://i.sstatic/fFvMop6t.png
Share Improve this question asked Feb 25 at 9:59 wickkiQWQwickkiQWQ 211 silver badge3 bronze badges2 Answers
Reset to default 0If you add an image, you must also change the index to show it. So after adding, also call myImage.setIndex(1);
(assuming you just added a 2nd image).
Also check https://anylogic.help/anylogic/presentation/image.html#dynamic-change
You can achieve this through object visibility.
Create a boolean variable with a default value of true
. Select the dynamic visibility type in the object's properties and specify the created variable there.
In an event, change the variable's value from true
to false
after 5 seconds. This way, the object (in your case, an image) will disappear after 5 seconds.
本文标签: anylogicHow to add jpg to image after run the modelStack Overflow
版权声明:本文标题:anylogic - How to add .jpg to image after run the model? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741213850a2359663.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论