Click "Apply" in Storage System by Code

Click "Apply" in Storage System by Code

sebastian_canas9DYX7
Collaborator Collaborator
19 Views
2 Replies
Message 1 of 3

Click "Apply" in Storage System by Code

sebastian_canas9DYX7
Collaborator
Collaborator

[ FlexSim 24.1.0 ]

Hi all,

I'm drawing some elements on a Rack based on the value of a Parameter. I need to change this value during the run of a simulation, instead of pressing reset every time.

I've realized I could get this by clicking the Apply button in the Storage System. How could I get to do that by code?

Thanks!

Apply_SS.fsm

0 Likes
Accepted solutions (1)
20 Views
2 Replies
Replies (2)
Message 2 of 3

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

I can't see a way of doing the same action without using a function_s call, which - as you probably know - isn't recommended due to it being outside of the supported API. You could use your own draw code but for a large system that probably won't draw as fast.

The function_s call that seems to work for your case is:

function_s(Model.find("Tools/StorageSystem>variables/visualizations/Rack/elements/Image1"),"setAllObjectsDirty");
0 Likes
Message 3 of 3

sebastian_canas9DYX7
Collaborator
Collaborator
Thanks @Jason. I'm aware of the drawbacks of using function_s. I'll implement this as a temporary workaround.


With more time, I'll give drawing commands like drawquad() or others a shot to test the performance of the model..

0 Likes