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
|
|||
|
|||
making views follow operators
This model uses an OnModelOpen trigger to manually create and build an OnPreDraw trigger for the main ortho view. The OnPreDraw trigger makes the ortho view follow the operator. This technique could be useful for presenting the activity of a particular operator, or any other TaskExecuter.
Here's the OnModelOpen trigger: Code:
//make an empty node at the end of the attribute list treenode ortho=node("VIEW:/active/ortho"); nodeinsertafter(rankobj(ortho,contentobj(ortho))); //set a pointer to the NEW last attribute //(the one we just made) treenode onpredraw=rankobj(ortho,contentobj(ortho)); setnodename(onpredraw,"OnPreDraw"); nodeadddata(onpredraw,DATATYPE_STRING); setnodestr(onpredraw,"treenode focus=node(\"/Operator4\",model());\nsetcameradirection(c,xloc(focus),yloc(focus),zloc(focus),-30,0,-43);"); //remember to use \" to put a quote character inside a string // \n is the new line character switch_flexscript(onpredraw,1); buildnodeflexscript(onpredraw); Code:
treenode focus=node("/Operator4",model()); setcameradirection(c,xloc(focus),yloc(focus),zloc(focus),-30,0,-43); Last edited by Alex Christensen; 05-23-2008 at 04:33 PM. Reason: forgot attachment |
The Following 4 Users Say Thank You to Alex Christensen For This Useful Post: | ||
Sung Kim (07-28-2015) |
Thread | Thread Starter | Forum | Replies | Last Post |
How to model operators' efficiency? | Liu Bin | Q&A | 4 | 05-21-2008 07:56 AM |
Operators moving backwards | Nico Zahn | Tips and Tricks | 0 | 05-19-2008 04:51 AM |
Setting the number of operators | Sung Kim | Q&A | 4 | 02-05-2008 12:31 PM |
Operators on Multiple Networks | Nico Zahn | Q&A | 0 | 10-10-2007 03:02 AM |