FlexSim Community Forum

FlexSim Community Forum (https://archive.flexsim.com/index.php)
-   Q&A (https://archive.flexsim.com/forumdisplay.php?f=66)
-   -   text to node type (https://archive.flexsim.com/showthread.php?t=3322)

Lucas Klein 04-12-2016 12:02 PM

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.

Lucas Klein 04-12-2016 12:55 PM

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.


All times are GMT -6. The time now is 02:13 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.