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 04-28-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 382
Downloads: 29
Uploads: 6
Thanks: 192
Thanked 516 Times in 235 Posts
Rep Power: 490
Brandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant futureBrandon Peterson has a brilliant future
Default Setting the side offset for all nodes in the model

I recentely got a PM asking how to set the side offset for all of the Network Nodes in a model. I figure that others may have the same question so here is the answer.

The following code can be copied into the script window and executed. It will change the sideoffset value for all of the Network Nodes in the model to a +5 value.

Code:
treenode nnobj = node("/NetworkNode", library());
double offset = 5;
int index;
forobjecttreeunder(model())
{
if(objectexists(classobject(a)) && classobject(a) == nnobj)
setvarnum(a, "sideoffset", offset);
}

Good Luck,
Brandon
__________________
thats not normal.

Last edited by Brandon Peterson; 04-28-2008 at 11:21 AM. Reason: Fix code
The Following 4 Users Say Thank You to Brandon Peterson For This Useful Post:
Nischith Kashyap (01-24-2011)


Thread Thread Starter Forum Replies Last Post
Accessing Data of a Recorder and Referencing Nodes in the Tree Jan Brandau Q&A 5 04-22-2008 07:05 AM
Find all nodes toggled as C++ Brandon Peterson Tips and Tricks 0 04-18-2008 03:36 PM
Offset Travel AlanZhang Q&A 16 04-18-2008 10:25 AM
about "no select" and "show parameter window from side bar" qin tian Gripes and Goodies 3 03-21-2008 08:10 AM
Setting the number of operators Sung Kim Q&A 4 02-05-2008 12:31 PM


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.