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 |
|
Downloads |
Gripes and Goodies Software problems and suggestions |
#1
|
|||
|
|||
Script windows empty if MTBR tablename contains only digits
Hello everybody,
I noticed that if a MTBR / MTBF table name only contains digits (or at least starts with a digit) and I want to view the one of the funtion codes, the script editor window appears empty. When I rename the table so it stars with a letter, everything is fine. Is there a fix or explanation for this? Thank you in advance! Jens |
#2
|
||||
|
||||
With a few exceptions, object and node names in Flexsim should follow C++ naming rules:
"A valid identifier is a sequence of one or more letters, digits or underscore characters (_). Neither spaces nor punctuation marks or symbols can be part of an identifier. Only letters, digits and single underscore characters are valid. In addition, variable identifiers always have to begin with a letter. In no case can they begin with a digit." (http://www.cplusplus.com/doc/tutorial/variables/) Flexsim object and node names are frequently used in paths, which can take names or ranks as valid inputs: node("/Tools/MTBFMTTR/6",model()) will point to the 6th node in the MTBFMTTR node of the Tools folder. If you name the first MTBFMTTR object as "6542", then a path to that object will be looking for the object at rank 6542, which probably isn't the correct object. Also, you may make variables out of object names, and variables cannot start with a number. Question: Answer: |
The Following User Says Thank You to Phil BoBo For This Useful Post: | ||
Jens Mühlheimer (03-27-2012) |
#3
|
|||
|
|||
That explains a few things
Phil, thank you very much! // Just in case somebody has the same question: I solved this by naming the MTBR / MTTR tables x123456 and then using this command to get the actual name: Code:
string myname = stringcopy(getname(current),2,stringlen(getname(current))); Last edited by Phil BoBo; 03-28-2012 at 10:08 AM. Reason: added code tags to fix formatting |
Thread | Thread Starter | Forum | Replies | Last Post |
Exel Import - Digits after decimal point | FlorianK | Q&A | 7 | 09-25-2012 10:06 AM |
Empty level in rack | Manoj Kumar | Q&A | 3 | 02-01-2012 05:27 AM |
Empty & Idle Warehouse at the end of the day | Labro Eleni | Q&A | 3 | 08-08-2011 04:08 AM |
IDLE and EMPTY | Lydia Franck | Q&A | 2 | 08-05-2010 03:03 AM |