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 |
#1
|
|||
|
|||
About set the item name problem.
hi everyone
in my model. i use global table to record the number of item. and set the item name is the number of item. for example, when the second item be created, add 1 to global table. and set the second item name is 2. when i run the model, the item name is empty. can anyone help me? thank a lot!! (my flexsim version is 4.5) |
#2
|
||||
|
||||
on the onentry you use:
setname(item,gettablenum("H",1,1)); But if you check the command list you will see: setname(obj object, str value) So the second parameter should be a string, so change your code to either: setname(item,gettablestr("H",1,1)); //If the data in the table is a string or setname(item, numtostring( gettablenum("H",1,1),0 ,0 ) ); //If the data in the table is a number |
The Following User Says Thank You to Steven Hamoen For This Useful Post: | ||
Yu Xuan Huang (11-30-2011) |
#4
|
|||
|
|||
Also not recommended to set an object name to a number. Adding a "_" in front might be a good way around this.
setname(item, concat("_",numtostring( gettablenum("H",1,1), 0, 0)) ); |
Thread | Thread Starter | Forum | Replies | Last Post |
each item has it's given location,and item's code correspond to storage location | Robert Liu | Q&A | 3 | 03-28-2011 08:46 PM |
problem with recycle and restore item | juan alberto | Q&A | 1 | 03-09-2011 06:49 AM |