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
|
||||
|
||||
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 |