Paul Toone avatar image
Paul Toone posted

VisualTool Example   

Using the VisualTool as a Container

Step 1: Place a VisualTool into the model view

To add a VisualTool to the model, simply drag it from the library onto the model view.

Step 2: Drag-and-drop 1 Queue and 2 Processors into the VisualTool

To add objects inside the container simply drag them from the library and place them on the VisualTool object.

When you place an object on the VisualTool it will automatically be place inside the VisualTool object. You can test this by selecting the VisualTool and moving it's location with your mouse. When you move the VisualTool the objects inside will move as well.

Step 3: Drag out 1 Source and 1 Sink into the model view

When placing the Source and the Sink in the model make sure you do not place them on the VisualTool, you want to make sure they are outside.

Step 4: Connect to Source to the VisualTool, and the VisualTool to the Sink

While pressing the "A" key on the keyboard, click-and-drag a connection from the Source to the VisualTool (not the Queue). When you release the left mouse button you will see a connection made between the Source and the VisualTool. Do the same thing to make a connection between the VisualTool and the Sink.

At this point the Source and the Sink are connected to the container (VisualTool). Now we will connect the container to the model inside.

Step 5: Connect the Container to the Queue

Drag a connection from the container to the queue.

When you release the left mouse button you will see a connection from the internal port (a smaller arrow) to the queue.

Step 6: Connect the Queue to the Processors

Following the same procedure connect the queue to the 2 processors.

Step 7: Connect the Processors to the container or directly to the Sink

There are 2 ways to connect "into" or "out" of a container. The first way was shown in step 4 when a connection was made from the Source to the container and then from the container to the queue. You can however connect directly from the Processor to the Sink by clicking and dragging a link. For this example the first Processor will be connected to the container which then connects to the Sink, and the second Processor will connect directly to the Sink.

Step 8: Set the Container Functionality

At this point you now have a functioning container that holds a sub-model. You can leave the container as it is so that the contents are visible and editable, or you can hide the contents so that the container becomes a completely encapsulated black box. To hide the contents of the container, uncheck the Show Contents box on the General tab of the VisualTool properties page.

Settings for black box functionality can be found on the Container Functionality tab of the VisualTool properties page. Set the "Pass Input Connect Actions To" to the object that should be connected to the input port of the VisualTool. Set the "Pass Output Connect Actions" to the object that should be connected to the output port of the VisualTool. The internal input and output ports will be connected when an external object is connected to the container's external input or output ports.

You can also use any of the options on the Display tab to present your view of the container as a box, 3D shape, or text. The contents of the container can be viewed at any time by right-clicking on the VisualTool in the ortho window and selecting View > View Contents.

flexsim users manual
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.



paul.t contributed to this article


FlexSim 2016.1