ATTENTIONThis 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 |
|
Downloads |
Q&A Using Flexsim and building models |
#1
|
||||
|
||||
How to load a *.t file into a node with commands/code?
I saved a *.t file of a node via the right click menu in the tree Node / Save Node as…
Now I like to load this *.t file into a node of another model. Via the right click menu in the tree I would just use Node / Load into Node… But how can I do this with a command. I found the commands loadselectedfromfile() and saveselectedtofile(). But how can I pointer in loadselectedfromfile() to the *.t file on my hard drive? I searched for the right click menu in the tree (main and view), but did not find it. Where can I find this menu? If I would find the menu I had the commands and would know how to do it. Thanks in advance for any help and hints.
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
#3
|
||||
|
||||
BTW: 'embedfile' in the previous post is not a link. embedfile is a standard flexsim function and you can find it in the manual of flexsim.
This is what the manual says: embedfile(num mode, str projectpath, str filepath) Description: This command is used to embed a file in a node. mode can take the following values, 1=embed, 2=extract, 3=remove. Example:Undocumented |
The Following User Says Thank You to Lolke Koopmans For This Useful Post: | ||
Tom David (01-12-2009) |
#4
|
|||
|
|||
Try the cmdloadtree and cmdsavetree commands.
|
The Following User Says Thank You to Alex Christensen For This Useful Post: | ||
Tom David (01-12-2009) |
#5
|
||||
|
||||
It looks like that cmdloadtree() is doing the job, so I did not try embedfile(), because it is not documented and the other solution works.
I am still curious to know where I can find the right-click menu and commands, because then I could look up and understand other functionality. Does anyone have an idea where to find this?
__________________
tom the (A)tom: "We have solved our problems ... now we have to fight the solutions." |
#6
|
||||
|
||||
The tree's right-click menu is in the Flexsim engine. It is not visible or editable from the Flexsim content.
|
The Following 4 Users Say Thank You to Phil BoBo For This Useful Post: | ||
Tom David (01-12-2009) |
Thread | Thread Starter | Forum | Replies | Last Post |
Table Commands Library | Brandon Peterson | User Development | 5 | 09-25-2008 09:25 AM |
Double load handling ASRS | Paul Dowling | Q&A | 8 | 05-06-2008 10:19 PM |
Need explanation of Flexsim drawing commands | AlanZhang | Q&A | 2 | 04-17-2008 10:24 AM |
What about the file read commands? | AlanZhang | Gripes and Goodies | 0 | 02-08-2008 05:17 PM |