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 10-31-2008
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 179
Downloads: 19
Uploads: 4
Thanks: 66
Thanked 60 Times in 32 Posts
Rep Power: 201
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Default addlabel in FS 4.5

Hi added a model where I want to put a object reference to the item (Source exit) and use this label for the tasksequence in the 'Queue2'. So the tonum command is working, but the addlabel command seems to be changed since FS 4.32. Are Labels now restricted to carry only integer values?
Attached Files
File Type: zip addlabel.zip (38.9 KB, 240 views)
__________________
kind regards Nico.
The Following User Says Thank You to Nico Zahn For This Useful Post:
Phil BoBo (10-31-2008)
  #2  
Old 10-31-2008
Martijn van Oostenbrugge's Avatar
Martijn van Oostenbrugge Martijn van Oostenbrugge is offline
Talumis, Flexsim Distributor, The Netherlands
 
Join Date: Aug 2007
Posts: 71
Downloads: 12
Uploads: 0
Thanks: 44
Thanked 44 Times in 24 Posts
Rep Power: 268
Martijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to allMartijn van Oostenbrugge is a name known to all
Default

Nico,

Probably you just made it too quickly. You should:

addlabel( item, "Name" ); //So a label add
setlabelnum( item, "Name", tonum( item ) ); //Then set it

Good luck,
Martijn

/**Edit*/

Hmpf...I was too quickly, but Lars-Olof already helped you out....

Last edited by Martijn van Oostenbrugge; 10-31-2008 at 08:42 AM.
  #3  
Old 10-31-2008
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 179
Downloads: 19
Uploads: 4
Thanks: 66
Thanked 60 Times in 32 Posts
Rep Power: 201
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Angry user-friendly ??

Hi there,
so I tried the same code in FS 4.3. and it is working. It´s not that I can´t make it work in 4.5 but I have to change my old modells. If you provide a software you can´t change commands and their results without informing people who work with the software. This is only one command I found by chance when I tried to make two big modells work in FS 4.5.
So please dear Flexsim developers, please make shure that the commands in 4.5 work as they did in 4.32 if they were not buggy, otherwise you cause a lot of trouble for people like me updating old models.
Attached Files
File Type: zip addlabel_4_3.zip (40.0 KB, 225 views)
__________________
kind regards Nico.
  #4  
Old 10-31-2008
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 330
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

Hi Nico,

Remember that we are using a beta version and it can still be some bugs in the software.
Flexsim want us to start test the software to find the bugs that maybe exist.
I tried few things and I do not think addlabel is the problem.
What I tried was
addlabel(item,"Test",1.1); // Worked
addlabel(item,"Test,1); // Worked

double x;
x=10.0;
addlabel(item,"Test",x); // Worked.
The only thing that did not work was when I used node and tonum to assign a number to a variable, like you are doing in your code.

My guess is there is some problem in the new parser for Flexscript.

Lars-Olof
The Following User Says Thank You to Lars-Olof Leven For This Useful Post:
Phil BoBo (11-24-2008)
  #5  
Old 10-31-2008
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 440
Downloads: 86
Uploads: 4
Thanks: 171
Thanked 899 Times in 288 Posts
Rep Power: 735
Anthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond reputeAnthony Johnson has a reputation beyond repute
Default

Thanks Nico,
We'll fix this for the final version.
It turns out it was an issue with the new flexscript runtime. Given the new way that flexscript is built, we had to implement a new way of interpreting parameter types. But in the addlabel command, we only considered the two options of adding a label as a number (a straight number) or adding it as a string. We didn't consider the fact that someone might add a label as a number but have the number be a pointer to an object. Anyway, we'll fix this for the final release.
Please keep testing and finding these issues. They're very helpful.
The Following User Says Thank You to Anthony Johnson For This Useful Post:
Nico Zahn (10-31-2008)



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.