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 08-23-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Smile How to change num to string in flexscript?

Good morning, everyone.

I want to ask a question. How to change num to string in flexscript?
I have made a logic in flexscript. It can compiled but it cannot executed.

the logic is

string X = tostring(getitemtype(Car));

I have test to setlabelstr(current,"try",X) but there's nothing in "try" text label.

I know that "tostring" command just for developer, but it says that it can used to flexscript too.

If I use logic if and else, it can executed but take too many line on script. It was 500 line. If I use "tostring", it can be just 80 line.

Thank you very much for your attention.
  #2  
Old 08-23-2015
Jing Chen
Guest
 
Posts: n/a
Downloads: 2
Uploads: 0
Default

Hi Adhyaksa,
Try to use numtostring() and stringtonum().
And tostring() and tonum() is make the node change to string and num.

Hope it hleps.
The Following User Says Thank You to Jing Chen For This Useful Post:
Adhyaksa Bagaskara (08-23-2015)
  #3  
Old 08-23-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Smile Thankyou

Thank you, Jing Chen.

I am sorry for my lack of flexsim knowledge.
This logic is for my tram and monorail simulation in Indonesia.
And I can start to make that simulation to be perfect again.

Thank you.
Terima kasih.
  #4  
Old 08-24-2015
Rahel Carolina
Guest
 
Posts: n/a
Downloads: 30
Uploads: 0
Default

Hallo Adhyaksa Bagaskara,

Apa kabar?
I'm Indonesian too. Are you really working on the simulation for monorail in Indonesia?
that's cool. Looking forward for a better Jakarta
The Following User Says Thank You to Rahel Carolina For This Useful Post:
Adhyaksa Bagaskara (08-24-2015)
  #5  
Old 08-24-2015
Adhyaksa Bagaskara
Guest
 
Posts: n/a
Downloads: 7
Uploads: 0
Default Hello

Hello Rahel Carolina,

I am sorry but my project is for Yogyakarta.
Monorail project is not only in Jakarta but also in Medan, Bandung, Manado, and Surabaya.
We hope for better Indonesia (even though it was already late).
Hahahahaha.
  #6  
Old 08-24-2015
Rahel Carolina
Guest
 
Posts: n/a
Downloads: 30
Uploads: 0
Default

better late than never
good luck!!


Thread Thread Starter Forum Replies Last Post
RE: Change the rank of output ports of a object using flexscript gadirajus Q&A 3 04-21-2011 02:44 PM
How to change FlexScript node function luis quinones Tips and Tricks 1 09-14-2010 03:50 AM
How to change the current MTTR by running flexscript commands Yu Tian Q&A 1 06-24-2010 03:06 AM
eventget(1,4) - how to get the string? Tom David Q&A 1 11-20-2009 07:56 AM
IF with a String Gavin Douglas Q&A 1 07-14-2008 12:36 PM


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.