GetContainer

Returns a Container object with its properties populated with corresponding data from the material database, based on the Container Name.
Syntax
Set
object
=
MaterialSvr
.
GetContainer
(ByVal
ContainerName
As String,
UseCollection
As Boolean)
The
GetContainer
method syntax has these parts:
Part
Description
object
Reference to a valid Container object.
MaterialSvr
Instance of the MaterialServer Interface to which the method is directed.
ContainerName
Name of the Container.
UseCollection
True:
The method attempts to locate the specified Container in a Container collection. If no collection is present, one is created and the record is read from the collection. If one is present, reading from a collection is much quicker than making a round trip to the database. If however there is no collection and one has to be constructed, this option may prove to be less optimal than reading from the database.
False:
The method reads the record directly from the database.
Remarks
Although this method loads the Container data of the Container object, this object contains a collection of ContainerProperties and ContainerMaterials. These collection objects are not populated until you explicitly call those properties on the Container object. The purpose for this is that pre-loading these collection objects is a performance hit that need not be taken unless those particular elements are required.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal