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 > Tips and Tricks
Downloads

Tips and Tricks Share helpful modeling ideas

  #1  
Old 05-23-2008
Alex Christensen Alex Christensen is offline
Flexsim Technical Support
 
Join Date: Nov 2007
Location: Provo, UT
Posts: 96
Downloads: 41
Uploads: 8
Thanks: 29
Thanked 141 Times in 56 Posts
Rep Power: 298
Alex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to beholdAlex Christensen is a splendid one to behold
Default 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);
It makes and builds this Flexscript OnPreDraw trigger:
Code:
treenode focus=node("/Operator4",model());
setcameradirection(c,xloc(focus),yloc(focus),zloc(focus),-30,0,-43);
Attached Files
File Type: zip follow.zip (44.4 KB, 410 views)

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


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.