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 |
#1
|
||||
|
||||
Object as a subnode to another object..
Hello
I have created a transporter in my tree structure and set its name and location via code which is working and the code i have used is as below. treenode nnobj = node("/Transporter1", model()); treenode tnode; tnode = createcopy(nnobj, model()); setname(tnode,gettablestr("Table1",x,1)); setloc(tnode,gettablenum("Table1",x,3),gettablenum ("Table1",x,4),0); What i am trying to do is to generate a train as the rail API is not suiting my code. I am trying to create sub nodes for transporter 1 so that i am able to create transporter 2 which would be inserted in transporter 1 (not after) and move in the same way how transporter 1 moves, but with a small delay so as to get the snake kind of movement. I tried the node insertinto, and the insert copy, but i am not getting a transporter (object) as a subnode to another transporter (object). I have attached the code i tried to use, but it doesnt work. treenode nnobj = node("/Transporter2", model()); treenode tnode; //tnode = createcopy(nnobj, model()); //tnode = createcopy(nnobj, nodeinsertinto(next(node("/Transporter1",model())))); tnode = insertcopy(nnobj, node("/Transporter1", model())); setname(tnode,gettablestr("Table1",x,1)); setloc(tnode,gettablenum("Table1",x,3),gettablenum ("Table1",x,4),0); Basically, transporter 1 is the engine for my train, and transporter 2 is the number of carriages which would be subnodes to transporter 1, so that when i delete transporter 1, the carriages also get deleted. Please help..... |
Thread | Thread Starter | Forum | Replies | Last Post |
Solidworks object | Simon Farsah | Q&A | 13 | 06-11-2012 08:36 PM |
Can't see object in CT2.0 | David Chan | Container Terminal (CT) Library | 1 | 04-21-2010 11:38 PM |
send a flowitem from a mobile object to another mobile object | KelvinHo | Q&A | 5 | 03-03-2010 08:24 AM |
Get object class | juan alberto | Q&A | 1 | 09-24-2009 06:25 AM |
Transfer a mobile object by another mobile object | KelvinHo | Q&A | 7 | 07-17-2008 09:32 AM |