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-18-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 Find all nodes toggled as C++

I recently had a model that had some rogue nodes toggled as C++ for some reason and didn't want to search 100's of objects to find the offender. If you have the same problem the following code will snoop them out and print the offending object and variable names along with the variable rank to the output console.

Hope you avoid this problem but if not this will help,
Brandon

Code:
treenode vars;
int index;
forobjecttreeunder(model())
{
vars = variables(a);
if(objectexists(vars))
{
for(index = 1; index <= content(vars); index++)
if(switch_cppfunc(rank(vars, index), -1))
{
pr(); pt(getname(a)); pt(" "); pt(getname(rank(vars, index))); pt(" "); pd(index);
}
}
}
__________________
thats not normal.
The Following User Says Thank You to Brandon Peterson For This Useful Post:
William Clausen (08-13-2008)


Thread Thread Starter Forum Replies Last Post
The nodes in active view tree don't have unique names. Tom David Gripes and Goodies 7 01-31-2013 07:01 AM
Error: Cannot find the input table or query 'Objects'. AlanZhang Q&A 8 05-04-2008 07:06 PM
How to find the idle time of the job/product? shivrash Q&A 5 04-09-2008 09:01 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.