Jump to content
Simio Forum

Welcome to the Simio Forum

Welcome to the Simio Forum! Experience the full experience of the forum by becoming a Simio Insider! You must be an Insider to post on any forum!

Click_Here_button.png

mmashaie

toggle externally visible resource?

Recommended Posts

Hi,

Can I control the “externally visible” option through a process or something similar? I have a model similar to the Facility Model Within Model simbit where I have an object with a bunch of processes. In my main model, I have a Boolean for a resource in the object. If the Boolean variable is set to true, a resource gets used and changes colour based on the action. But if this Boolean is set to false, then I don’t want that resource to be visible in my main model. I’m running version 7.114.11717. I can upgrade if needed.


I saw the 2012 post entitled "Ability to toggle externally visible during run-time," but I couldn't get mine to work.


Thanks.

Maryam M.

Share this post


Link to post
Share on other sites

Hello,

One way you can control the visibility of a resource (among other things) that exists within a submodel (e.g., model ProcessABC) via a boolean property that exists in the main model (e.g., MainModel) is the following:

  • create a boolean property in ProcessABC (Res1_expr)
  • In the OnRunInitialized process of ProcessABC, have a decide step reference Res1_expr, then the true and false conditions can control the resource visibility parameters (Resource1.Size...) via Assign steps
  •  In the MainModel, create a boolean property (Res1_expr), and reference this for the Res1_expr property of ProcessABC 

This is assuming you just want to set the visibility of the resource once, and at the start of the run...

Hope this helps.

Share this post


Link to post
Share on other sites
On 7/4/2019 at 6:15 AM, OttawaK said:

Hello,

One way you can control the visibility of a resource (among other things) that exists within a submodel (e.g., model ProcessABC) via a boolean property that exists in the main model (e.g., MainModel) is the following:

  • create a boolean property in ProcessABC (Res1_expr)
  • In the OnRunInitialized process of ProcessABC, have a decide step reference Res1_expr, then the true and false conditions can control the resource visibility parameters (Resource1.Size...) via Assign steps
  •  In the MainModel, create a boolean property (Res1_expr), and reference this for the Res1_expr property of ProcessABC 

This is assuming you just want to set the visibility of the resource once, and at the start of the run...

Hope this helps.

Thanks. Yes, it can be done by set a 0 size. But if we can toggle the external visual by just one click, there should be a variable linked to it. If we can get access to the variable, it would be much easier to just assign a value in a process every time we want to make change.

Share this post


Link to post
Share on other sites
2 hours ago, jzhou said:

 

Thanks, that's a good trick! I like what the competitor does, you can access to pretty much everything from the tree -  if you can see it, then you can get the variable to it; if you can do it by a mouse or keyboard click, then you can do it in the script.

Share this post


Link to post
Share on other sites

×
×
  • Create New...