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 11-30-2011
Yu Xuan Huang Yu Xuan Huang is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Yu Xuan Huang is on a distinguished road
Default 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)
Attached Files
File Type: fsm 123.fsm (230.5 KB, 102 views)
  #2  
Old 11-30-2011
Steven Hamoen's Avatar
Steven Hamoen Steven Hamoen is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Location: Soest, NL
Posts: 854
Downloads: 43
Uploads: 0
Thanks: 391
Thanked 661 Times in 379 Posts
Rep Power: 684
Steven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond reputeSteven Hamoen has a reputation beyond repute
Default

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)
  #3  
Old 11-30-2011
Yu Xuan Huang Yu Xuan Huang is offline
Flexsim User
 
Join Date: Aug 2011
Posts: 5
Downloads: 6
Uploads: 0
Thanks: 3
Thanked 0 Times in 0 Posts
Rep Power: 0
Yu Xuan Huang is on a distinguished road
Default

thank you very much!!!!
  #4  
Old 12-06-2011
Kris Geisberger Kris Geisberger is offline
Flexsim Canada, Forum Moderator
 
Join Date: Aug 2007
Location: Canada
Posts: 209
Downloads: 54
Uploads: 1
Thanks: 99
Thanked 389 Times in 133 Posts
Rep Power: 451
Kris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud ofKris Geisberger has much to be proud of
Default

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


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.