Page 807 - ExtendSim User Guide
P. 807

Data Management and Exchange 781
Blocks for data management and exchange
through item. When the next item/part arrives, the query block starts looping through the Pro- duction Specs table associated with that part.
In this example, the query block is looking for the record whose From value matches the curr- Step attribute found on the item. Once that is found, the block then finds the associated To and Process Time values for that record and stores them as attributes on the item.
The equation in the query block is:
   if(currStep == fromField)
        {
        rank = True;
        currStep = toField;
        activityDelay = delayField;
        }
else {
        rank = False;
        }
Given the complexity of what the query block is doing, the code is very simple.
Data access blocks
The following blocks are useful for creating global arrays and text files and for accessing data from internal or external sources.
Data Source Create
The Data Source Create block (Value library) provides an easy method to create or modify global arrays or text files. You can also use this block to resize or delete a global array. For an example of how this block is used, see “How to create and use a global array” on page 766.
Data Import Export
The Data Import Export block (Value library) is used for importing data from an external data source to an ExtendSim database or global array or for exporting data from an ExtendSim database or global array to an external data source. The sup- ported external data sources are:
• MicrosoftExcel
• ADO compliant databases (Windows only) • ODBCdatabases(Windowsonly)
• FTPsite(Windowsonly)
• Text files
Data Init
The Data Init block (Value library) uses a data source to initialize a target with val- ues. A popup menu in the block’s dialog allows you to choose as a target a data- base’s table, field, record, or cell or a global array’s column, row, or cell. The data source can be a value, a database’s table, field, record, or cell, or a global array’s
How To


































































































   805   806   807   808   809