ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. 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. |
flexsim.com |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
|||
|
|||
set the location of flowitem from 2nd input port in a combiner
Hi all,
How to set the location of the flowitem, which is from the 2nd input port of a combiner in a pack action? Thanks Kelvin |
#2
|
|||
|
|||
Kelvin,
The first thing to check is that your container is (or is copied from) a pallet. This special flowitem has code called onReceive which places the items correctly. If then the default code doesn't do what you need you can replace it with your own. Because the fowitems are created during the model run, that code must be flexscript. Hope that helps. Jason |
#3
|
|||
|
|||
A more basic approach (although less direct) is to send a message in 0 time to the combiner in the OnEntry of the combiner if port==2. In the From field of the message use item such that in the OnMessage you have a reference to the flowitem called msgsendingobject to change its location. I have attached an example model v4.32.
The OnReceive of the pallet is executed between the OnEntry and the OnMessage in this example (when the combiner moves the flowitem into the pallet). We are setting the location of the flowitem after the OnReceive has already set it once. |
The Following 5 Users Say Thank You to Kris Geisberger For This Useful Post: | ||
Michael Hartlieb (01-29-2009) |
#4
|
||||
|
||||
You don't have to use a pallet object if you don't want to. Any object can be a container, the pallet object just does some extra stuff too. If you are only packing one object into another or you don't care to have the container object organize the incoming flowitems it is fine to not use a pallet.
By default, the contents of the container is scaled down to show it is a child of the container, this can be turned off in the flowitem bin. To turn off scaling, go to the 'general' tab in the properties window of the flowitem you are using and turn off "Scale Contents". Then you can do as Kris said and send the message in the OnEntry and set the location of the flowitem that came through port 2. When I do this I run the model until the flowitem is loaded into the container and then I pause it and move the flowitem into the desired location manually, then check the properties window to find out it's current location. This eliminates trial and error placement |
#5
|
||||
|
||||
Here's a couple of previous posts related to the topic of modifying flowitems that you might find useful:
http://www.flexsim.com/community/for...12&postcount=6 http://www.flexsim.com/community/for...read.php?t=216 Cliff |
The Following User Says Thank You to Cliff King For This Useful Post: | ||
arunkrmahadeva (01-29-2014) |
Thread | Thread Starter | Forum | Replies | Last Post |
Input data Regarding | shivrash | Q&A | 4 | 04-01-2008 07:02 PM |
Excel Tutorial - Need Input! | Brandon Peterson | Q&A | 4 | 03-12-2008 10:54 AM |
Can I set inport 1 of a combiner is "pull" while inport 2 is push? | KelvinHo | Q&A | 3 | 03-05-2008 01:55 AM |
Pay attention to flowitem references | Iulian Marin Ion | Q&A | 5 | 12-09-2007 04:06 PM |
Customizing Flowitem Attributes - a quest for the flowitem with the fewest attributes | Cliff King | Tips and Tricks | 0 | 11-22-2007 12:22 PM |