Table of Contents

Table of Contents

FlexScript Class - Storage.System

Storage.System

Description

A class that represents a storage system.

For more information on how to use the storage system, see the Storage System topic.

Properties

storageObjects Accesses all storage objects in the model as an array of Storage.Objects.

Methods

findItem Finds an item matching one of the given queries.
findSlot Finds a slot that matches one of the given queries.
getSlot Gets a slot by its address.
queryItems Searches for all items that match the query.
querySlots Searches for all slots that match a query.

Details

Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.storageObjects

readonly storageObjects

Description

Accesses all storage objects in the model as an array of Storage.Objects.

Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.findItem()

Storage.Slot.Item findItem( Variant queries , int flags )
Storage.Slot.Item findItem( Variant queries , int flags , Variant $1 )
Storage.Slot.Item findItem( Variant queries , int flags , Variant $1 , Variant $2 )
Storage.Slot.Item findItem( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 )
Storage.Slot.Item findItem( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 )
Storage.Slot.Item findItem( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 , Variant $5 )

Parameters

queries One or more queries to use to find an item. One query can be passed in as a string. Multiple must be passed in an array.
flags Reserved for future use. Must be 0.
$1-$5 Values passed in, which can be referenced in the queries.

Returns

Storage.Slot.Item A reference to the first matching slot item. If the search was unsuccesful, this value will be empty.

Description

Finds an item matching one of the given queries.

This method evaluates each query until a slot item is found that matches. Only stored items are searched.

For example, to search for items that have a Type label value of 5, you could use the following code:
Storage.Slot.Item slotItem = Storage.system.findItem("WHERE Type = $1", 0, 5);
Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.findSlot()

Storage.Slot findSlot( Variant queries , int flags )
Storage.Slot findSlot( Variant queries , int flags , Variant $1 )
Storage.Slot findSlot( Variant queries , int flags , Variant $1 , Variant $2 )
Storage.Slot findSlot( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 )
Storage.Slot findSlot( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 )
Storage.Slot findSlot( Variant queries , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 , Variant $5 )

Parameters

queries One or more queries to use to find a slot. One query can be passed in as a string. Multiple must be passed in an array.
flags Reserved for future use. Must be 0.
$1-$5 Values passed in, which can be referenced in the queries.

Returns

Storage.Slot A reference to the first matching slot. If the search was unsuccesful, this value will be empty.

Description

Finds a slot that matches one of the given queries.

This method evaluates each query until a slot is found that matches. Only storeable slots are searched.
Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.getSlot()

Storage.Slot getSlot( string address )

Parameters

address An address that can be interpreted by one of the address schemes.

Returns

Storage.Slot

Description

Gets a slot by its address.

This method compares the address to each Address Scheme. If it matches, this method then tries to resolve the slot using the scheme.
Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.queryItems()

Variant queryItems( string query , int flags )
Variant queryItems( string query , int flags , Variant $1 )
Variant queryItems( string query , int flags , Variant $1 , Variant $2 )
Variant queryItems( string query , int flags , Variant $1 , Variant $2 , Variant $3 )
Variant queryItems( string query , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 )
Variant queryItems( string query , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 , Variant $5 )

Parameters

query The query to run.
flags Reserved for future use. Must be 0.
$1-$5 Extra parameters that can be referenced in the query.

Returns

Variant An array of Storage.Slot.Item values.

Description

Searches for all items that match the query.

The method only considers items that are in the Stored state.
Do no remove, this fixes the anchor on doc.flexsim.com

Storage.System.querySlots()

Variant querySlots( string query , int flags )
Variant querySlots( string query , int flags , Variant $1 )
Variant querySlots( string query , int flags , Variant $1 , Variant $2 )
Variant querySlots( string query , int flags , Variant $1 , Variant $2 , Variant $3 )
Variant querySlots( string query , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 )
Variant querySlots( string query , int flags , Variant $1 , Variant $2 , Variant $3 , Variant $4 , Variant $5 )

Parameters

query The query to run
flags Reserved for future use. Must be 0.
$1-$5 Extra paramemters that can be referenced in the query.

Returns

Variant An array of Storage.Slot values.

Description

Searches for all slots that match a query.

This method only considers storable slots.