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
|
|||
|
|||
Code to reference the Label Table
Hallo Forum,
I'm working on assembly station now where the processor represents the assembly machine. When the processor is empty, it will search for contents from 3 different sources, including: 1. The hand over table (contained the finished good) 2. Flow Rack 1 (contained Material No.1) 3. Flow Rack 2 (contained Material No.2) So each time the processor receive the finished good from hand over table, the processor will read the table to know which material and how much the quantity that needed for that finished good. Right now I only have two different material numbers and on number for finished good. But later on, I would have more numbers and in each assembly station(processor) might have different required materials. That's why instead of creating a global table, I created Label Table in processor (pic attached). Now I would like to know if we can refer the label table with the code like this... treenode BOM = reftable(getlabelnum(current,"BOM")); because I guess that code is used for global table, or do you guys have any better idea how to do it? Thanks before. Regards, Rahel |
#2
|
||||
|
||||
Rahel,
you can use a structur like this to access a label table using the regular table commands: treenode LabelTable = label(last(model()), "LabelTable"); return gettablenum(LabelTable, 2, 2); with "last(model())" being the object holding the label table and "LableTable" being the name of the label. One more hint: Instead of directly referencing table columns, I would create Macros in the Tool box to access columns. In that case, if you decide to add table columns later on, you only have to change the Macros for the columns instead of every single command, where you access the table. Best wishes Ralf FlexSim |
The Following User Says Thank You to RalfGruber For This Useful Post: | ||
Jörg Vogel (06-25-2015) |
Thread | Thread Starter | Forum | Replies | Last Post |
reference to the item in other object(Q) | Erwin Khoo | Flexsim Student Forum | 3 | 05-30-2015 04:22 AM |
DLL reference path | Ramesh Pinn | Q&A | 3 | 04-19-2013 12:33 PM |
By value or by reference | Shahin Gelareh | Q&A | 0 | 03-09-2012 03:22 AM |
how to get a reference to currently active task | LINWEIXU | Q&A | 1 | 09-28-2011 11:42 PM |
Get view reference | AlanZhang | Q&A | 3 | 03-13-2008 08:51 AM |