ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > Q&A
Downloads

Q&A Using Flexsim and building models

  #1  
Old 05-05-2011
syseo's Avatar
syseo syseo is offline
Flexsim User
 
Join Date: Aug 2007
Location: Korea
Posts: 290
Downloads: 439
Uploads: 0
Thanks: 249
Thanked 63 Times in 41 Posts
Rep Power: 211
syseo has a spectacular aura aboutsyseo has a spectacular aura about
Default The way to use item label in Combiner object...

I want to set the label of the combined item of combiner to be dependent on the flow item from port 2.
One palette comes from the port 1 and twenty flow items with same labelname from port 2 and then they are packed.

When the packed item palette exit, the label of the packed pallette should be set to be same with the twenty flow items label from port 2.
For example, if the label of twenty flow items from port 2 is 1, the label of the packed item should be 1. If twenty items are 2, the packed item should be 2.

How can I control it?

Please help me.
  #2  
Old 05-05-2011
mark.gormley mark.gormley is offline
Flexsim User
 
Join Date: Oct 2008
Posts: 58
Downloads: 12
Uploads: 0
Thanks: 32
Thanked 63 Times in 29 Posts
Rep Power: 181
mark.gormley has a spectacular aura aboutmark.gormley has a spectacular aura about
Default

Hi,

Are all 20 flow items from port 2 going to have the same label value?

If they are then this code on the OnExit trigger will do the job:

treenode pallet = item;
treenode firstItemInPallet =
first(item);
double palletLabel =
getlabelnum(firstItemInPallet,"labelName");
setlabelnum(pallet,"labelName", palletLabel);

You could also simplify that down to this:

setlabelnum(item,"labelName", getlabelnum(first(item),"labelName"));

which will do exactly the same thing.
The Following User Says Thank You to mark.gormley For This Useful Post:
syseo (05-05-2011)
  #3  
Old 05-05-2011
syseo's Avatar
syseo syseo is offline
Flexsim User
 
Join Date: Aug 2007
Location: Korea
Posts: 290
Downloads: 439
Uploads: 0
Thanks: 249
Thanked 63 Times in 41 Posts
Rep Power: 211
syseo has a spectacular aura aboutsyseo has a spectacular aura about
Default

Quote:
Originally Posted by mark.gormley View Post
Hi,

Are all 20 flow items from port 2 going to have the same label value?

If they are then this code on the OnExit trigger will do the job:

treenode pallet = item;
treenode firstItemInPallet =
first(item);
double palletLabel =
getlabelnum(firstItemInPallet,"labelName");
setlabelnum(pallet,"labelName", palletLabel);

You could also simplify that down to this:

setlabelnum(item,"labelName", getlabelnum(first(item),"labelName"));

which will do exactly the same thing.
Thanks Mark. That's it.

I will try to do it.


Thread Thread Starter Forum Replies Last Post
Flow item in object in time 0 KelvinHo Q&A 17 04-17-2012 09:12 AM
Add Label Nischith Kashyap Q&A 4 03-14-2011 07:16 PM
Label in Object - Suggestion for next version Gleny Rodriguez Gripes and Goodies 1 02-03-2011 01:06 PM
Record label manuel fernandez Q&A 1 03-21-2010 12:29 PM
Is it possible one object comprised of the function of "combiner" and "separetor"? Vic Li Q&A 1 08-19-2008 04:41 AM


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.