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 04-12-2016
Lucas Klein
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default text to node type

Dear all,

I have a text in a "static" component in my GUI, i get it text as below:

treenode obj = node("@/panel/no1",c);
string q17 = getviewtext(obj);

if I print this string, that is the content

node("Queue17", model())

Let's consider that this "Queue17" already exists in my model. I would like to attribuite this string into a treenode, to refer the Queue17 path as the code below:

treenode que17 = node("Queue17", model()) ;

but using the string as reference to the text:

treenode que17 = q17;

How could I convert the string type to node?
Thanks in advance,
Lucas Klein.
  #2  
Old 04-12-2016
Lucas Klein
Guest
 
Posts: n/a
Downloads: 0
Uploads: 0
Default text to node type [SOLVED]

To use the string as an active code of FlexScript I used the command

treenode que17 = executestring(q17);

and then, the code will be interpreted this way

treenode que17 = node("Queue17", model()) ;

Thanks for the attention.
The Following User Says Thank You to Lucas Klein For This Useful Post:
Pablo Concha (04-13-2016)

Tags
convert, node, parse, string, type


Thread Thread Starter Forum Replies Last Post
Visual Text David Chan FlexSim HC: Q&A 1 03-22-2016 10:13 AM
Dynamic text and timer AndreeaAdda Q&A 6 08-07-2014 08:14 AM
How to set dynamicaly closing node edge in a network node Preethi Sivaramakrishnan Tips and Tricks 8 06-27-2013 01:35 PM
Scaling text in opengl Steven Hamoen Q&A 10 12-09-2008 04:18 PM
Triangle and Text Demo Brandon Peterson Tips and Tricks 0 05-09-2008 10:12 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.