This FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at 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.

Go Back   FlexSim Community Forum > FlexSim Software > Q&A

Q&A Using Flexsim and building models

Old 06-25-2015
Rahel Carolina
Posts: n/a
Downloads: 30
Uploads: 0
Post 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.
Attached Thumbnails
Click image for larger version
Name:	Unbenannt.png
Views:	500
Size:	33.3 KB
ID:	2893  
Old 06-25-2015
RalfGruber's Avatar
RalfGruber RalfGruber is offline
FlexSim Software Products
Join Date: Jul 2007
Location: Orem, UT, USA
Posts: 195
Downloads: 37
Uploads: 0
Thanks: 518
Thanked 294 Times in 124 Posts
Rep Power: 345
RalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to beholdRalfGruber is a splendid one to behold


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

The Following User Says Thank You to RalfGruber For This Useful Post:
Jörg Vogel (06-25-2015)
Old 06-26-2015
Rahel Carolina
Posts: n/a
Downloads: 30
Uploads: 0

Hi Ralf,

Thank you so much for your reply. I will try to do it in Macros. Never done anything before with Macros but I guess it would be helpful.


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

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.