contentsList (material flow objects)

Syntax

<Path>.contentsList([ContentsList:table]) → any

The method contentsList returns the entire contents, i.e., all MUs located in the contents list the object designated by <Path> in an array.

  • If you specify the optional parameter of data type table, the method writes the objects contained in the contents list into this list.

    Plant Simulation automatically generates the format of the table, overwriting the previous format and the previous contents.

  • If you do not specify the parameter, the method returns an array containing the objects contained in the contents list.

Parameter

The optional parameter ContentsList of data type table designates the name of the table (a DataTable or a local variable). Plant Simulation automatically generates the format of this table, and deletes any existing format and contents of the table.

  • SourceConveyor.contentsList(MyDataTable)

    The point-oriented objects with a capacity of 1 part show the path in the list, i.e., the name and the number of the current part. The data type of the columns is object.

  • Buffer.contentsList(MyDataTable)

    The point-oriented objects with a capacity of more than 1 part show the path in the list, i.e., the names and the numbers of the parts, that are located on it. The capacity determines how many parts it shows. The data type of the columns is object.

  • ParallelProc1.contentsList(MyDataTable)

    The ParallelStation shows the path, i.e., the name and the number of the current parts in the list. The position of the part in the table matches the position of the part in its x-y coordinate system. The data type of the columns is object.

  • Store.contentsList(MyDataTable)

    The objects Store, Container, and Transporter, which can stack parts, show the stacked parts in sub-tables. The identifier of the sub-table contains the number of stacked parts after the underscore. To show the individual stacked parts in the sub-table, double-click the respective cell in the contents list.

  • Buffer.contentsList(MyDataTable)

    The Buffer shows the path, i.e., the name and the number of the current parts in the list. The position of the part in the table matches the position of the part in its x-y coordinate system. The data type of the columns is object.

  • Sorter.contentsList(MyDataTable)

    The Sorter shows the path in the list, i.e., the name and the numbers of the parts that are located on it. The capacity or the number of parts that are located on the Sorter determine how many parts it shows. The column has the data type object.

    Note:

    Plant Simulation shows the parts on the Sorter in reverse order, meaning that the part that exits last is located on the first occupied place. The part that is going to exit next is located on the last place.

  • MyConveyor.contentsList(MyDataTable)

    The length-oriented objects Conveyor, Track, and Transporter show the path in the contents table, i.e., the names and the numbers of the current parts. In addition it shows the position of the MUs on the object.

    The column Object shows the path to the part, the column From shows the start position of the MU, and the column To shows the end position in the length unit you selected under File > Model Settings/Preferences > Units > Length. The number of rows matches the number of MUparts located on the object. The data type of column 1 is object, of the second and third column it is length.

  • Cycle_NW.A.contentsList(MyDataTable)

    The length-oriented object TwoLaneTrack shows the path, i.e., the name and the number of the current part, in the contents table for lane A and lane B separately. In addition it shows the position of the MUs on the object.

  • MyPortioner.contentsList(MyDataTable)

    The fluid objects DePortioner and Portioner show the path of the MU in the list, i.e., the name and the number of the part, which is emptied or filled. The column has the data type object.

  • The fluid objects FluidSource, FluidDrain, Pipe, and Tank show the material that flows through them. The column has the data type string.

  • The fluid object Mixer shows the material in column 1 and the contained amount in column 2, while the starting materials flow into it. Column 1 has the data type string, column 2 has the data type real. As soon as the Mixer starts the mixing process, the contents list only shows the product in column 1.

Return Value

The return value has the data type any.

If you do not specify the optional parameter, Plant Simulation returns an array containing all MUs which are located on the object.

Example

machine.contentsList(myContentsList)
sumValue := contentsMachine.sumAttr("Value")
print "Total value in machine:"
print sumValue
print Track.contentsList 
-- might, for example, return 
-- [.MUs.Transporter:49, 21.31726, 22.81726][.MUs.Transporter:50, 19.81726, 21.31726][.MUs.Transporter:51, 18.31726, 19.81726][.MUs.Transporter:52, 16.81726, 18.31726] in the Console
print Store.contentsList 
-- might, for example, return 
-- [[*.MUs.Part:2, *.MUs.Part:5, *.MUs.Part:15], [*.MUs.Part:17, *.MUs.Part:19, *.MUs.Part:21], [*.MUs.Part:22, *.MUs.Part:23, *.MUs.Part:24]][[*.MUs.Part:25, *.MUs.Part:27, *.MUs.Part:30], [*.MUs.Part:33, *.MUs.Part:36, *.MUs.Part:39], [*.MUs.Part:42, *.MUs.Part:45, *.MUs.Part:48]][[*.MUs.Part:51, *.MUs.Part:54, *.MUs.Part:57], [*.MUs.Part:60, *.MUs.Part:63, *.MUs.Part:66], [*.MUs.Part:69, *.MUs.Part:72, *.MUs.Part:75]]
 in the Console

Related Topics

Contents

contentsList of the TwoLaneTrack

Check the Contents List of the Stations