IMsModelSpace.DefaultObject

Syntax

DefaultObject: IMetabaseObjectDescriptor;

Description

The DefaultObject property determines times series database where modeling container data will be stored.

Example

Executing the example requires that the repository contains a time series database with the TSDB identifier.

Add links to the Metabase, Ms system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    MObj: IMetabaseObject;
    Ms: IMsModelSpace;
Begin
    
// Get repository
    MB := MetabaseClass.Active;
    
// Set basic properties of modeling container
    CrInfo := MB.CreateCreateInfo;
    CrInfo.ClassID := MetabaseObjectClass.KE_CLASS_MODELSPACE;
    CrInfo.Id := mb.GenerateId(
"MS");
    CrInfo.Name := 
"Modeling container at attributes";
    MObj := MB.CreateObject(CrInfo).Edit;
    Ms := MObj 
As IMsModelSpace;
    
// Specify time series database for data storing
    Ms.Rubricator := MB.ItemById("TSDB");
    
// Set start and end dates of modeling container
    Ms.StartDate := DateTime.Parse("1.1.2000");
    Ms.EndDate := DateTime.Parse(
"1.1.2020");
    MObj.Save;
End Sub UserProc;

After executing the example, time series database will be determined where modeling container data will be stored.

See also:

IMsModelSpace