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-2008
Shankar Narayan's Avatar
Shankar Narayan Shankar Narayan is offline
Flexsim User
 
Join Date: Oct 2007
Posts: 33
Downloads: 25
Uploads: 0
Thanks: 24
Thanked 12 Times in 5 Posts
Rep Power: 161
Shankar Narayan is on a distinguished road
Default retrieving name of conveyor

I have a stupid question. For the life of me, I am not able to retrieve the name of the conveyor on which I am transporting a tote. No matter what I try I always get the node number. I have tried the following piece of code on the OnEntry trigger of the conveyor:

treenodecurrent = ownerobject(c);

pt("Value="); pf(getnodename(current)); pr();


The conveyor on which my flowitem (tote) is travelling currently has only input and output ports and no center ports connected.

Can someone help this Flexsim user who ate too much turkey and now am paying the price?


  #2  
Old 11-30-2008
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

Hello Shankar,

Look at it from the bright side, you will never do this wrong again

Last time I checked the getname function always returns a string so instead of "pf" I should use "pt". What do you think?

Steven
The Following User Says Thank You to Steven Hamoen For This Useful Post:
Shankar Narayan (11-30-2008)
  #3  
Old 11-30-2008
Shankar Narayan's Avatar
Shankar Narayan Shankar Narayan is offline
Flexsim User
 
Join Date: Oct 2007
Posts: 33
Downloads: 25
Uploads: 0
Thanks: 24
Thanked 12 Times in 5 Posts
Rep Power: 161
Shankar Narayan is on a distinguished road
Default

Of course ! Like I said, too much turkey got me into a state of total dumb coding in Flexscript.

Thanks again for waking me up !



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.