Cubes > Cubes Assembly Interfaces > ICubeMetaUpdateEx > ICubeMetaUpdateEx.GetStream
GetStream(Tag: String): Object;
Tag. Stream name.
The GetStream method gets user data stream from the copied time series database.
Executing the example requires an MDM repository with the RDS_REPO identifier, the file C:\Param.zip that contains a copy of the time series database, and the UserStream custom stream.
Sub UserProc;
Var
RubUpdateEx: ICubeMetaUpdateEx;
Mb: IMetabase;
Rds: IRdsDatabase;
CrInfo: IMetabaseObjectCreateInfo;
Stream: IMemoryStream;
s: string;
Begin
RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
Mb := MetabaseClass.Active;
RubUpdateEx.Metabase := Mb;
Rds := Mb.ItemById("RDS_REPO").Bind As IRdsDatabase;
RubUpdateEx.RdsDatabase := Rds;
RubUpdateEx.Load("C:\Param.zip");
Stream := RubUpdateEx.GetStream("UserStream") As IMemoryStream;
Debug.WriteLine(Stream.ReadByte);
CrInfo := RubUpdateEx.CreateInfo;
CrInfo.Parent := Mb.Root;
s := Mb.GenerateId("FC_COPY");
CrInfo.Id := s;
CrInfo.Name := s;
RubUpdateEx.Apply(Null);
End Sub UserProc;
After executing the example a copy of the time series database with the FC_COPY identifier is created in the repository root from the C:\Param.zip file. The console window displays the first byte of the UserStream custom stream saved to the file.
See also: