This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices.

Go Back   FlexSim Community Forum > FlexSim Software > Tips and Tricks

Tips and Tricks Share helpful modeling ideas

Old 10-01-2015
Axel Kohonen
Posts: n/a
Downloads: 22
Uploads: 0
Default Using a visual tool as a container and controlling the input into the visual tool


In case anyone has tried to use a visual tool to control e.g. the maximum amount of flowitems in a certain processing area in the model you might be familiar with this already. I tried closing the input of the visual tool (looks like a processor) that my processors are in to control the amount of flowitems in the visual tool. However, the flowitems get into the visual tool anyhow if you do not close the input to all the processors inside the visual tool that are connected to the input of the visual tool. The workaround given to me by support is presented below. See also the attached model where two processors are inside a visual tool that looks like a processor.


Unfortunately, this is a bug with the visual tool object since the input ports for these objects are structured a little differently than the other Fixed Resources. I am going to let the developers know so it can be looked at and hopefully fixed in a future release of the software. Until then, I would say the easiest thing to do is close the input ports of all objects connected to the visual tool through their input ports. This can easily be done using a for loop and a User Command.

I am attaching your model to this email with those changes made as an example. If you want to use the same code, it should work to copy it to a different model. I created two User Commands called closevisualtoolinput() and openvisualtoolinput() and made it so the OnEntry and OnExit triggers of your Processors call these User Commands. The commands themselves are pretty straightforward and I have included comments to help explain what the code is doing. The logic can all be done on one line of code, but I have included a multi-line comment that breaks each part of that line up into different variables to help organize the code a bit better. In other words, the multi-line comment could be uncommented and the one line of code for the insideObject variable removed to achieve the same functionality.
Attached Files
File Type: fsm UsingAVisualToolAsContainer_modelFromSupport.fsm (19.2 KB, 511 views)

container, input, visualtool

Thread Thread Starter Forum Replies Last Post
using layout with visual tool naveenkumar Tips and Tricks 1 02-10-2012 01:29 PM
Visual Tool Text Wrapping Todd Benanzer Q&A 2 12-17-2010 10:30 AM
Put GlobalTable into Visual Tool claudia gertheinrich Q&A 3 03-25-2010 04:04 AM
Sum in a Visual Tool jspeece Q&A 3 09-04-2009 11:31 AM
Visual tool as a container qs Paul Dowling Q&A 2 08-20-2007 07:53 PM

All times are GMT -6.
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.