C:\Dokumente und Einstellungen\andre\Desktop\GetSetUniverse\dev\3.6\3.6.04\diff\3_6_01.txt C:\Dokumente und Einstellungen\andre\Desktop\GetSetUniverse\dev\3.6\3.6.04\diff\3_6_04.txt
Option Explicit Option Explicit
   
Private Const vbVersion As String = "GetSetUniverse 3.6.01"  Private Const vbVersion As String = "GetSetUniverse 3.6.04" 
   
' ---> xxx start declaration ' ---> xxx start declaration
Private vbLang As Integer Private vbLang As Integer
   
' error handling ' error handling
Private vbErrHand As Integer Private vbErrHand As Integer
Private Const vbErrExit As Integer = 0 Private Const vbErrExit As Integer = 0
Private Const vbErrresume As Integer = 1 Private Const vbErrresume As Integer = 1
Private Const vbErrHeader As String = "Error in " Private Const vbErrHeader As String = "Error in "
   
' mode ' mode
Private Const vbModus As Integer = 1 Private Const vbModus As Integer = 1
Private Const vbModusLive As Integer = 1 Private Const vbModusLive As Integer = 1
Private Const vbModusDemo As Integer = 0 Private Const vbModusDemo As Integer = 0
   
' definition of color code for outlined objects ' definition of color code for outlined objects
Private Const vbColorDsDimensionObject As Integer = 41 Private Const vbColorDsDimensionObject As Integer = 41
Private Const vbColorDsDetailObject As Integer = 50 Private Const vbColorDsDetailObject As Integer = 50
Private Const vbColorDsMeasureObject As Integer = 22 Private Const vbColorDsMeasureObject As Integer = 22
Private Const vbColorDsConditionObject As Integer = 44 Private Const vbColorDsConditionObject As Integer = 44
Private Const vbColorDsStandard As Integer = 56 Private Const vbColorDsStandard As Integer = 56
Private Const vbColorDsError As Integer = 13 Private Const vbColorDsError As Integer = 13
   
' definition sheet Universe Properties ' definition sheet Universe Properties
Private Const rowPropsName As Integer = 2 Private Const rowPropsName As Integer = 2
Private Const rowPropsLName As Integer = 3 Private Const rowPropsLName As Integer = 3
Private Const rowPropsPath As Integer = 4 Private Const rowPropsPath As Integer = 4
Private Const rowPropdCreate As Integer = 5 Private Const rowPropdCreate As Integer = 5
Private Const rowPropsAuthor As Integer = 6 Private Const rowPropsAuthor As Integer = 6
Private Const rowPropdChanged As Integer = 7 Private Const rowPropdChanged As Integer = 7
Private Const rowPropdImported As Integer = 8 Private Const rowPropdImported As Integer = 8
Private Const rowPropsVersion As Integer = 9 Private Const rowPropsVersion As Integer = 9
Private Const rowPropsConnection As Integer = 10 Private Const rowPropsConnection As Integer = 10
Private Const rowPropsDescription As Integer = 11 Private Const rowPropsDescription As Integer = 11
Private Const rowPropsComment As Integer = 12 Private Const rowPropsComment As Integer = 12
Private Const rowPropiCntClasses As Integer = 13 Private Const rowPropiCntClasses As Integer = 13
Private Const rowPropiCntObjects As Integer = 14 Private Const rowPropiCntObjects As Integer = 14
Private Const rowPropiCntConditions As Integer = 15 Private Const rowPropiCntConditions As Integer = 15
Private Const rowPropiCntTables As Integer = 16 Private Const rowPropiCntTables As Integer = 16
Private Const rowPropiCntAliases As Integer = 17 Private Const rowPropiCntAliases As Integer = 17
Private Const rowPropiCntJoins As Integer = 18 Private Const rowPropiCntJoins As Integer = 18
Private Const rowPropiCntContexts As Integer = 19 Private Const rowPropiCntContexts As Integer = 19
Private Const rowPropiCntHierachies As Integer = 20 Private Const rowPropiCntHierachies As Integer = 20
Private Const rowPropdblLimitResultSetVal As Integer = 21 Private Const rowPropdblLimitResultSetVal As Integer = 21
Private Const rowPropdblLimitExecTimeVal As Integer = 22 Private Const rowPropdblLimitExecTimeVal As Integer = 22
Private Const rowPropdblCostEstExceedVal As Integer = 23 Private Const rowPropdblCostEstExceedVal As Integer = 23
Private Const rowPropdblLimitLTextObjectVal As Integer = 24 Private Const rowPropdblLimitLTextObjectVal As Integer = 24
Private Const rowPropbSQLSubQueries As Integer = 25 Private Const rowPropbSQLSubQueries As Integer = 25
Private Const rowPropbSQLOperators As Integer = 26 Private Const rowPropbSQLOperators As Integer = 26
Private Const rowPropbSQLComplexOperators As Integer = 27 Private Const rowPropbSQLComplexOperators As Integer = 27
Private Const rowPropbSQLMultipleSQLForContext As Integer = 28 Private Const rowPropbSQLMultipleSQLForContext As Integer = 28
Private Const rowPropbSQLMultipleSQLForMeasure As Integer = 29 Private Const rowPropbSQLMultipleSQLForMeasure As Integer = 29
Private Const rowPropbSQLSelectMultipleContexts As Integer = 30 Private Const rowPropbSQLSelectMultipleContexts As Integer = 30
Private Const rowPropbSQLPreventCartesianProducts As Integer = 31 Private Const rowPropbSQLPreventCartesianProducts As Integer = 31
         
' definition sheet Universe Contexts ' definition sheet Universe Contexts
Private Const colCtxtName As Integer = 1 Private Const colCtxtName As Integer = 1
Private Const colCtxtTab1 As Integer = 2 Private Const colCtxtTab1 As Integer = 2
Private Const colCtxtCol1 As Integer = 3 Private Const colCtxtCol1 As Integer = 3
Private Const colCtxtTab2 As Integer = 4 Private Const colCtxtTab2 As Integer = 4
Private Const colCtxtCol2 As Integer = 5 Private Const colCtxtCol2 As Integer = 5
Private Const colCtxtExpr As Integer = 6 Private Const colCtxtExpr As Integer = 6
   
' definition sheet Universe Dependencies ' definition sheet Universe Dependencies
Private Const colDepnClassId As Integer = 1 Private Const colDepnClassId As Integer = 1
Private Const colDepnObjectId As Integer = 2 Private Const colDepnObjectId As Integer = 2
Private Const colDepnClassName As Integer = 3 Private Const colDepnClassName As Integer = 3
Private Const colDepnObjectName As Integer = 4 Private Const colDepnObjectName As Integer = 4
Private Const colDepnTableAlias As Integer = 5 Private Const colDepnTableAlias As Integer = 5
Private Const colDepnTable As Integer = 6 Private Const colDepnTable As Integer = 6
Private Const colDepnColumn As Integer = 7 Private Const colDepnColumn As Integer = 7
Private Const colDepnIsDerived As Integer = 8 Private Const colDepnIsDerived As Integer = 8
  Private Const colDepnBOClassId As Integer = 9  
  Private Const colDepnBOObjectId As Integer = 10  
   
' definition sheet Universe Parameters ' definition sheet Universe Parameters
Private Const colParamName As Integer = 1 Private Const colParamName As Integer = 1
Private Const colParamValue As Integer = 2 Private Const colParamValue As Integer = 2
   
' definition sheet Universe Incombatibilities ' definition sheet Universe Incombatibilities
Private Const colInCombTableName As Integer = 1 Private Const colInCombTableName As Integer = 1
Private Const colInCombClassName As Integer = 2 Private Const colInCombClassName As Integer = 2
Private Const colInCombObjectName As Integer = 3 Private Const colInCombObjectName As Integer = 3
Private Const colInCombTableId As Integer = 4 Private Const colInCombTableId As Integer = 4
Private Const colInCombClassId As Integer = 5 Private Const colInCombClassId As Integer = 5
Private Const colInCombObjectId As Integer = 6 Private Const colInCombObjectId As Integer = 6
   
' definition sheet Universe Objects ' definition sheet Universe Objects
Private Const colObjClassId As Integer = 1 Private Const colObjClassId As Integer = 1
Private Const colObjObjectId As Integer = 2 Private Const colObjObjectId As Integer = 2
Private Const colObjClassName As Integer = 3 Private Const colObjClassName As Integer = 3
Private Const colObjObjectName As Integer = 4 Private Const colObjObjectName As Integer = 4
Private Const colObjObjectType As Integer = 5 Private Const colObjObjectType As Integer = 5
Private Const colObjDataType As Integer = 6 Private Const colObjDataType As Integer = 6
Private Const colObjDescription As Integer = 7 Private Const colObjDescription As Integer = 7
Private Const colObjSqlSelect As Integer = 8 Private Const colObjSqlSelect As Integer = 8
Private Const colObjSQLWhere As Integer = 9 Private Const colObjSQLWhere As Integer = 9
Private Const colObjHidden As Integer = 10 Private Const colObjHidden As Integer = 10
Private Const colObjAggregateFunction As Integer = 11 Private Const colObjAggregateFunction As Integer = 11
Private Const colObjHasListOfValues As Integer = 12 Private Const colObjHasListOfValues As Integer = 12
Private Const colObjListOfValuesName As Integer = 13 Private Const colObjListOfValuesName As Integer = 13
Private Const colObjAllowUserToEditLov As Integer = 14 Private Const colObjAllowUserToEditLov As Integer = 14
Private Const colObjAutomaticLovRefreshBeforeUse As Integer = 15 Private Const colObjAutomaticLovRefreshBeforeUse As Integer = 15
Private Const colObjUseHierarchicalDisplay As Integer = 16 Private Const colObjUseHierarchicalDisplay As Integer = 16
Private Const colObjExportLovWithUniverse As Integer = 17 Private Const colObjExportLovWithUniverse As Integer = 17
Private Const colObjSecurityAccessLevel As Integer = 18 Private Const colObjSecurityAccessLevel As Integer = 18
Private Const colObjCanBeUsedResult As Integer = 19 Private Const colObjCanBeUsedResult As Integer = 19
Private Const colObjCanBeUsedCondition As Integer = 20 Private Const colObjCanBeUsedCondition As Integer = 20
Private Const colObjCanBeUsedSort As Integer = 21 Private Const colObjCanBeUsedSort As Integer = 21
   
  Private Const colObjBOClassId As Integer = 22  
  Private Const colObjBOObjectId As Integer = 23  
   
         
' definition sheet Universe Joins ' definition sheet Universe Joins
Private Const colJoinId As Integer = 1 Private Const colJoinId As Integer = 1
Private Const colJoinExpr As Integer = 2 Private Const colBOJoinId As Integer = 2
  Private Const colJoinExpr As Integer = 3  
   
' definition sheet Universe Hierarchies ' definition sheet Universe Hierarchies
Private Const colHierName As Integer = 1 Private Const colBOHierID As Integer = 1
Private Const colHierObjectName As Integer = 2 Private Const colHierName As Integer = 2
Private Const colHierClassName As Integer = 3 Private Const colHierObjectName As Integer = 3
Private Const colHierIsVisible As Integer = 4 Private Const colHierClassName As Integer = 4
  Private Const colHierIsVisible As Integer = 5  
   
Private Type tControl Private Type tControl
   bExecInfo As Boolean    bExecInfo As Boolean
   bExecParameter As Boolean    bExecParameter As Boolean
   bExecObject As Boolean    bExecObject As Boolean
   bExecTable As Boolean    bExecTable As Boolean
   bExecJoin As Boolean    bExecJoin As Boolean
   bExecContext As Boolean    bExecContext As Boolean
   bExecHier As Boolean    bExecHier As Boolean
   bExecDependency As Boolean    bExecDependency As Boolean
   bExecIncomb As Boolean    bExecIncomb As Boolean
End Type End Type
   
Private Type tUniverseProperties Private Type tUniverseProperties
   sLogonSystem As String    sLogonSystem As String
   sLogonName As String    sLogonName As String
   sName As String    sName As String
   sLongName As String    sLongName As String
   sPath As String    sPath As String
   sAuthor As String    sAuthor As String
   sCreate As String    sCreate As String
   sChanged As String    sChanged As String
   dImported As Date    dImported As Date
   sVersion As String    sVersion As String
   sConnection As String    sConnection As String
   sDescription As String    sDescription As String
   sComment As String    sComment As String
   iCountClasses As Integer    iCountClasses As Integer
   iCountObjects As Integer    iCountObjects As Integer
   iCountConditions As Integer    iCountConditions As Integer
   iCountTables As Integer    iCountTables As Integer
   iCountAliases As Integer    iCountAliases As Integer
   iCountJoins As Integer    iCountJoins As Integer
   iCountContexts As Integer    iCountContexts As Integer
   iCountHierachies As Integer    iCountHierachies As Integer
   iCurrentObjectStrategy As Integer    iCurrentObjectStrategy As Integer
   iCurrentJoinStrategy As Integer    iCurrentJoinStrategy As Integer
   iCurrentTableStrategy As Integer    iCurrentTableStrategy As Integer
   bSQLComplexOperators As Boolean    bSQLComplexOperators As Boolean
   bSQLMultipleSQLForContext As Boolean    bSQLMultipleSQLForContext As Boolean
   bSQLMultipleSQLForMeasure As Boolean    bSQLMultipleSQLForMeasure As Boolean
   bSQLOperators As Boolean    bSQLOperators As Boolean
   bSQLPreventCartesianProducts As Boolean    bSQLPreventCartesianProducts As Boolean
   bSQLSelectMultipleContexts As Boolean    bSQLSelectMultipleContexts As Boolean
   bSQLSubQueries As Boolean    bSQLSubQueries As Boolean
   bLimitExecutionTime As Boolean    bLimitExecutionTime As Boolean
   dblLimitExecutionTimeValue As Double    dblLimitExecutionTimeValue As Double
   bLimitSizeOfLongTextObject As Boolean    bLimitSizeOfLongTextObject As Boolean
   dblLimitSizeOfLongTextObjectValue As Double    dblLimitSizeOfLongTextObjectValue As Double
   bLimitSizeofResultSet As Boolean    bLimitSizeofResultSet As Boolean
   dblLimitSizeofResultSetValue As Double    dblLimitSizeofResultSetValue As Double
   bWarnIfCostEstimateExceeded As Boolean    bWarnIfCostEstimateExceeded As Boolean
   dblCostEstimateExceededValue As Double    dblCostEstimateExceededValue As Double
End Type End Type
   
Private Type tUniverseParameters Private Type tUniverseParameters
   sName As String    sName As String
   sValue As String    sValue As String
End Type End Type
   
Private Type tClasses Private Type tClasses
   sName As String    sName As String
   iId As Integer    iId As Integer
     iBOClassId As Integer  
   iParentId As Integer    iParentId As Integer
   iCountClasses As Integer    iCountClasses As Integer
   iLevel As Integer    iLevel As Integer
   sDescription As String    sDescription As String
   bIsVisible As Boolean    bIsVisible As Boolean
End Type End Type
   
Private Type tObjectProperties Private Type tObjectProperties
   iId As Integer    iId As Integer
   sName As String    sName As String
   iObjectID As Integer    iObjectID As Integer
   sClassName As String    sClassName As String
   iClassId As Integer    iClassId As Integer
     iBOObjectID As Integer  
     iBOClassId As Integer  
   sDescription As String    sDescription As String
   sSelect As String    sSelect As String
   sWhere As String    sWhere As String
   iDataBaseFormat As Integer    iDataBaseFormat As Integer
   iQualification As Integer    iQualification As Integer
   iAggregateFunction As Integer    iAggregateFunction As Integer
   bIsVisible As Boolean    bIsVisible As Boolean
   bCanBeUsedCondition As Boolean    bCanBeUsedCondition As Boolean
   bCanBeUsedResult As Boolean    bCanBeUsedResult As Boolean
   bCanBeUsedSort As Boolean    bCanBeUsedSort As Boolean
   bAllowUserToEditLov As Boolean    bAllowUserToEditLov As Boolean
   bAutomaticLovRefreshBeforeUse As Boolean    bAutomaticLovRefreshBeforeUse As Boolean
   bExportLovWithUniverse As Boolean    bExportLovWithUniverse As Boolean
   bHasListOfValues As Boolean    bHasListOfValues As Boolean
   sListOfValuesName As String    sListOfValuesName As String
   iCountObjects As Integer    iCountObjects As Integer
   iSecurityAccessLevel As Integer    iSecurityAccessLevel As Integer
   iType As Integer    iType As Integer
   bUseHierarchicalDisplay As Boolean    bUseHierarchicalDisplay As Boolean
End Type End Type
   
Private Type tObjectKeys Private Type tObjectKeys
   iId As Integer    iId As Integer
   iClassId As Integer    iClassId As Integer
   iObjectID As Integer    iObjectID As Integer
   sClassName As String    sClassName As String
   sObjectName As String    sObjectName As String
   bEnable As Boolean    bEnable As Boolean
   iType As Integer    iType As Integer
   sSelect As String    sSelect As String
   sWhere As String    sWhere As String
End Type End Type
   
Private Type tAllTables Private Type tAllTables
   iId As Integer    iId As Integer
   sName As String    sName As String
   bIsAlias As Boolean    bIsAlias As Boolean
   iIdOriginalTable As Integer    iIdOriginalTable As Integer
   sOriginalTable As String    sOriginalTable As String
   iCountColumns As Integer    iCountColumns As Integer
   iCountIncompatibleObjects As Integer    iCountIncompatibleObjects As Integer
   iCountIncompatiblePredefConditions As Integer    iCountIncompatiblePredefConditions As Integer
   bIsDerived As Boolean    bIsDerived As Boolean
   sSqlOfDerivedTable As String    sSqlOfDerivedTable As String
   sSqlOfDerivedTableWithAlias As String    sSqlOfDerivedTableWithAlias As String
   dblWeight As Double    dblWeight As Double
End Type End Type
   
Private Type tOriginalTables Private Type tOriginalTables
   iId As Integer    iId As Integer
   sName As String    sName As String
End Type End Type
   
Private Type tTableColumns Private Type tTableColumns
   iId As Integer    iId As Integer
   iTableId As Integer    iTableId As Integer
   sTableName As String    sTableName As String
   sName As String    sName As String
   iType As Integer    iType As Integer
   iKey As Integer    iKey As Integer
End Type End Type
   
Private Type tHierarchyProperties Private Type tHierarchyProperties
   iId As Integer    iId As Integer
     iBOHierId As Integer  
   sName As String    sName As String
   iObjectID As Integer    iObjectID As Integer
   iClassId As Integer    iClassId As Integer
   sObjectName As String    sObjectName As String
   sClassName As String    sClassName As String
   bIsVisible As Boolean    bIsVisible As Boolean
End Type End Type
   
Private Type tDependencies Private Type tDependencies
   iId As Integer    iId As Integer
   iClassId As Integer    iClassId As Integer
   iObjectID As Integer    iObjectID As Integer
   iTableId As Integer    iTableId As Integer
     iBOClassId As Integer  
     iBOObjectID As Integer  
     iBOTableId As Integer  
   iColumnId As Integer    iColumnId As Integer
   sClassName As String    sClassName As String
   sObjectName As String    sObjectName As String
   sTableName As String    sTableName As String
   sTableOriginalName As String    sTableOriginalName As String
   sColumnName As String    sColumnName As String
   iSource As Integer    iSource As Integer
   bIsDerived As Boolean    bIsDerived As Boolean
End Type End Type
   
Private Type tContextProperties Private Type tContextProperties
   iId As Integer    iId As Integer
   sName As String    sName As String
   sDescription As String    sDescription As String
   sFirstTable As String    sFirstTable As String
   iFirstTableId As Integer    iFirstTableId As Integer
   sSecondTable As String    sSecondTable As String
   iSecondTable As Integer    iSecondTable As Integer
   sFirstColumn As String    sFirstColumn As String
   iFirstColumn As Integer    iFirstColumn As Integer
   sSecondColumn As String    sSecondColumn As String
   iSecondColumn As Integer    iSecondColumn As Integer
   sExpression As String    sExpression As String
End Type End Type
   
Private Type tJoins Private Type tJoins
   iJoinId As Integer    iJoinId As Integer
     iBOJoinId As Integer  
   iOuterJoin As Integer    iOuterJoin As Integer
   bShortCut As Boolean    bShortCut As Boolean
   iCardinality As Integer    iCardinality As Integer
   sExpression As String    sExpression As String
End Type End Type
   
Private Type tIncombatibilities Private Type tIncombatibilities
   iIncId As Integer    iIncId As Integer
   iTableId As Integer    iTableId As Integer
   iClassId As Integer    iClassId As Integer
   iObjectID As Integer    iObjectID As Integer
   sTableName As String    sTableName As String
   sClassName As String    sClassName As String
   sObjectName As String    sObjectName As String
End Type End Type
   
' Dimensionen ' Dimensionen
' Language settings ' Language settings
Private Type dLanguage Private Type dLanguage
   iLang As Integer    iLang As Integer
   sLang As String    sLang As String
End Type End Type
' tUniverseProperties.CurrentObjectStrategy ' tUniverseProperties.CurrentObjectStrategy
Private Type dCurrentObjectStrategy Private Type dCurrentObjectStrategy
   iCurrentObjectStrategy As Integer    iCurrentObjectStrategy As Integer
   sCurrentObjectStrategy As String    sCurrentObjectStrategy As String
   iLang As Integer    iLang As Integer
End Type End Type
' tUniverseProperties.CurrentJoinStrategy ' tUniverseProperties.CurrentJoinStrategy
Private Type dCurrentJoinStrategy Private Type dCurrentJoinStrategy
   iCurrentJoinStrategy As Integer    iCurrentJoinStrategy As Integer
   sCurrentJoinStrategy As String    sCurrentJoinStrategy As String
   iLang As Integer    iLang As Integer
End Type End Type
' tUniverseProperties.CurrentTableStrategy ' tUniverseProperties.CurrentTableStrategy
Private Type dCurrentTableStrategy Private Type dCurrentTableStrategy
   iCurrentTableStrategy As Integer    iCurrentTableStrategy As Integer
   sCurrentTableStrategy As String    sCurrentTableStrategy As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectProperties.DataBaseFormat ' tObjectProperties.DataBaseFormat
Private Type dDataBaseFormat Private Type dDataBaseFormat
   iDataBaseFormat As Integer    iDataBaseFormat As Integer
   sDataBaseFormat As String    sDataBaseFormat As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectProperties.Qualification ' tObjectProperties.Qualification
Private Type dQualification Private Type dQualification
   iQualification As Integer    iQualification As Integer
   sQualification As String    sQualification As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectProperties.AggregateFunction ' tObjectProperties.AggregateFunction
Private Type dAggregateFunction Private Type dAggregateFunction
   iAggregateFunction As Integer    iAggregateFunction As Integer
   sAggregateFunction As String    sAggregateFunction As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectProperties.SecurityAccessLevel ' tObjectProperties.SecurityAccessLevel
Private Type dSecurityAccessLevel Private Type dSecurityAccessLevel
   iSecurityAccessLevel As Integer    iSecurityAccessLevel As Integer
   sSecurityAccessLevel As String    sSecurityAccessLevel As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectProperties.Type ' tObjectProperties.Type
Private Type dObjectPropertiesType Private Type dObjectPropertiesType
   iType As Integer    iType As Integer
   sType As String    sType As String
   iLang As Integer    iLang As Integer
End Type End Type
' tObjectKeys.Type ' tObjectKeys.Type
Private Type dObjectKeysType Private Type dObjectKeysType
   iType As Integer    iType As Integer
   sType As String    sType As String
   iLang As Integer    iLang As Integer
End Type End Type
' tDependencies.Source ' tDependencies.Source
Private Type dSource Private Type dSource
   iSource As Integer    iSource As Integer
   sSource As String    sSource As String
   iLang As Integer    iLang As Integer
End Type End Type
'tTableColumn.Type 'tTableColumn.Type
Private Type dTableColumnType Private Type dTableColumnType
   iTyp As Integer    iTyp As Integer
   sName As String    sName As String
   iLang As Integer    iLang As Integer
End Type End Type
' tTableColumn.Key ' tTableColumn.Key
Private Type dTableColumnKey Private Type dTableColumnKey
   iKey As Integer    iKey As Integer
   sName As String    sName As String
   iLang As Integer    iLang As Integer
End Type End Type
   
' detect changes of descriptions ob bo objects defined in excel ' detect changes of descriptions ob bo objects defined in excel
Private Type tChanges Private Type tChanges
   iChange As Integer    iChange As Integer
   iRow As Integer    iRow As Integer
   iClassId As Integer    iClassId As Integer
   iObjectID As Integer    iObjectID As Integer
   sClassName As String    sClassName As String
   sObjectNameOld As String    sObjectNameOld As String
   sObjectNameNew As String    sObjectNameNew As String
   sObjectType As String    sObjectType As String
   iObjectType As Integer    iObjectType As Integer
   iChangeDefinition As Integer ' binary code where the change is detected    iChangeDefinition As Integer ' binary code where the change is detected
   sSelectOld As String    sSelectOld As String
   sSelectNew As String    sSelectNew As String
   sWhereOld As String    sWhereOld As String
   sWhereNew As String    sWhereNew As String
   sDescOld As String    sDescOld As String
   sDescNew As String    sDescNew As String
End Type End Type
   
Private oUnvProp As tUniverseProperties Private oUnvProp As tUniverseProperties
Private oUnvParams() As tUniverseParameters Private oUnvParams() As tUniverseParameters
Private oClasses() As tClasses Private oClasses() As tClasses
Private oObjects() As tObjectProperties Private oObjects() As tObjectProperties
Private oObjectKeys() As tObjectKeys Private oObjectKeys() As tObjectKeys
Private oTables() As tAllTables Private oTables() As tAllTables
Private oOriginalTables() As tOriginalTables Private oOriginalTables() As tOriginalTables
Private oTableColumns() As tTableColumns Private oTableColumns() As tTableColumns
Private oHierarchies() As tHierarchyProperties Private oHierarchies() As tHierarchyProperties
Private oObjectTableDependencies() As tDependencies Private oObjectTableDependencies() As tDependencies
Private oContexts() As tContextProperties Private oContexts() As tContextProperties
Private oJoins() As tJoins Private oJoins() As tJoins
Private oIncombatibilities() As tIncombatibilities Private oIncombatibilities() As tIncombatibilities
   
Private oLanguage() As dLanguage Private oLanguage() As dLanguage
Private oCurrentObjectStrategy() As dCurrentObjectStrategy Private oCurrentObjectStrategy() As dCurrentObjectStrategy
Private oCurrentJoinStrategy() As dCurrentJoinStrategy Private oCurrentJoinStrategy() As dCurrentJoinStrategy
Private oCurrentTableStrategy() As dCurrentTableStrategy Private oCurrentTableStrategy() As dCurrentTableStrategy
Private oDataBaseFormat() As dDataBaseFormat Private oDataBaseFormat() As dDataBaseFormat
Private oQualification() As dQualification Private oQualification() As dQualification
Private oAggregateFunction() As dAggregateFunction Private oAggregateFunction() As dAggregateFunction
Private oSecurityAccessLevel() As dSecurityAccessLevel Private oSecurityAccessLevel() As dSecurityAccessLevel
Private oObjectPropertiesType() As dObjectPropertiesType Private oObjectPropertiesType() As dObjectPropertiesType
Private oObjectKeysType() As dObjectKeysType Private oObjectKeysType() As dObjectKeysType
Private oSource() As dSource Private oSource() As dSource
Private oTableColumnType() As dTableColumnType Private oTableColumnType() As dTableColumnType
Private oTableColumnKey() As dTableColumnKey Private oTableColumnKey() As dTableColumnKey
Private oControl As tControl Private oControl As tControl
Private oChanges() As tChanges Private oChanges() As tChanges
   
' ---> xxx end declaration ' ---> xxx end declaration
' ---> xxx start sub routines ' ---> xxx start sub routines
Private Sub InitFrm() Private Sub InitFrm()
Dim sProcName As String Dim sProcName As String
   
Dim iSh As Integer Dim iSh As Integer
Dim oSh As Worksheet Dim oSh As Worksheet
   
Const rowInfo As Integer = 2 Const rowInfo As Integer = 2
Const rowParams As Integer = 3 Const rowParams As Integer = 3
Const rowObjects As Integer = 4 Const rowObjects As Integer = 4
Const rowDependencies As Integer = 5 Const rowDependencies As Integer = 5
Const rowHierarchies As Integer = 6 Const rowHierarchies As Integer = 6
Const rowContexts As Integer = 7 Const rowContexts As Integer = 7
Const rowJoins As Integer = 8 Const rowJoins As Integer = 8
Const rowIncombs As Integer = 9 Const rowIncombs As Integer = 9
Const rowLangEN As Integer = 10 Const rowLangEN As Integer = 10
Const rowLangDE As Integer = 11 Const rowLangDE As Integer = 11
Const rowData As Integer = 13 Const rowData As Integer = 13
Const rowLang As Integer = 14 Const rowLang As Integer = 14
Const rowErrHandling As Integer = 15 Const rowErrHandling As Integer = 15
Const rowErrHandlingTxt As Integer = 16 Const rowErrHandlingTxt As Integer = 16
Const rowErrExit As Integer = 17 Const rowErrExit As Integer = 17
Const rowErrResume As Integer = 18 Const rowErrResume As Integer = 18
   
sProcName = "InitBars" sProcName = "InitBars"
   
On Error GoTo Err On Error GoTo Err
   
   vbLang = iGetLanguage    vbLang = iGetLanguage
         
   iSh = iGetWorksheetID(ActiveWorkbook, "_params")    iSh = iGetWorksheetID(ActiveWorkbook, "_params")
   Set oSh = ActiveWorkbook.Worksheets(iSh)    Set oSh = ActiveWorkbook.Worksheets(iSh)
                 
   frmExecOptions.Caption = vbVersion    frmExecOptions.Caption = vbVersion
                 
   frmExecOptions.bxInfo.Caption = oSh.Cells(rowInfo, 1).Value    frmExecOptions.bxInfo.Caption = oSh.Cells(rowInfo, 1).Value
   frmExecOptions.bxParams.Caption = oSh.Cells(rowParams, 1).Value    frmExecOptions.bxParams.Caption = oSh.Cells(rowParams, 1).Value
   frmExecOptions.bxObjects.Caption = oSh.Cells(rowObjects, 1).Value    frmExecOptions.bxObjects.Caption = oSh.Cells(rowObjects, 1).Value
   frmExecOptions.bxDependencies.Caption = oSh.Cells(rowDependencies, 1).Value    frmExecOptions.bxDependencies.Caption = oSh.Cells(rowDependencies, 1).Value
   frmExecOptions.bxHierarchies.Caption = oSh.Cells(rowHierarchies, 1).Value    frmExecOptions.bxHierarchies.Caption = oSh.Cells(rowHierarchies, 1).Value
   frmExecOptions.bxContexts.Caption = oSh.Cells(rowContexts, 1).Value    frmExecOptions.bxContexts.Caption = oSh.Cells(rowContexts, 1).Value
   frmExecOptions.bxJoins.Caption = oSh.Cells(rowJoins, 1).Value    frmExecOptions.bxJoins.Caption = oSh.Cells(rowJoins, 1).Value
   frmExecOptions.bxIncombs.Caption = oSh.Cells(rowIncombs, 1).Value    frmExecOptions.bxIncombs.Caption = oSh.Cells(rowIncombs, 1).Value
         
   frmExecOptions.bxDE.Caption = oSh.Cells(rowLangDE, 1).Value    frmExecOptions.bxDE.Caption = oSh.Cells(rowLangDE, 1).Value
   frmExecOptions.bxEN.Caption = oSh.Cells(rowLangEN, 1).Value    frmExecOptions.bxEN.Caption = oSh.Cells(rowLangEN, 1).Value
         
   frmExecOptions.lblErr.Caption = oSh.Cells(rowErrHandlingTxt, 1).Value    frmExecOptions.lblErr.Caption = oSh.Cells(rowErrHandlingTxt, 1).Value
   frmExecOptions.bxErrExit.Caption = oSh.Cells(rowErrExit, 1).Value    frmExecOptions.bxErrExit.Caption = oSh.Cells(rowErrExit, 1).Value
   frmExecOptions.bxErrResume.Caption = oSh.Cells(rowErrResume, 1).Value    frmExecOptions.bxErrResume.Caption = oSh.Cells(rowErrResume, 1).Value
         
   frmExecOptions.pgAll.pages(0).Caption = oSh.Cells(rowData, 1).Value    frmExecOptions.pgAll.pages(0).Caption = oSh.Cells(rowData, 1).Value
   frmExecOptions.pgAll.pages(1).Caption = oSh.Cells(rowLang, 1).Value    frmExecOptions.pgAll.pages(1).Caption = oSh.Cells(rowLang, 1).Value
   frmExecOptions.pgAll.pages(2).Caption = oSh.Cells(rowErrHandling, 1).Value    frmExecOptions.pgAll.pages(2).Caption = oSh.Cells(rowErrHandling, 1).Value
         
   frmExecOptions.cmdEsc.Caption = "Esc"    frmExecOptions.cmdEsc.Caption = "Esc"
   frmExecOptions.cmdOk.Caption = "Ok"    frmExecOptions.cmdOk.Caption = "Ok"
         
   frmExecOptions.bxInfo.Value = IIf(LCase(oSh.Cells(rowInfo, 2).Value) = "yes", True, False)    frmExecOptions.bxInfo.Value = IIf(LCase(oSh.Cells(rowInfo, 2).Value) = "yes", True, False)
   frmExecOptions.bxInfo.Value = IIf(LCase(oSh.Cells(rowInfo, 2).Value) = "yes", True, False)    frmExecOptions.bxInfo.Value = IIf(LCase(oSh.Cells(rowInfo, 2).Value) = "yes", True, False)
   frmExecOptions.bxParams.Value = IIf(LCase(oSh.Cells(rowParams, 2).Value) = "yes", True, False)    frmExecOptions.bxParams.Value = IIf(LCase(oSh.Cells(rowParams, 2).Value) = "yes", True, False)
   frmExecOptions.bxObjects.Value = IIf(LCase(oSh.Cells(rowObjects, 2).Value) = "yes", True, False)    frmExecOptions.bxObjects.Value = IIf(LCase(oSh.Cells(rowObjects, 2).Value) = "yes", True, False)
   frmExecOptions.bxDependencies.Value = IIf(LCase(oSh.Cells(rowDependencies, 2).Value) = "yes", True, False)    frmExecOptions.bxDependencies.Value = IIf(LCase(oSh.Cells(rowDependencies, 2).Value) = "yes", True, False)
   frmExecOptions.bxHierarchies.Value = IIf(LCase(oSh.Cells(rowHierarchies, 2).Value) = "yes", True, False)    frmExecOptions.bxHierarchies.Value = IIf(LCase(oSh.Cells(rowHierarchies, 2).Value) = "yes", True, False)
   frmExecOptions.bxContexts.Value = IIf(LCase(oSh.Cells(rowContexts, 2).Value) = "yes", True, False)    frmExecOptions.bxContexts.Value = IIf(LCase(oSh.Cells(rowContexts, 2).Value) = "yes", True, False)
   frmExecOptions.bxJoins.Value = IIf(LCase(oSh.Cells(rowJoins, 2).Value) = "yes", True, False)    frmExecOptions.bxJoins.Value = IIf(LCase(oSh.Cells(rowJoins, 2).Value) = "yes", True, False)
   frmExecOptions.bxIncombs.Value = IIf(LCase(oSh.Cells(rowIncombs, 2).Value) = "yes", True, False)    frmExecOptions.bxIncombs.Value = IIf(LCase(oSh.Cells(rowIncombs, 2).Value) = "yes", True, False)
         
   frmExecOptions.bxEN.Value = IIf(LCase(oSh.Cells(rowLangEN, 2).Value) = "yes", True, False)    frmExecOptions.bxEN.Value = IIf(LCase(oSh.Cells(rowLangEN, 2).Value) = "yes", True, False)
   frmExecOptions.bxDE.Value = IIf(LCase(oSh.Cells(rowLangDE, 2).Value) = "yes", True, False)    frmExecOptions.bxDE.Value = IIf(LCase(oSh.Cells(rowLangDE, 2).Value) = "yes", True, False)
         
   frmExecOptions.bxErrExit.Value = IIf(LCase(oSh.Cells(rowErrExit, 2).Value) = "yes", True, False)    frmExecOptions.bxErrExit.Value = IIf(LCase(oSh.Cells(rowErrExit, 2).Value) = "yes", True, False)
   frmExecOptions.bxErrResume.Value = IIf(LCase(oSh.Cells(rowErrResume, 2).Value) = "yes", True, False)    frmExecOptions.bxErrResume.Value = IIf(LCase(oSh.Cells(rowErrResume, 2).Value) = "yes", True, False)
         
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub ShowFrm() Private Sub ShowFrm()
Dim sProcName As String Dim sProcName As String
sProcName = "ShowFrm" sProcName = "ShowFrm"
   
On Error GoTo Err On Error GoTo Err
   Call InitFrm    Call InitFrm
   frmExecOptions.Show    frmExecOptions.Show
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Public Sub InitBars() Public Sub InitBars()
Dim sProcName As String Dim sProcName As String
sProcName = "InitBars" sProcName = "InitBars"
   
Dim oXls As Excel.Application Dim oXls As Excel.Application
Dim oMenubar As CommandBar Dim oMenubar As CommandBar
Dim oBr As CommandBarPopup Dim oBr As CommandBarPopup
Dim oBr1 As CommandBarControl Dim oBr1 As CommandBarControl
Dim oBr2 As CommandBarControl Dim oBr2 As CommandBarControl
Dim oBr3 As CommandBarControl Dim oBr3 As CommandBarControl
Dim oBr4 As CommandBarControl Dim oBr4 As CommandBarControl
Dim oBr5 As CommandBarControl Dim oBr5 As CommandBarControl
   
Dim sBar1Caption As String Dim sBar1Caption As String
Dim sBar1OnAction As String Dim sBar1OnAction As String
Dim sBar2Caption As String Dim sBar2Caption As String
Dim sBar2OnAction As String Dim sBar2OnAction As String
Dim sBar3Caption As String Dim sBar3Caption As String
Dim sBar3OnAction As String Dim sBar3OnAction As String
Dim sBar4Caption As String Dim sBar4Caption As String
Dim sBar4OnAction As String Dim sBar4OnAction As String
Dim sBar5Caption As String Dim sBar5Caption As String
Dim sBar5OnAction As String Dim sBar5OnAction As String
   
Dim sMyBar As String Dim sMyBar As String
   
On Error GoTo Err On Error GoTo Err
   
   vbLang = iGetLanguage    vbLang = iGetLanguage
         
   Call RemoveBars    Call RemoveBars
   Call InitFrm    Call InitFrm
         
   sMyBar = "&" & vbVersion    sMyBar = "&" & vbVersion
         
   Set oXls = Excel.Application    Set oXls = Excel.Application
         
   ' language settings for output    ' language settings for output
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           sBar1Caption = "&Lade Universum"            sBar1Caption = "&Lade Universum"
           sBar2Caption = "&Schreibe Universum"            sBar2Caption = "&Schreibe Universum"
           sBar3Caption = "&Versioniere Universum >> xls"            sBar3Caption = "&Versioniere Universum >> xls"
           sBar4Caption = "&Optionen"            sBar4Caption = "&Optionen"
           sBar5Caption = "&Info"            sBar5Caption = "&Info"
       Case Else ' english        Case Else ' english
           sBar1Caption = "&Load universe"            sBar1Caption = "&Load universe"
           sBar2Caption = "&Write universe"            sBar2Caption = "&Write universe"
           sBar3Caption = "&Versioning universe >> xls"            sBar3Caption = "&Versioning universe >> xls"
           sBar4Caption = "&Options"            sBar4Caption = "&Options"
           sBar5Caption = "&Info"            sBar5Caption = "&Info"
   End Select    End Select
         
   sBar1OnAction = "WriteUniverseXLS"    sBar1OnAction = "WriteUniverseXLS"
   sBar2OnAction = "SetUniverse"    sBar2OnAction = "SetUniverse"
   sBar3OnAction = "ExportUniverseXLS"    sBar3OnAction = "ExportUniverseXLS"
   sBar4OnAction = "ShowFrm"    sBar4OnAction = "ShowFrm"
   sBar5OnAction = "ShowInfo"    sBar5OnAction = "ShowInfo"
         
   Set oMenubar = oXls.CommandBars("Worksheet Menu Bar")    Set oMenubar = oXls.CommandBars("Worksheet Menu Bar")
                                         
   For Each oBr In oMenubar.Controls    For Each oBr In oMenubar.Controls
       'MsgBox oBr.Caption        'MsgBox oBr.Caption
       If oBr.Caption = sMyBar Then Exit Sub        If oBr.Caption = sMyBar Then Exit Sub
   Next oBr    Next oBr
         
   Set oBr = oMenubar.Controls.Add(msoControlPopup)    Set oBr = oMenubar.Controls.Add(msoControlPopup)
   oBr.Visible = True    oBr.Visible = True
   oBr.Caption = sMyBar & IIf(vbModus = vbModusDemo, " demo", "")    oBr.Caption = sMyBar & IIf(vbModus = vbModusDemo, " demo", "")
         
   Set oBr1 = oBr.Controls.Add(msoControlButton)    Set oBr1 = oBr.Controls.Add(msoControlButton)
   oBr1.Visible = True    oBr1.Visible = True
   oBr1.Caption = sBar1Caption    oBr1.Caption = sBar1Caption
   oBr1.OnAction = sBar1OnAction    oBr1.OnAction = sBar1OnAction
         
   Set oBr2 = oBr.Controls.Add(msoControlButton)    Set oBr2 = oBr.Controls.Add(msoControlButton)
   oBr2.Visible = True    oBr2.Visible = True
   oBr2.Caption = sBar2Caption    oBr2.Caption = sBar2Caption
   oBr2.OnAction = sBar2OnAction    oBr2.OnAction = sBar2OnAction
         
   Set oBr3 = oBr.Controls.Add(msoControlButton)    Set oBr3 = oBr.Controls.Add(msoControlButton)
   oBr3.Visible = True    oBr3.Visible = True
   oBr3.Caption = sBar3Caption    oBr3.Caption = sBar3Caption
   oBr3.OnAction = sBar3OnAction    oBr3.OnAction = sBar3OnAction
         
   Set oBr4 = oBr.Controls.Add(msoControlButton)    Set oBr4 = oBr.Controls.Add(msoControlButton)
   oBr4.Visible = True    oBr4.Visible = True
   oBr4.Caption = sBar4Caption    oBr4.Caption = sBar4Caption
   oBr4.OnAction = sBar4OnAction    oBr4.OnAction = sBar4OnAction
         
   Set oBr5 = oBr.Controls.Add(msoControlButton)    Set oBr5 = oBr.Controls.Add(msoControlButton)
   oBr5.Visible = True    oBr5.Visible = True
   oBr5.Caption = sBar5Caption    oBr5.Caption = sBar5Caption
   oBr5.OnAction = sBar5OnAction    oBr5.OnAction = sBar5OnAction
         
   Set oBr = Nothing    Set oBr = Nothing
   Set oBr1 = Nothing    Set oBr1 = Nothing
   Set oBr2 = Nothing    Set oBr2 = Nothing
   Set oBr3 = Nothing    Set oBr3 = Nothing
   Set oBr4 = Nothing    Set oBr4 = Nothing
   Set oBr5 = Nothing    Set oBr5 = Nothing
         
   Set oMenubar = Nothing    Set oMenubar = Nothing
   Set oXls = Nothing    Set oXls = Nothing
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Public Sub RemoveBars() Public Sub RemoveBars()
Dim sProcName As String Dim sProcName As String
sProcName = "RemoveBars" sProcName = "RemoveBars"
   
Dim oXls As Excel.Application Dim oXls As Excel.Application
Dim oMenubar As CommandBar Dim oMenubar As CommandBar
Dim oBr As CommandBarPopup Dim oBr As CommandBarPopup
   
Dim sMyBar As String Dim sMyBar As String
   
On Error GoTo Err On Error GoTo Err
   sMyBar = "&" & vbVersion    sMyBar = "&" & vbVersion
   Set oXls = Excel.Application    Set oXls = Excel.Application
         
   Set oMenubar = oXls.CommandBars("Worksheet Menu Bar")    Set oMenubar = oXls.CommandBars("Worksheet Menu Bar")
                                         
   For Each oBr In oMenubar.Controls    For Each oBr In oMenubar.Controls
       If oBr.Caption = sMyBar & IIf(vbModus = vbModusDemo, " demo", "") Then oBr.Delete        If oBr.Caption = sMyBar & IIf(vbModus = vbModusDemo, " demo", "") Then oBr.Delete
   Next oBr    Next oBr
         
   Set oBr = Nothing    Set oBr = Nothing
   Set oMenubar = Nothing    Set oMenubar = Nothing
   Set oXls = Nothing    Set oXls = Nothing
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub ShowInfo() Private Sub ShowInfo()
Dim sProcName As String Dim sProcName As String
sProcName = "ShowInfo" sProcName = "ShowInfo"
   
On Error GoTo Err On Error GoTo Err
   
   frmInfo.Caption = vbVersion & IIf(vbModus = vbModusDemo, " - demo", "")    frmInfo.Caption = vbVersion & IIf(vbModus = vbModusDemo, " - demo", "")
   frmInfo.lblInfo = "GetSetUniverse" & vbCrLf & _    frmInfo.lblInfo = "GetSetUniverse" & vbCrLf & _
                       "version " & vbVersion & vbCrLf & vbCrLf & _                        "version " & vbVersion & vbCrLf & vbCrLf & _
                       "André Lützkendorf" & vbCrLf & _                        "André Lützkendorf" & vbCrLf & _
                       "www.luetzkendorf.eu" & vbCrLf & _                        "www.luetzkendorf.eu" & vbCrLf & _
                       "info@luetzkendorf.eu"                        "info@luetzkendorf.eu"
                       
   frmInfo.Show    frmInfo.Show
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub DefinitionOfDimensionTablesDE() Private Sub DefinitionOfDimensionTablesDE()
Dim sProcName As String Dim sProcName As String
Dim iLang As Integer Dim iLang As Integer
   
sProcName = "DefinitionOfDimensionTablesDE" sProcName = "DefinitionOfDimensionTablesDE"
   
On Error GoTo Err On Error GoTo Err
         
   ' language settings    ' language settings
   ReDim oLanguage(2)    ReDim oLanguage(2)
   oLanguage(1).iLang = 49    oLanguage(1).iLang = 49
   oLanguage(1).sLang = "de"    oLanguage(1).sLang = "de"
   oLanguage(2).iLang = 44    oLanguage(2).iLang = 44
   oLanguage(2).sLang = "en"    oLanguage(2).sLang = "en"
         
   'tUniverseProperties.CurrentObjectStrategy    'tUniverseProperties.CurrentObjectStrategy
   ReDim oCurrentObjectStrategy(1)    ReDim oCurrentObjectStrategy(1)
   oCurrentObjectStrategy(1).iLang = 49    oCurrentObjectStrategy(1).iLang = 49
   oCurrentObjectStrategy(1).iCurrentObjectStrategy = 0    oCurrentObjectStrategy(1).iCurrentObjectStrategy = 0
   oCurrentObjectStrategy(1).sCurrentObjectStrategy = "Standard-Umbenennung"    oCurrentObjectStrategy(1).sCurrentObjectStrategy = "Standard-Umbenennung"
         
   ' tUniverseProperties.CurrentJoinStrategy    ' tUniverseProperties.CurrentJoinStrategy
   ReDim oCurrentJoinStrategy(4)    ReDim oCurrentJoinStrategy(4)
   oCurrentJoinStrategy(1).iLang = 49    oCurrentJoinStrategy(1).iLang = 49
   oCurrentJoinStrategy(1).iCurrentJoinStrategy = 0    oCurrentJoinStrategy(1).iCurrentJoinStrategy = 0
   oCurrentJoinStrategy(1).sCurrentJoinStrategy = "Manuell bearbeiten (keine automatische Erstellung)"    oCurrentJoinStrategy(1).sCurrentJoinStrategy = "Manuell bearbeiten (keine automatische Erstellung)"
         
   oCurrentJoinStrategy(2).iLang = 49    oCurrentJoinStrategy(2).iLang = 49
   oCurrentJoinStrategy(2).iCurrentJoinStrategy = 1    oCurrentJoinStrategy(2).iCurrentJoinStrategy = 1
   oCurrentJoinStrategy(2).sCurrentJoinStrategy = "1"    oCurrentJoinStrategy(2).sCurrentJoinStrategy = "1"
         
   oCurrentJoinStrategy(3).iLang = 49    oCurrentJoinStrategy(3).iLang = 49
   oCurrentJoinStrategy(3).iCurrentJoinStrategy = 2    oCurrentJoinStrategy(3).iCurrentJoinStrategy = 2
   oCurrentJoinStrategy(3).sCurrentJoinStrategy = "2"    oCurrentJoinStrategy(3).sCurrentJoinStrategy = "2"
         
   oCurrentJoinStrategy(4).iLang = 49    oCurrentJoinStrategy(4).iLang = 49
   oCurrentJoinStrategy(4).iCurrentJoinStrategy = -1    oCurrentJoinStrategy(4).iCurrentJoinStrategy = -1
   oCurrentJoinStrategy(4).sCurrentJoinStrategy = "-1"    oCurrentJoinStrategy(4).sCurrentJoinStrategy = "-1"
                 
   ' tUniverseProperties.CurrentTableStrategy    ' tUniverseProperties.CurrentTableStrategy
   ReDim oCurrentTableStrategy(2)    ReDim oCurrentTableStrategy(2)
   oCurrentTableStrategy(1).iLang = 49    oCurrentTableStrategy(1).iLang = 49
   oCurrentTableStrategy(1).iCurrentTableStrategy = 0    oCurrentTableStrategy(1).iCurrentTableStrategy = 0
   oCurrentTableStrategy(1).sCurrentTableStrategy = "Standard (Integriert)"    oCurrentTableStrategy(1).sCurrentTableStrategy = "Standard (Integriert)"
                 
   oCurrentTableStrategy(2).iLang = 49    oCurrentTableStrategy(2).iLang = 49
   oCurrentTableStrategy(2).iCurrentTableStrategy = -1    oCurrentTableStrategy(2).iCurrentTableStrategy = -1
   oCurrentTableStrategy(2).sCurrentTableStrategy = "-1"    oCurrentTableStrategy(2).sCurrentTableStrategy = "-1"
         
   ' tObjectProperties.DataBaseFormat    ' tObjectProperties.DataBaseFormat
   ' is not implemented    ' is not implemented
   
   ' tObjectProperties.Qualification    ' tObjectProperties.Qualification
   ReDim oQualification(4)    ReDim oQualification(4)
   oQualification(1).iLang = 49    oQualification(1).iLang = 49
   oQualification(1).iQualification = dsDimensionObject    oQualification(1).iQualification = dsDimensionObject
   oQualification(1).sQualification = "Dimension"    oQualification(1).sQualification = "Dimension"
   
   oQualification(2).iLang = 49    oQualification(2).iLang = 49
   oQualification(2).iQualification = dsDetailObject    oQualification(2).iQualification = dsDetailObject
   oQualification(2).sQualification = "Information"    oQualification(2).sQualification = "Information"
   
   oQualification(3).iLang = 49    oQualification(3).iLang = 49
   oQualification(3).iQualification = dsMeasureObject    oQualification(3).iQualification = dsMeasureObject
   oQualification(3).sQualification = "Kennzahl"    oQualification(3).sQualification = "Kennzahl"
   
   oQualification(4).iLang = 49    oQualification(4).iLang = 49
   oQualification(4).iQualification = 4    oQualification(4).iQualification = 4
   oQualification(4).sQualification = "Filter"    oQualification(4).sQualification = "Filter"
   
   ' tObjectProperties.AggregateFunction    ' tObjectProperties.AggregateFunction
   ReDim oAggregateFunction(8)    ReDim oAggregateFunction(8)
   oAggregateFunction(1).iLang = 49    oAggregateFunction(1).iLang = 49
   oAggregateFunction(1).iAggregateFunction = dsAggregateBySumObject    oAggregateFunction(1).iAggregateFunction = dsAggregateBySumObject
   oAggregateFunction(1).sAggregateFunction = "Summe (sum)"    oAggregateFunction(1).sAggregateFunction = "Summe (sum)"
         
   oAggregateFunction(2).iLang = 49    oAggregateFunction(2).iLang = 49
   oAggregateFunction(2).iAggregateFunction = dsAggregateByMaxObject    oAggregateFunction(2).iAggregateFunction = dsAggregateByMaxObject
   oAggregateFunction(2).sAggregateFunction = "Max (max)"    oAggregateFunction(2).sAggregateFunction = "Max (max)"
         
   oAggregateFunction(3).iLang = 49    oAggregateFunction(3).iLang = 49
   oAggregateFunction(3).iAggregateFunction = dsAggregateByMinObject    oAggregateFunction(3).iAggregateFunction = dsAggregateByMinObject
   oAggregateFunction(3).sAggregateFunction = "Min (min)"    oAggregateFunction(3).sAggregateFunction = "Min (min)"
         
   oAggregateFunction(4).iLang = 49    oAggregateFunction(4).iLang = 49
   oAggregateFunction(4).iAggregateFunction = dsAggregateByAvgObject    oAggregateFunction(4).iAggregateFunction = dsAggregateByAvgObject
   oAggregateFunction(4).sAggregateFunction = "Durchschnitt (avg)"    oAggregateFunction(4).sAggregateFunction = "Durchschnitt (avg)"
         
   oAggregateFunction(5).iLang = 49    oAggregateFunction(5).iLang = 49
   oAggregateFunction(5).iAggregateFunction = dsAggregateByCountObject    oAggregateFunction(5).iAggregateFunction = dsAggregateByCountObject
   oAggregateFunction(5).sAggregateFunction = "Anzahl (count)"    oAggregateFunction(5).sAggregateFunction = "Anzahl (count)"
         
   oAggregateFunction(6).iLang = 49    oAggregateFunction(6).iLang = 49
   oAggregateFunction(6).iAggregateFunction = dsAggregateByNullObject    oAggregateFunction(6).iAggregateFunction = dsAggregateByNullObject
   oAggregateFunction(6).sAggregateFunction = "Keine (null)"    oAggregateFunction(6).sAggregateFunction = "Keine (null)"
         
   oAggregateFunction(7).iLang = 49    oAggregateFunction(7).iLang = 49
   oAggregateFunction(7).iAggregateFunction = 0 'dsAggregateByDbDelegation    oAggregateFunction(7).iAggregateFunction = 0 'dsAggregateByDbDelegation
   oAggregateFunction(7).sAggregateFunction = "Datenbank Delegiert"    oAggregateFunction(7).sAggregateFunction = "Datenbank Delegiert"
         
   oAggregateFunction(8).iLang = 49    oAggregateFunction(8).iLang = 49
   oAggregateFunction(8).iAggregateFunction = -1 'Dsratellung Filterobjekte    oAggregateFunction(8).iAggregateFunction = -1 'Dsratellung Filterobjekte
   oAggregateFunction(8).sAggregateFunction = ""    oAggregateFunction(8).sAggregateFunction = ""
         
   ' tObjectProperties.SecurityAccessLevel    ' tObjectProperties.SecurityAccessLevel
   ReDim oSecurityAccessLevel(6)    ReDim oSecurityAccessLevel(6)
         
   oSecurityAccessLevel(1).iLang = 49    oSecurityAccessLevel(1).iLang = 49
   oSecurityAccessLevel(1).iSecurityAccessLevel = dsControlledAccess    oSecurityAccessLevel(1).iSecurityAccessLevel = dsControlledAccess
   oSecurityAccessLevel(1).sSecurityAccessLevel = "Kontrolliert"    oSecurityAccessLevel(1).sSecurityAccessLevel = "Kontrolliert"
         
   oSecurityAccessLevel(2).iLang = 49    oSecurityAccessLevel(2).iLang = 49
   oSecurityAccessLevel(2).iSecurityAccessLevel = dsRestrictedAccess    oSecurityAccessLevel(2).iSecurityAccessLevel = dsRestrictedAccess
   oSecurityAccessLevel(2).sSecurityAccessLevel = "Eingeschränkt"    oSecurityAccessLevel(2).sSecurityAccessLevel = "Eingeschränkt"
         
   oSecurityAccessLevel(3).iLang = 49    oSecurityAccessLevel(3).iLang = 49
   oSecurityAccessLevel(3).iSecurityAccessLevel = dsConfidentialAccess    oSecurityAccessLevel(3).iSecurityAccessLevel = dsConfidentialAccess
   oSecurityAccessLevel(3).sSecurityAccessLevel = "Vertraulich"    oSecurityAccessLevel(3).sSecurityAccessLevel = "Vertraulich"
         
   oSecurityAccessLevel(4).iLang = 49    oSecurityAccessLevel(4).iLang = 49
   oSecurityAccessLevel(4).iSecurityAccessLevel = dsPrivateAccess    oSecurityAccessLevel(4).iSecurityAccessLevel = dsPrivateAccess
   oSecurityAccessLevel(4).sSecurityAccessLevel = "Privat"    oSecurityAccessLevel(4).sSecurityAccessLevel = "Privat"
         
   oSecurityAccessLevel(5).iLang = 49    oSecurityAccessLevel(5).iLang = 49
   oSecurityAccessLevel(5).iSecurityAccessLevel = dsPublicAccess    oSecurityAccessLevel(5).iSecurityAccessLevel = dsPublicAccess
   oSecurityAccessLevel(5).sSecurityAccessLevel = "Öffentlich"    oSecurityAccessLevel(5).sSecurityAccessLevel = "Öffentlich"
         
   oSecurityAccessLevel(6).iLang = 49    oSecurityAccessLevel(6).iLang = 49
   oSecurityAccessLevel(6).iSecurityAccessLevel = -1 'Darstellung Filterobjekte    oSecurityAccessLevel(6).iSecurityAccessLevel = -1 'Darstellung Filterobjekte
   oSecurityAccessLevel(6).sSecurityAccessLevel = ""    oSecurityAccessLevel(6).sSecurityAccessLevel = ""
         
   ' tObjectProperties.Type    ' tObjectProperties.Type
   ReDim oObjectPropertiesType(6)    ReDim oObjectPropertiesType(6)
         
   oObjectPropertiesType(1).iLang = 49    oObjectPropertiesType(1).iLang = 49
   oObjectPropertiesType(1).iType = dsNumericObject    oObjectPropertiesType(1).iType = dsNumericObject
   oObjectPropertiesType(1).sType = "NumericObject"    oObjectPropertiesType(1).sType = "NumericObject"
   
   oObjectPropertiesType(2).iLang = 49    oObjectPropertiesType(2).iLang = 49
   oObjectPropertiesType(2).iType = dsCharacterObject    oObjectPropertiesType(2).iType = dsCharacterObject
   oObjectPropertiesType(2).sType = "CharacterObject"    oObjectPropertiesType(2).sType = "CharacterObject"
   
   oObjectPropertiesType(3).iLang = 49    oObjectPropertiesType(3).iLang = 49
   oObjectPropertiesType(3).iType = dsDateObject    oObjectPropertiesType(3).iType = dsDateObject
   oObjectPropertiesType(3).sType = "DateObject"    oObjectPropertiesType(3).sType = "DateObject"
   
   oObjectPropertiesType(4).iLang = 49    oObjectPropertiesType(4).iLang = 49
   oObjectPropertiesType(4).iType = dsBlobObject    oObjectPropertiesType(4).iType = dsBlobObject
   oObjectPropertiesType(4).sType = "BlobObject"    oObjectPropertiesType(4).sType = "BlobObject"
   
   oObjectPropertiesType(5).iLang = 49    oObjectPropertiesType(5).iLang = 49
   oObjectPropertiesType(5).iType = dsUnknownObject    oObjectPropertiesType(5).iType = dsUnknownObject
   oObjectPropertiesType(5).sType = "UnknownObject"    oObjectPropertiesType(5).sType = "UnknownObject"
   
   oObjectPropertiesType(6).iLang = 49    oObjectPropertiesType(6).iLang = 49
   oObjectPropertiesType(6).iType = dsNullObject    oObjectPropertiesType(6).iType = dsNullObject
   oObjectPropertiesType(6).sType = "NullObject"    oObjectPropertiesType(6).sType = "NullObject"
   
   ' tObjectKeys.Type    ' tObjectKeys.Type
   ReDim oObjectKeysType(2)    ReDim oObjectKeysType(2)
         
   oObjectKeysType(1).iLang = 49    oObjectKeysType(1).iLang = 49
   oObjectKeysType(1).iType = 0    oObjectKeysType(1).iType = 0
   oObjectKeysType(1).sType = "Primärschlüssel"    oObjectKeysType(1).sType = "Primärschlüssel"
   
   oObjectKeysType(2).iLang = 49    oObjectKeysType(2).iLang = 49
   oObjectKeysType(2).iType = 1    oObjectKeysType(2).iType = 1
   oObjectKeysType(2).sType = "Externer Schlüssel"    oObjectKeysType(2).sType = "Externer Schlüssel"
   
   ' tDependencies.Source    ' tDependencies.Source
   ReDim oSource(2)    ReDim oSource(2)
         
   oSource(1).iLang = 49    oSource(1).iLang = 49
   oSource(1).iSource = 1    oSource(1).iSource = 1
   oSource(1).sSource = "Select"    oSource(1).sSource = "Select"
         
   oSource(2).iLang = 49    oSource(2).iLang = 49
   oSource(2).iSource = 2    oSource(2).iSource = 2
   oSource(2).sSource = "Where"    oSource(2).sSource = "Where"
         
   'tTableColumn.Type    'tTableColumn.Type
   ReDim oTableColumnType(6)    ReDim oTableColumnType(6)
         
   oTableColumnType(1).iLang = 49    oTableColumnType(1).iLang = 49
   oTableColumnType(1).iTyp = dsNumericColumn    oTableColumnType(1).iTyp = dsNumericColumn
   oTableColumnType(1).sName = "NumericColumn"    oTableColumnType(1).sName = "NumericColumn"
         
   oTableColumnType(2).iLang = 49    oTableColumnType(2).iLang = 49
   oTableColumnType(2).iTyp = dsCharacterColumn    oTableColumnType(2).iTyp = dsCharacterColumn
   oTableColumnType(2).sName = "CharacterColumn"    oTableColumnType(2).sName = "CharacterColumn"
         
   oTableColumnType(3).iLang = 49    oTableColumnType(3).iLang = 49
   oTableColumnType(3).iTyp = dsDateColumn    oTableColumnType(3).iTyp = dsDateColumn
   oTableColumnType(3).sName = "DateColumn"    oTableColumnType(3).sName = "DateColumn"
         
   oTableColumnType(4).iLang = 49    oTableColumnType(4).iLang = 49
   oTableColumnType(4).iTyp = dsTextColumn    oTableColumnType(4).iTyp = dsTextColumn
   oTableColumnType(4).sName = "TextColumn"    oTableColumnType(4).sName = "TextColumn"
         
   oTableColumnType(5).iLang = 49    oTableColumnType(5).iLang = 49
   oTableColumnType(5).iTyp = dsUnknownColumn    oTableColumnType(5).iTyp = dsUnknownColumn
   oTableColumnType(5).sName = "UnknownColumn"    oTableColumnType(5).sName = "UnknownColumn"
         
   oTableColumnType(6).iLang = 49    oTableColumnType(6).iLang = 49
   oTableColumnType(6).iTyp = dsNullColumn    oTableColumnType(6).iTyp = dsNullColumn
   oTableColumnType(6).sName = "NullColumn"    oTableColumnType(6).sName = "NullColumn"
         
   ' tTableColumn.Key    ' tTableColumn.Key
   ReDim oTableColumnKey(6)    ReDim oTableColumnKey(6)
   ' no support fpund to assign description to keys    ' no support fpund to assign description to keys
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub DefinitionOfDimensionTablesEN() Private Sub DefinitionOfDimensionTablesEN()
Dim sProcName As String Dim sProcName As String
Dim iLang As Integer Dim iLang As Integer
   
sProcName = "DefinitionOfDimensionTablesEN" sProcName = "DefinitionOfDimensionTablesEN"
   
On Error GoTo Err On Error GoTo Err
         
   ' language settings    ' language settings
   ReDim oLanguage(2)    ReDim oLanguage(2)
   oLanguage(1).iLang = 49    oLanguage(1).iLang = 49
   oLanguage(1).sLang = "de"    oLanguage(1).sLang = "de"
   oLanguage(2).iLang = 44    oLanguage(2).iLang = 44
   oLanguage(2).sLang = "en"    oLanguage(2).sLang = "en"
         
   'tUniverseProperties.CurrentObjectStrategy    'tUniverseProperties.CurrentObjectStrategy
   ReDim oCurrentObjectStrategy(1)    ReDim oCurrentObjectStrategy(1)
   oCurrentObjectStrategy(1).iLang = 44    oCurrentObjectStrategy(1).iLang = 44
   oCurrentObjectStrategy(1).iCurrentObjectStrategy = 0    oCurrentObjectStrategy(1).iCurrentObjectStrategy = 0
   oCurrentObjectStrategy(1).sCurrentObjectStrategy = "(Build in) Standard Renaming"    oCurrentObjectStrategy(1).sCurrentObjectStrategy = "(Build in) Standard Renaming"
         
   ' tUniverseProperties.CurrentJoinStrategy    ' tUniverseProperties.CurrentJoinStrategy
   ReDim oCurrentJoinStrategy(4)    ReDim oCurrentJoinStrategy(4)
   oCurrentJoinStrategy(1).iLang = 44    oCurrentJoinStrategy(1).iLang = 44
   oCurrentJoinStrategy(1).iCurrentJoinStrategy = 0    oCurrentJoinStrategy(1).iCurrentJoinStrategy = 0
   oCurrentJoinStrategy(1).sCurrentJoinStrategy = "Edit Manually (none)"    oCurrentJoinStrategy(1).sCurrentJoinStrategy = "Edit Manually (none)"
         
   oCurrentJoinStrategy(2).iLang = 44    oCurrentJoinStrategy(2).iLang = 44
   oCurrentJoinStrategy(2).iCurrentJoinStrategy = 1    oCurrentJoinStrategy(2).iCurrentJoinStrategy = 1
   oCurrentJoinStrategy(2).sCurrentJoinStrategy = "1"    oCurrentJoinStrategy(2).sCurrentJoinStrategy = "1"
         
   oCurrentJoinStrategy(3).iLang = 44    oCurrentJoinStrategy(3).iLang = 44
   oCurrentJoinStrategy(3).iCurrentJoinStrategy = 2    oCurrentJoinStrategy(3).iCurrentJoinStrategy = 2
   oCurrentJoinStrategy(3).sCurrentJoinStrategy = "2"    oCurrentJoinStrategy(3).sCurrentJoinStrategy = "2"
         
   oCurrentJoinStrategy(4).iLang = 44    oCurrentJoinStrategy(4).iLang = 44
   oCurrentJoinStrategy(4).iCurrentJoinStrategy = -1    oCurrentJoinStrategy(4).iCurrentJoinStrategy = -1
   oCurrentJoinStrategy(4).sCurrentJoinStrategy = "-1"    oCurrentJoinStrategy(4).sCurrentJoinStrategy = "-1"
                 
   ' tUniverseProperties.CurrentTableStrategy    ' tUniverseProperties.CurrentTableStrategy
   ReDim oCurrentTableStrategy(2)    ReDim oCurrentTableStrategy(2)
   oCurrentTableStrategy(1).iLang = 44    oCurrentTableStrategy(1).iLang = 44
   oCurrentTableStrategy(1).iCurrentTableStrategy = 0    oCurrentTableStrategy(1).iCurrentTableStrategy = 0
   oCurrentTableStrategy(1).sCurrentTableStrategy = "(Build in) Standard"    oCurrentTableStrategy(1).sCurrentTableStrategy = "(Build in) Standard"
                 
   oCurrentTableStrategy(2).iLang = 44    oCurrentTableStrategy(2).iLang = 44
   oCurrentTableStrategy(2).iCurrentTableStrategy = -1    oCurrentTableStrategy(2).iCurrentTableStrategy = -1
   oCurrentTableStrategy(2).sCurrentTableStrategy = "-1"    oCurrentTableStrategy(2).sCurrentTableStrategy = "-1"
         
   ' tObjectProperties.DataBaseFormat    ' tObjectProperties.DataBaseFormat
   ' is not implemented    ' is not implemented
   
   ' tObjectProperties.Qualification    ' tObjectProperties.Qualification
   ReDim oQualification(4)    ReDim oQualification(4)
   oQualification(1).iLang = 44    oQualification(1).iLang = 44
   oQualification(1).iQualification = dsDimensionObject    oQualification(1).iQualification = dsDimensionObject
   oQualification(1).sQualification = "Dimension"    oQualification(1).sQualification = "Dimension"
   
   oQualification(2).iLang = 44    oQualification(2).iLang = 44
   oQualification(2).iQualification = dsDetailObject    oQualification(2).iQualification = dsDetailObject
   oQualification(2).sQualification = "Detail"    oQualification(2).sQualification = "Detail"
   
   oQualification(3).iLang = 44    oQualification(3).iLang = 44
   oQualification(3).iQualification = dsMeasureObject    oQualification(3).iQualification = dsMeasureObject
   oQualification(3).sQualification = "Measure"    oQualification(3).sQualification = "Measure"
   
   oQualification(4).iLang = 44    oQualification(4).iLang = 44
   oQualification(4).iQualification = 4    oQualification(4).iQualification = 4
   oQualification(4).sQualification = "Condition"    oQualification(4).sQualification = "Condition"
   
   ' tObjectProperties.AggregateFunction    ' tObjectProperties.AggregateFunction
   ReDim oAggregateFunction(8)    ReDim oAggregateFunction(8)
   oAggregateFunction(1).iLang = 44    oAggregateFunction(1).iLang = 44
   oAggregateFunction(1).iAggregateFunction = dsAggregateBySumObject    oAggregateFunction(1).iAggregateFunction = dsAggregateBySumObject
   oAggregateFunction(1).sAggregateFunction = "Sum"    oAggregateFunction(1).sAggregateFunction = "Sum"
         
   oAggregateFunction(2).iLang = 44    oAggregateFunction(2).iLang = 44
   oAggregateFunction(2).iAggregateFunction = dsAggregateByMaxObject    oAggregateFunction(2).iAggregateFunction = dsAggregateByMaxObject
   oAggregateFunction(2).sAggregateFunction = "Max"    oAggregateFunction(2).sAggregateFunction = "Max"
         
   oAggregateFunction(3).iLang = 44    oAggregateFunction(3).iLang = 44
   oAggregateFunction(3).iAggregateFunction = dsAggregateByMinObject    oAggregateFunction(3).iAggregateFunction = dsAggregateByMinObject
   oAggregateFunction(3).sAggregateFunction = "Min"    oAggregateFunction(3).sAggregateFunction = "Min"
         
   oAggregateFunction(4).iLang = 44    oAggregateFunction(4).iLang = 44
   oAggregateFunction(4).iAggregateFunction = dsAggregateByAvgObject    oAggregateFunction(4).iAggregateFunction = dsAggregateByAvgObject
   oAggregateFunction(4).sAggregateFunction = "Average"    oAggregateFunction(4).sAggregateFunction = "Average"
         
   oAggregateFunction(5).iLang = 44    oAggregateFunction(5).iLang = 44
   oAggregateFunction(5).iAggregateFunction = dsAggregateByCountObject    oAggregateFunction(5).iAggregateFunction = dsAggregateByCountObject
   oAggregateFunction(5).sAggregateFunction = "Count"    oAggregateFunction(5).sAggregateFunction = "Count"
         
   oAggregateFunction(6).iLang = 44    oAggregateFunction(6).iLang = 44
   oAggregateFunction(6).iAggregateFunction = dsAggregateByNullObject    oAggregateFunction(6).iAggregateFunction = dsAggregateByNullObject
   oAggregateFunction(6).sAggregateFunction = "None"    oAggregateFunction(6).sAggregateFunction = "None"
         
   oAggregateFunction(7).iLang = 44    oAggregateFunction(7).iLang = 44
   oAggregateFunction(7).iAggregateFunction = 0 'dsAggregateByDbDelegation    oAggregateFunction(7).iAggregateFunction = 0 'dsAggregateByDbDelegation
   oAggregateFunction(7).sAggregateFunction = "Database delegated"    oAggregateFunction(7).sAggregateFunction = "Database delegated"
         
   oAggregateFunction(8).iLang = 44    oAggregateFunction(8).iLang = 44
   oAggregateFunction(8).iAggregateFunction = -1 'Darstellung Filterobjekte    oAggregateFunction(8).iAggregateFunction = -1 'Darstellung Filterobjekte
   oAggregateFunction(8).sAggregateFunction = ""    oAggregateFunction(8).sAggregateFunction = ""
         
   ' tObjectProperties.SecurityAccessLevel    ' tObjectProperties.SecurityAccessLevel
   ReDim oSecurityAccessLevel(6)    ReDim oSecurityAccessLevel(6)
         
   oSecurityAccessLevel(1).iLang = 44    oSecurityAccessLevel(1).iLang = 44
   oSecurityAccessLevel(1).iSecurityAccessLevel = dsControlledAccess    oSecurityAccessLevel(1).iSecurityAccessLevel = dsControlledAccess
   oSecurityAccessLevel(1).sSecurityAccessLevel = "Controlled access"    oSecurityAccessLevel(1).sSecurityAccessLevel = "Controlled access"
         
   oSecurityAccessLevel(2).iLang = 44    oSecurityAccessLevel(2).iLang = 44
   oSecurityAccessLevel(2).iSecurityAccessLevel = dsRestrictedAccess    oSecurityAccessLevel(2).iSecurityAccessLevel = dsRestrictedAccess
   oSecurityAccessLevel(2).sSecurityAccessLevel = "Restricted access"    oSecurityAccessLevel(2).sSecurityAccessLevel = "Restricted access"
         
   oSecurityAccessLevel(3).iLang = 44    oSecurityAccessLevel(3).iLang = 44
   oSecurityAccessLevel(3).iSecurityAccessLevel = dsConfidentialAccess    oSecurityAccessLevel(3).iSecurityAccessLevel = dsConfidentialAccess
   oSecurityAccessLevel(3).sSecurityAccessLevel = "Confidential access"    oSecurityAccessLevel(3).sSecurityAccessLevel = "Confidential access"
         
   oSecurityAccessLevel(4).iLang = 44    oSecurityAccessLevel(4).iLang = 44
   oSecurityAccessLevel(4).iSecurityAccessLevel = dsPrivateAccess    oSecurityAccessLevel(4).iSecurityAccessLevel = dsPrivateAccess
   oSecurityAccessLevel(4).sSecurityAccessLevel = "Private access"    oSecurityAccessLevel(4).sSecurityAccessLevel = "Private access"
         
   oSecurityAccessLevel(5).iLang = 44    oSecurityAccessLevel(5).iLang = 44
   oSecurityAccessLevel(5).iSecurityAccessLevel = dsPublicAccess    oSecurityAccessLevel(5).iSecurityAccessLevel = dsPublicAccess
   oSecurityAccessLevel(5).sSecurityAccessLevel = "Public access"    oSecurityAccessLevel(5).sSecurityAccessLevel = "Public access"
         
   oSecurityAccessLevel(6).iLang = 44    oSecurityAccessLevel(6).iLang = 44
   oSecurityAccessLevel(6).iSecurityAccessLevel = -1 'Darstellung Filterobjekte    oSecurityAccessLevel(6).iSecurityAccessLevel = -1 'Darstellung Filterobjekte
   oSecurityAccessLevel(6).sSecurityAccessLevel = ""    oSecurityAccessLevel(6).sSecurityAccessLevel = ""
         
   ' tObjectProperties.Type    ' tObjectProperties.Type
   ReDim oObjectPropertiesType(6)    ReDim oObjectPropertiesType(6)
         
   oObjectPropertiesType(1).iLang = 44    oObjectPropertiesType(1).iLang = 44
   oObjectPropertiesType(1).iType = dsNumericObject    oObjectPropertiesType(1).iType = dsNumericObject
   oObjectPropertiesType(1).sType = "NumericObject"    oObjectPropertiesType(1).sType = "NumericObject"
   
   oObjectPropertiesType(2).iLang = 44    oObjectPropertiesType(2).iLang = 44
   oObjectPropertiesType(2).iType = dsCharacterObject    oObjectPropertiesType(2).iType = dsCharacterObject
   oObjectPropertiesType(2).sType = "CharacterObject"    oObjectPropertiesType(2).sType = "CharacterObject"
   
   oObjectPropertiesType(3).iLang = 44    oObjectPropertiesType(3).iLang = 44
   oObjectPropertiesType(3).iType = dsDateObject    oObjectPropertiesType(3).iType = dsDateObject
   oObjectPropertiesType(3).sType = "DateObject"    oObjectPropertiesType(3).sType = "DateObject"
   
   oObjectPropertiesType(4).iLang = 44    oObjectPropertiesType(4).iLang = 44
   oObjectPropertiesType(4).iType = dsBlobObject    oObjectPropertiesType(4).iType = dsBlobObject
   oObjectPropertiesType(4).sType = "BlobObject"    oObjectPropertiesType(4).sType = "BlobObject"
   
   oObjectPropertiesType(5).iLang = 44    oObjectPropertiesType(5).iLang = 44
   oObjectPropertiesType(5).iType = dsUnknownObject    oObjectPropertiesType(5).iType = dsUnknownObject
   oObjectPropertiesType(5).sType = "UnknownObject"    oObjectPropertiesType(5).sType = "UnknownObject"
   
   oObjectPropertiesType(6).iLang = 44    oObjectPropertiesType(6).iLang = 44
   oObjectPropertiesType(6).iType = dsNullObject    oObjectPropertiesType(6).iType = dsNullObject
   oObjectPropertiesType(6).sType = "NullObject"    oObjectPropertiesType(6).sType = "NullObject"
   
   ' tObjectKeys.Type    ' tObjectKeys.Type
   ReDim oObjectKeysType(2)    ReDim oObjectKeysType(2)
         
   oObjectKeysType(1).iLang = 44    oObjectKeysType(1).iLang = 44
   oObjectKeysType(1).iType = 0    oObjectKeysType(1).iType = 0
   oObjectKeysType(1).sType = "Primarz Key"    oObjectKeysType(1).sType = "Primarz Key"
   
   oObjectKeysType(2).iLang = 44    oObjectKeysType(2).iLang = 44
   oObjectKeysType(2).iType = 1    oObjectKeysType(2).iType = 1
   oObjectKeysType(2).sType = "Foreign Key"    oObjectKeysType(2).sType = "Foreign Key"
   
   ' tDependencies.Source    ' tDependencies.Source
   ReDim oSource(2)    ReDim oSource(2)
         
   oSource(1).iLang = 44    oSource(1).iLang = 44
   oSource(1).iSource = 1    oSource(1).iSource = 1
   oSource(1).sSource = "Select"    oSource(1).sSource = "Select"
         
   oSource(2).iLang = 44    oSource(2).iLang = 44
   oSource(2).iSource = 2    oSource(2).iSource = 2
   oSource(2).sSource = "Where"    oSource(2).sSource = "Where"
         
   'tTableColumn.Type    'tTableColumn.Type
   ReDim oTableColumnType(6)    ReDim oTableColumnType(6)
         
   oTableColumnType(1).iLang = 44    oTableColumnType(1).iLang = 44
   oTableColumnType(1).iTyp = dsNumericColumn    oTableColumnType(1).iTyp = dsNumericColumn
   oTableColumnType(1).sName = "NumericColumn"    oTableColumnType(1).sName = "NumericColumn"
         
   oTableColumnType(2).iLang = 44    oTableColumnType(2).iLang = 44
   oTableColumnType(2).iTyp = dsCharacterColumn    oTableColumnType(2).iTyp = dsCharacterColumn
   oTableColumnType(2).sName = "CharacterColumn"    oTableColumnType(2).sName = "CharacterColumn"
         
   oTableColumnType(3).iLang = 44    oTableColumnType(3).iLang = 44
   oTableColumnType(3).iTyp = dsDateColumn    oTableColumnType(3).iTyp = dsDateColumn
   oTableColumnType(3).sName = "DateColumn"    oTableColumnType(3).sName = "DateColumn"
         
   oTableColumnType(4).iLang = 44    oTableColumnType(4).iLang = 44
   oTableColumnType(4).iTyp = dsTextColumn    oTableColumnType(4).iTyp = dsTextColumn
   oTableColumnType(4).sName = "TextColumn"    oTableColumnType(4).sName = "TextColumn"
         
   oTableColumnType(5).iLang = 44    oTableColumnType(5).iLang = 44
   oTableColumnType(5).iTyp = dsUnknownColumn    oTableColumnType(5).iTyp = dsUnknownColumn
   oTableColumnType(5).sName = "UnknownColumn"    oTableColumnType(5).sName = "UnknownColumn"
         
   oTableColumnType(6).iLang = 44    oTableColumnType(6).iLang = 44
   oTableColumnType(6).iTyp = dsNullColumn    oTableColumnType(6).iTyp = dsNullColumn
   oTableColumnType(6).sName = "NullColumn"    oTableColumnType(6).sName = "NullColumn"
         
   ' tTableColumn.Key    ' tTableColumn.Key
   ReDim oTableColumnKey(6)    ReDim oTableColumnKey(6)
   ' no support found to assign description to keys    ' no support found to assign description to keys
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseClasses(oMyUnv As Designer.Universe) Private Sub GetUniverseClasses(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseClasses" sProcName = "GetUniverseClasses"
   
Dim oClass As Designer.Class Dim oClass As Designer.Class
'Dim oObject As designer.object 'Dim oObject As designer.object
   
Dim iObject As Integer Dim iObject As Integer
Dim iCondition As Integer Dim iCondition As Integer
Dim iKey As Integer Dim iKey As Integer
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
         
   If oMyUnv.Classes.Count = 0 Then Exit Sub    If oMyUnv.Classes.Count = 0 Then Exit Sub
         
   ReDim oClasses(0)    ReDim oClasses(0)
   ReDim oObjects(0)    ReDim oObjects(0)
   ReDim oObjectKeys(0)    ReDim oObjectKeys(0)
         
   oClasses(0).iId = 0    oClasses(0).iId = 0
   oClasses(0).iParentId = 0    oClasses(0).iParentId = 0
   oClasses(0).iCountClasses = oMyUnv.Classes.Count    oClasses(0).iCountClasses = oMyUnv.Classes.Count
   oClasses(0).sName = oMyUnv.Name    oClasses(0).sName = oMyUnv.Name
   oClasses(0).iLevel = 0    oClasses(0).iLevel = 0
         
   For Each oClass In oMyUnv.Classes    For Each oClass In oMyUnv.Classes
       ReDim Preserve oClasses(UBound(oClasses) + 1)        ReDim Preserve oClasses(UBound(oClasses) + 1)
       oClasses(UBound(oClasses)).iId = UBound(oClasses)        oClasses(UBound(oClasses)).iId = UBound(oClasses)
         oClasses(UBound(oClasses)).iBOClassId = oClass.ID  
       oClasses(UBound(oClasses)).iParentId = 0        oClasses(UBound(oClasses)).iParentId = 0
       oClasses(UBound(oClasses)).sName = oClass.Name        oClasses(UBound(oClasses)).sName = oClass.Name
       oClasses(UBound(oClasses)).iCountClasses = oClass.Classes.Count        oClasses(UBound(oClasses)).iCountClasses = oClass.Classes.Count
       oClasses(UBound(oClasses)).iLevel = 1        oClasses(UBound(oClasses)).iLevel = 1
       oClasses(UBound(oClasses)).sDescription = oClass.Description        oClasses(UBound(oClasses)).sDescription = oClass.Description
       oClasses(UBound(oClasses)).bIsVisible = oClass.Show        oClasses(UBound(oClasses)).bIsVisible = oClass.Show
                 
       For iObject = 1 To oClass.Objects.Count        For iObject = 1 To oClass.Objects.Count
           ReDim Preserve oObjects(UBound(oObjects) + 1)            ReDim Preserve oObjects(UBound(oObjects) + 1)
           oObjects(UBound(oObjects)).iId = UBound(oObjects)            oObjects(UBound(oObjects)).iId = UBound(oObjects)
           oObjects(UBound(oObjects)).sName = oClass.Objects(iObject).Name            oObjects(UBound(oObjects)).sName = oClass.Objects(iObject).Name
           oObjects(UBound(oObjects)).iObjectID = iObject            oObjects(UBound(oObjects)).iObjectID = iObject
             oObjects(UBound(oObjects)).iBOClassId = oClass.ID  
             oObjects(UBound(oObjects)).iBOObjectID = oClass.Objects(iObject).ID  
           oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId            oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId
           oObjects(UBound(oObjects)).sClassName = oClasses(UBound(oClasses)).sName            oObjects(UBound(oObjects)).sClassName = oClasses(UBound(oClasses)).sName
           oObjects(UBound(oObjects)).sDescription = oClass.Objects(iObject).Description            oObjects(UBound(oObjects)).sDescription = oClass.Objects(iObject).Description
           oObjects(UBound(oObjects)).sSelect = oClass.Objects(iObject).Select            oObjects(UBound(oObjects)).sSelect = oClass.Objects(iObject).Select
           oObjects(UBound(oObjects)).sWhere = oClass.Objects(iObject).Where            oObjects(UBound(oObjects)).sWhere = oClass.Objects(iObject).Where
           oObjects(UBound(oObjects)).iType = oClass.Objects(iObject).Type            oObjects(UBound(oObjects)).iType = oClass.Objects(iObject).Type
           'oObjects(UBound(oObjects)).iDataBaseFormat = oClass.Objects(iObject).DataBaseFormat            'oObjects(UBound(oObjects)).iDataBaseFormat = oClass.Objects(iObject).DataBaseFormat
           oObjects(UBound(oObjects)).iQualification = oClass.Objects(iObject).Qualification            oObjects(UBound(oObjects)).iQualification = oClass.Objects(iObject).Qualification
           oObjects(UBound(oObjects)).iAggregateFunction = oClass.Objects(iObject).AggregateFunction            oObjects(UBound(oObjects)).iAggregateFunction = oClass.Objects(iObject).AggregateFunction
           oObjects(UBound(oObjects)).bIsVisible = oClass.Objects(iObject).Show            oObjects(UBound(oObjects)).bIsVisible = oClass.Objects(iObject).Show
           oObjects(UBound(oObjects)).bCanBeUsedCondition = oClass.Objects(iObject).CanBeUsedCondition            oObjects(UBound(oObjects)).bCanBeUsedCondition = oClass.Objects(iObject).CanBeUsedCondition
           oObjects(UBound(oObjects)).bCanBeUsedResult = oClass.Objects(iObject).CanBeUsedResult            oObjects(UBound(oObjects)).bCanBeUsedResult = oClass.Objects(iObject).CanBeUsedResult
           oObjects(UBound(oObjects)).bCanBeUsedSort = oClass.Objects(iObject).CanBeUsedSort            oObjects(UBound(oObjects)).bCanBeUsedSort = oClass.Objects(iObject).CanBeUsedSort
           oObjects(UBound(oObjects)).bAllowUserToEditLov = oClass.Objects(iObject).AllowUserToEditLov            oObjects(UBound(oObjects)).bAllowUserToEditLov = oClass.Objects(iObject).AllowUserToEditLov
           oObjects(UBound(oObjects)).bAutomaticLovRefreshBeforeUse = oClass.Objects(iObject).AutomaticLovRefreshBeforeUse            oObjects(UBound(oObjects)).bAutomaticLovRefreshBeforeUse = oClass.Objects(iObject).AutomaticLovRefreshBeforeUse
           oObjects(UBound(oObjects)).bExportLovWithUniverse = oClass.Objects(iObject).ExportLovWithUniverse            oObjects(UBound(oObjects)).bExportLovWithUniverse = oClass.Objects(iObject).ExportLovWithUniverse
           oObjects(UBound(oObjects)).bHasListOfValues = oClass.Objects(iObject).HasListOfValues            oObjects(UBound(oObjects)).bHasListOfValues = oClass.Objects(iObject).HasListOfValues
           oObjects(UBound(oObjects)).iSecurityAccessLevel = oClass.Objects(iObject).SecurityAccessLevel            oObjects(UBound(oObjects)).iSecurityAccessLevel = oClass.Objects(iObject).SecurityAccessLevel
           oObjects(UBound(oObjects)).bUseHierarchicalDisplay = oClass.Objects(iObject).HierarchicalDisplay            oObjects(UBound(oObjects)).bUseHierarchicalDisplay = oClass.Objects(iObject).HierarchicalDisplay
           oObjects(UBound(oObjects)).sListOfValuesName = sGetListOfValues(oClass, iObject)            'oObjects(UBound(oObjects)).sListOfValuesName = sGetListOfValues(oClass, iObject)
           'oClass.Objects(iObject).ListOfValues.Name            'oClass.Objects(iObject).ListOfValues.Name
                 
           For iKey = 1 To oClass.Objects(iObject).Keys.Count            For iKey = 1 To oClass.Objects(iObject).Keys.Count
               ReDim Preserve oObjectKeys(UBound(oObjectKeys) + 1)                ReDim Preserve oObjectKeys(UBound(oObjectKeys) + 1)
               oObjectKeys(UBound(oObjectKeys)).iId = UBound(oObjectKeys)                oObjectKeys(UBound(oObjectKeys)).iId = UBound(oObjectKeys)
               oObjectKeys(UBound(oObjectKeys)).iClassId = oClasses(UBound(oClasses)).iId                oObjectKeys(UBound(oObjectKeys)).iClassId = oClasses(UBound(oClasses)).iId
               oObjectKeys(UBound(oObjectKeys)).iObjectID = oObjects(UBound(oObjects)).iId                oObjectKeys(UBound(oObjectKeys)).iObjectID = oObjects(UBound(oObjects)).iId
               oObjectKeys(UBound(oObjectKeys)).sClassName = oClasses(UBound(oClasses)).sName                oObjectKeys(UBound(oObjectKeys)).sClassName = oClasses(UBound(oClasses)).sName
               oObjectKeys(UBound(oObjectKeys)).sObjectName = oObjects(UBound(oObjects)).sName                oObjectKeys(UBound(oObjectKeys)).sObjectName = oObjects(UBound(oObjects)).sName
               oObjectKeys(UBound(oObjectKeys)).bEnable = oClass.Objects(iObject).Keys(iKey).Enable                oObjectKeys(UBound(oObjectKeys)).bEnable = oClass.Objects(iObject).Keys(iKey).Enable
               oObjectKeys(UBound(oObjectKeys)).iType = oClass.Objects(iObject).Keys(iKey).Type                oObjectKeys(UBound(oObjectKeys)).iType = oClass.Objects(iObject).Keys(iKey).Type
               oObjectKeys(UBound(oObjectKeys)).sSelect = oClass.Objects(iObject).Keys(iKey).Select                oObjectKeys(UBound(oObjectKeys)).sSelect = oClass.Objects(iObject).Keys(iKey).Select
               oObjectKeys(UBound(oObjectKeys)).sWhere = oClass.Objects(iObject).Keys(iKey).Where                oObjectKeys(UBound(oObjectKeys)).sWhere = oClass.Objects(iObject).Keys(iKey).Where
           Next iKey            Next iKey
       Next iObject        Next iObject
                 
       For iCondition = 1 To oClass.PredefinedConditions.Count        For iCondition = 1 To oClass.PredefinedConditions.Count
           ReDim Preserve oObjects(UBound(oObjects) + 1)            ReDim Preserve oObjects(UBound(oObjects) + 1)
           oObjects(UBound(oObjects)).iId = UBound(oObjects)            oObjects(UBound(oObjects)).iId = UBound(oObjects)
           oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId            oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId
           oObjects(UBound(oObjects)).sClassName = oClass.Name            oObjects(UBound(oObjects)).sClassName = oClass.Name
           oObjects(UBound(oObjects)).sName = oClass.PredefinedConditions(iCondition).Name            oObjects(UBound(oObjects)).sName = oClass.PredefinedConditions(iCondition).Name
           oObjects(UBound(oObjects)).iObjectID = iCondition            oObjects(UBound(oObjects)).iObjectID = iCondition
             oObjects(UBound(oObjects)).iBOClassId = oClass.ID  
             oObjects(UBound(oObjects)).iBOObjectID = oClass.PredefinedConditions(iCondition).ID  
           oObjects(UBound(oObjects)).sDescription = oClass.PredefinedConditions(iCondition).Description            oObjects(UBound(oObjects)).sDescription = oClass.PredefinedConditions(iCondition).Description
           oObjects(UBound(oObjects)).bIsVisible = oClass.PredefinedConditions(iCondition).Show            oObjects(UBound(oObjects)).bIsVisible = oClass.PredefinedConditions(iCondition).Show
           oObjects(UBound(oObjects)).sWhere = oClass.PredefinedConditions(iCondition).Where            oObjects(UBound(oObjects)).sWhere = oClass.PredefinedConditions(iCondition).Where
           oObjects(UBound(oObjects)).iQualification = 4            oObjects(UBound(oObjects)).iQualification = 4
           oObjects(UBound(oObjects)).iAggregateFunction = -1            oObjects(UBound(oObjects)).iAggregateFunction = -1
                         
       Next iCondition        Next iCondition
                                 
       If oClass.Classes.Count > 0 Then Call GetUniverseSubClasses(oClass, UBound(oClasses))        If oClass.Classes.Count > 0 Then Call GetUniverseSubClasses(oClass, UBound(oClasses))
                 
   Next oClass    Next oClass
   oUnvProp.iCountClasses = UBound(oClasses)    oUnvProp.iCountClasses = UBound(oClasses)
         
   For iObject = 1 To UBound(oObjects)    For iObject = 1 To UBound(oObjects)
       If oObjects(iObject).iQualification = 4 Then oUnvProp.iCountConditions = oUnvProp.iCountConditions + 1        If oObjects(iObject).iQualification = 4 Then oUnvProp.iCountConditions = oUnvProp.iCountConditions + 1
   Next iObject    Next iObject
   oUnvProp.iCountObjects = UBound(oObjects) - oUnvProp.iCountConditions    oUnvProp.iCountObjects = UBound(oObjects) - oUnvProp.iCountConditions
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Function sGetListOfValues(oMyClass As Designer.Class, iMyObject As Integer) As String Private Function sGetListOfValues(oMyClass As Designer.Class, iMyObject As Integer) As String
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseSubClasses" sProcName = "GetUniverseSubClasses"
   
On Error GoTo Err On Error GoTo Err
   sGetListOfValues = oMyClass.Objects(iMyObject).ListOfValues.Name    sGetListOfValues = oMyClass.Objects(iMyObject).ListOfValues.Name
   Exit Function    Exit Function
Err: Err:
   sGetListOfValues = ""    sGetListOfValues = ""
End Function End Function
Private Sub GetUniverseSubClasses(oMyClass As Designer.Class, iMyId As Integer) Private Sub GetUniverseSubClasses(oMyClass As Designer.Class, iMyId As Integer)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseSubClasses" sProcName = "GetUniverseSubClasses"
   
Dim oClass As Designer.Class Dim oClass As Designer.Class
   
Dim iObject As Integer Dim iObject As Integer
Dim iCondition As Integer Dim iCondition As Integer
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
         
   For Each oClass In oMyClass.Classes    For Each oClass In oMyClass.Classes
       ReDim Preserve oClasses(UBound(oClasses) + 1)        ReDim Preserve oClasses(UBound(oClasses) + 1)
       oClasses(UBound(oClasses)).iId = UBound(oClasses)        oClasses(UBound(oClasses)).iId = UBound(oClasses)
                 oClasses(UBound(oClasses)).iBOClassId = oClass.ID  
       oClasses(UBound(oClasses)).iParentId = iMyId        oClasses(UBound(oClasses)).iParentId = iMyId
       oClasses(UBound(oClasses)).sName = oClass.Name        oClasses(UBound(oClasses)).sName = oClass.Name
       oClasses(UBound(oClasses)).iCountClasses = oClass.Classes.Count        oClasses(UBound(oClasses)).iCountClasses = oClass.Classes.Count
       oClasses(UBound(oClasses)).iLevel = oClasses(iMyId).iLevel + 1        oClasses(UBound(oClasses)).iLevel = oClasses(iMyId).iLevel + 1
       oClasses(UBound(oClasses)).sDescription = oClass.Description        oClasses(UBound(oClasses)).sDescription = oClass.Description
       oClasses(UBound(oClasses)).bIsVisible = oClass.Show        oClasses(UBound(oClasses)).bIsVisible = oClass.Show
                 
       For iObject = 1 To oClass.Objects.Count        For iObject = 1 To oClass.Objects.Count
           ReDim Preserve oObjects(UBound(oObjects) + 1)            ReDim Preserve oObjects(UBound(oObjects) + 1)
                         
           oObjects(UBound(oObjects)).iId = UBound(oObjects)            oObjects(UBound(oObjects)).iId = UBound(oObjects)
           oObjects(UBound(oObjects)).sName = oClass.Objects(iObject).Name            oObjects(UBound(oObjects)).sName = oClass.Objects(iObject).Name
           oObjects(UBound(oObjects)).iObjectID = iObject            oObjects(UBound(oObjects)).iObjectID = iObject
             oObjects(UBound(oObjects)).iBOClassId = oClass.ID  
             oObjects(UBound(oObjects)).iBOObjectID = oClass.Objects(iObject).ID  
           oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId            oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId
           oObjects(UBound(oObjects)).sClassName = oClasses(UBound(oClasses)).sName            oObjects(UBound(oObjects)).sClassName = oClasses(UBound(oClasses)).sName
           oObjects(UBound(oObjects)).sDescription = oClass.Objects(iObject).Description            oObjects(UBound(oObjects)).sDescription = oClass.Objects(iObject).Description
           oObjects(UBound(oObjects)).sSelect = oClass.Objects(iObject).Select            oObjects(UBound(oObjects)).sSelect = oClass.Objects(iObject).Select
           oObjects(UBound(oObjects)).sWhere = oClass.Objects(iObject).Where            oObjects(UBound(oObjects)).sWhere = oClass.Objects(iObject).Where
           oObjects(UBound(oObjects)).iType = oClass.Objects(iObject).Type            oObjects(UBound(oObjects)).iType = oClass.Objects(iObject).Type
           'oObjects(UBound(oObjects)).iDataBaseFormat = oClass.Objects(iObject).DataBaseFormat            'oObjects(UBound(oObjects)).iDataBaseFormat = oClass.Objects(iObject).DataBaseFormat
           oObjects(UBound(oObjects)).iQualification = oClass.Objects(iObject).Qualification            oObjects(UBound(oObjects)).iQualification = oClass.Objects(iObject).Qualification
           oObjects(UBound(oObjects)).iAggregateFunction = oClass.Objects(iObject).AggregateFunction            oObjects(UBound(oObjects)).iAggregateFunction = oClass.Objects(iObject).AggregateFunction
           oObjects(UBound(oObjects)).bIsVisible = oClass.Objects(iObject).Show            oObjects(UBound(oObjects)).bIsVisible = oClass.Objects(iObject).Show
           oObjects(UBound(oObjects)).bCanBeUsedCondition = oClass.Objects(iObject).CanBeUsedCondition            oObjects(UBound(oObjects)).bCanBeUsedCondition = oClass.Objects(iObject).CanBeUsedCondition
           oObjects(UBound(oObjects)).bCanBeUsedResult = oClass.Objects(iObject).CanBeUsedResult            oObjects(UBound(oObjects)).bCanBeUsedResult = oClass.Objects(iObject).CanBeUsedResult
           oObjects(UBound(oObjects)).bCanBeUsedSort = oClass.Objects(iObject).CanBeUsedSort            oObjects(UBound(oObjects)).bCanBeUsedSort = oClass.Objects(iObject).CanBeUsedSort
           oObjects(UBound(oObjects)).bAllowUserToEditLov = oClass.Objects(iObject).AllowUserToEditLov            oObjects(UBound(oObjects)).bAllowUserToEditLov = oClass.Objects(iObject).AllowUserToEditLov
           oObjects(UBound(oObjects)).bAutomaticLovRefreshBeforeUse = oClass.Objects(iObject).AutomaticLovRefreshBeforeUse            oObjects(UBound(oObjects)).bAutomaticLovRefreshBeforeUse = oClass.Objects(iObject).AutomaticLovRefreshBeforeUse
           oObjects(UBound(oObjects)).bExportLovWithUniverse = oClass.Objects(iObject).ExportLovWithUniverse            oObjects(UBound(oObjects)).bExportLovWithUniverse = oClass.Objects(iObject).ExportLovWithUniverse
           oObjects(UBound(oObjects)).bHasListOfValues = oClass.Objects(iObject).HasListOfValues            oObjects(UBound(oObjects)).bHasListOfValues = oClass.Objects(iObject).HasListOfValues
           oObjects(UBound(oObjects)).iSecurityAccessLevel = oClass.Objects(iObject).SecurityAccessLevel            oObjects(UBound(oObjects)).iSecurityAccessLevel = oClass.Objects(iObject).SecurityAccessLevel
           oObjects(UBound(oObjects)).bUseHierarchicalDisplay = oClass.Objects(iObject).HierarchicalDisplay            oObjects(UBound(oObjects)).bUseHierarchicalDisplay = oClass.Objects(iObject).HierarchicalDisplay
           oObjects(UBound(oObjects)).sListOfValuesName = sGetListOfValues(oClass, iObject)            'oObjects(UBound(oObjects)).sListOfValuesName = sGetListOfValues(oClass, iObject)
           'oClass.Objects(iObject).ListOfValues.Name            'oClass.Objects(iObject).ListOfValues.Name
       Next iObject        Next iObject
                 
       For iCondition = 1 To oClass.PredefinedConditions.Count        For iCondition = 1 To oClass.PredefinedConditions.Count
           ReDim Preserve oObjects(UBound(oObjects) + 1)            ReDim Preserve oObjects(UBound(oObjects) + 1)
           oObjects(UBound(oObjects)).iId = UBound(oObjects)            oObjects(UBound(oObjects)).iId = UBound(oObjects)
           oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId            oObjects(UBound(oObjects)).iClassId = oClasses(UBound(oClasses)).iId
           oObjects(UBound(oObjects)).sClassName = oClass.Name            oObjects(UBound(oObjects)).sClassName = oClass.Name
           oObjects(UBound(oObjects)).iObjectID = iCondition            oObjects(UBound(oObjects)).iObjectID = iCondition
             oObjects(UBound(oObjects)).iBOClassId = oClass.ID  
             oObjects(UBound(oObjects)).iBOObjectID = oClass.PredefinedConditions(iCondition).ID  
           oObjects(UBound(oObjects)).sName = oClass.PredefinedConditions(iCondition).Name            oObjects(UBound(oObjects)).sName = oClass.PredefinedConditions(iCondition).Name
           oObjects(UBound(oObjects)).sDescription = oClass.PredefinedConditions(iCondition).Description            oObjects(UBound(oObjects)).sDescription = oClass.PredefinedConditions(iCondition).Description
           oObjects(UBound(oObjects)).bIsVisible = oClass.PredefinedConditions(iCondition).Show            oObjects(UBound(oObjects)).bIsVisible = oClass.PredefinedConditions(iCondition).Show
           oObjects(UBound(oObjects)).sWhere = oClass.PredefinedConditions(iCondition).Where            oObjects(UBound(oObjects)).sWhere = oClass.PredefinedConditions(iCondition).Where
           oObjects(UBound(oObjects)).iQualification = 4            oObjects(UBound(oObjects)).iQualification = 4
           oObjects(UBound(oObjects)).iAggregateFunction = -1            oObjects(UBound(oObjects)).iAggregateFunction = -1
           oObjects(UBound(oObjects)).iSecurityAccessLevel = -1            oObjects(UBound(oObjects)).iSecurityAccessLevel = -1
       Next iCondition        Next iCondition
                 
       If oClass.Classes.Count > 0 Then Call GetUniverseSubClasses(oClass, UBound(oClasses))        If oClass.Classes.Count > 0 Then Call GetUniverseSubClasses(oClass, UBound(oClasses))
   Next oClass    Next oClass
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseParameter(oMyUnv As Designer.Universe) Private Sub GetUniverseParameter(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseParameter" sProcName = "GetUniverseParameter"
   
Dim iUnvParams As Integer Dim iUnvParams As Integer
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
   
   oUnvProp.sName = oMyUnv.Name    oUnvProp.sName = oMyUnv.Name
   oUnvProp.sLongName = oMyUnv.LongName    oUnvProp.sLongName = oMyUnv.LongName
   oUnvProp.sPath = oMyUnv.Path    oUnvProp.sPath = oMyUnv.Path
   oUnvProp.sAuthor = oMyUnv.Author    oUnvProp.sAuthor = oMyUnv.Author
   oUnvProp.sCreate = oMyUnv.CreationDate    oUnvProp.sCreate = oMyUnv.CreationDate
   oUnvProp.sChanged = oMyUnv.ModificationDate    oUnvProp.sChanged = oMyUnv.ModificationDate
   oUnvProp.dImported = Now    oUnvProp.dImported = Now
   oUnvProp.sVersion = oMyUnv.RevisionNumber    oUnvProp.sVersion = oMyUnv.RevisionNumber
   oUnvProp.sConnection = oMyUnv.Connection    oUnvProp.sConnection = oMyUnv.Connection
   oUnvProp.sDescription = oMyUnv.Description    oUnvProp.sDescription = oMyUnv.Description
   oUnvProp.sComment = oMyUnv.Comments    oUnvProp.sComment = oMyUnv.Comments
'    oUnvProp.iCountClasses = Null '    oUnvProp.iCountClasses = Null
'    oUnvProp.iCountObjects = Null '    oUnvProp.iCountObjects = Null
'    oUnvProp.iCountConditions = Null '    oUnvProp.iCountConditions = Null
'    oUnvProp.iCountTables = Null '    oUnvProp.iCountTables = Null
'    oUnvProp.iCountAliases = Null '    oUnvProp.iCountAliases = Null
   oUnvProp.iCountJoins = oMyUnv.Joins.Count    oUnvProp.iCountJoins = oMyUnv.Joins.Count
   oUnvProp.iCountContexts = oMyUnv.Contexts.Count    oUnvProp.iCountContexts = oMyUnv.Contexts.Count
   oUnvProp.iCountHierachies = oMyUnv.CustomHierarchies.Count    oUnvProp.iCountHierachies = oMyUnv.CustomHierarchies.Count
         
   oUnvProp.bLimitExecutionTime = oMyUnv.ControlOption.LimitExecutionTime    oUnvProp.bLimitExecutionTime = oMyUnv.ControlOption.LimitExecutionTime
   oUnvProp.dblLimitExecutionTimeValue = oMyUnv.ControlOption.LimitExecutionTimeValue    oUnvProp.dblLimitExecutionTimeValue = oMyUnv.ControlOption.LimitExecutionTimeValue
   oUnvProp.bLimitSizeofResultSet = oMyUnv.ControlOption.LimitSizeofResultSet    oUnvProp.bLimitSizeofResultSet = oMyUnv.ControlOption.LimitSizeofResultSet
   oUnvProp.dblLimitSizeofResultSetValue = oMyUnv.ControlOption.LimitSizeofResultSetValue    oUnvProp.dblLimitSizeofResultSetValue = oMyUnv.ControlOption.LimitSizeofResultSetValue
   oUnvProp.bWarnIfCostEstimateExceeded = oMyUnv.ControlOption.WarnIfCostEstimateExceeded    oUnvProp.bWarnIfCostEstimateExceeded = oMyUnv.ControlOption.WarnIfCostEstimateExceeded
   oUnvProp.dblCostEstimateExceededValue = oMyUnv.ControlOption.CostEstimateExceededValue    oUnvProp.dblCostEstimateExceededValue = oMyUnv.ControlOption.CostEstimateExceededValue
   oUnvProp.bLimitSizeOfLongTextObject = oMyUnv.ControlOption.LimitSizeOfLongTextObject    oUnvProp.bLimitSizeOfLongTextObject = oMyUnv.ControlOption.LimitSizeOfLongTextObject
   oUnvProp.dblLimitSizeOfLongTextObjectValue = oMyUnv.ControlOption.LimitSizeOfLongTextObjectValue    oUnvProp.dblLimitSizeOfLongTextObjectValue = oMyUnv.ControlOption.LimitSizeOfLongTextObjectValue
   oUnvProp.bSQLComplexOperators = oMyUnv.SQLOption.ComplexOperators    oUnvProp.bSQLComplexOperators = oMyUnv.SQLOption.ComplexOperators
   oUnvProp.bSQLMultipleSQLForContext = oMyUnv.SQLOption.MultipleSQLForContext    oUnvProp.bSQLMultipleSQLForContext = oMyUnv.SQLOption.MultipleSQLForContext
   oUnvProp.bSQLMultipleSQLForMeasure = oMyUnv.SQLOption.MultipleSQLForMeasure    oUnvProp.bSQLMultipleSQLForMeasure = oMyUnv.SQLOption.MultipleSQLForMeasure
   oUnvProp.bSQLOperators = oMyUnv.SQLOption.Operators    oUnvProp.bSQLOperators = oMyUnv.SQLOption.Operators
   oUnvProp.bSQLPreventCartesianProducts = oMyUnv.SQLOption.PreventCartesianProducts    oUnvProp.bSQLPreventCartesianProducts = oMyUnv.SQLOption.PreventCartesianProducts
   oUnvProp.bSQLSelectMultipleContexts = oMyUnv.SQLOption.SelectMultipleContexts    oUnvProp.bSQLSelectMultipleContexts = oMyUnv.SQLOption.SelectMultipleContexts
   oUnvProp.bSQLSubQueries = oMyUnv.SQLOption.SubQueries    oUnvProp.bSQLSubQueries = oMyUnv.SQLOption.SubQueries
         
   Select Case oMyUnv.CurrentObjectStrategy    Select Case oMyUnv.CurrentObjectStrategy
       Case "Standard-Umbenennung", "(Build in) Standard Renaming", "0"        Case "Standard-Umbenennung", "(Build in) Standard Renaming", "0"
           oUnvProp.iCurrentObjectStrategy = 0            oUnvProp.iCurrentObjectStrategy = 0
       Case Else        Case Else
           oUnvProp.iCurrentObjectStrategy = -1            oUnvProp.iCurrentObjectStrategy = -1
   End Select    End Select
         
   Select Case oMyUnv.CurrentJoinStrategy    Select Case oMyUnv.CurrentJoinStrategy
       Case "Manuell bearbeiten (keine automatische Erstellung)", "Edit Manually (none)", "0"        Case "Manuell bearbeiten (keine automatische Erstellung)", "Edit Manually (none)", "0"
           oUnvProp.iCurrentJoinStrategy = 0            oUnvProp.iCurrentJoinStrategy = 0
       Case "1"        Case "1"
           oUnvProp.iCurrentJoinStrategy = 1            oUnvProp.iCurrentJoinStrategy = 1
       Case "2"        Case "2"
           oUnvProp.iCurrentJoinStrategy = 2            oUnvProp.iCurrentJoinStrategy = 2
       Case "3"        Case "3"
           oUnvProp.iCurrentJoinStrategy = 3            oUnvProp.iCurrentJoinStrategy = 3
       Case Else        Case Else
           oUnvProp.iCurrentJoinStrategy = -1            oUnvProp.iCurrentJoinStrategy = -1
   End Select    End Select
                 
   Select Case oMyUnv.CurrentTableStrategy    Select Case oMyUnv.CurrentTableStrategy
       Case "Standard (Integriert)", "0"        Case "Standard (Integriert)", "0"
           oUnvProp.iCurrentTableStrategy = 0            oUnvProp.iCurrentTableStrategy = 0
       Case Else        Case Else
           oUnvProp.iCurrentTableStrategy = -1            oUnvProp.iCurrentTableStrategy = -1
   End Select    End Select
         
   For iUnvParams = 1 To oMyUnv.Parameters.Count    For iUnvParams = 1 To oMyUnv.Parameters.Count
       ReDim Preserve oUnvParams(iUnvParams)        ReDim Preserve oUnvParams(iUnvParams)
       oUnvParams(iUnvParams).sName = oMyUnv.Parameters(iUnvParams).Name        oUnvParams(iUnvParams).sName = oMyUnv.Parameters(iUnvParams).Name
       oUnvParams(iUnvParams).sValue = oMyUnv.Parameters(iUnvParams).Value        oUnvParams(iUnvParams).sValue = oMyUnv.Parameters(iUnvParams).Value
   Next iUnvParams    Next iUnvParams
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseTables(oMyUnv As Designer.Universe) Private Sub GetUniverseTables(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseTables" sProcName = "GetUniverseTables"
   
Dim oTable As Designer.Table Dim oTable As Designer.Table
Dim iTable As Integer Dim iTable As Integer
Dim iTable2 As Integer Dim iTable2 As Integer
Dim bExistAlready As Boolean Dim bExistAlready As Boolean
   
Dim iIncompatible As Integer Dim iIncompatible As Integer
Dim sClassName As String Dim sClassName As String
Dim sObjectName As String Dim sObjectName As String
Dim iObject As Integer Dim iObject As Integer
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
   
   ReDim oTables(0)    ReDim oTables(0)
   ReDim oIncombatibilities(0)    ReDim oIncombatibilities(0)
   ReDim oOriginalTables(0)    ReDim oOriginalTables(0)
   
   ' lese alle tabellen    ' lese alle tabellen
   For iTable = 1 To oMyUnv.Tables.Count    For iTable = 1 To oMyUnv.Tables.Count
       ReDim Preserve oTables(UBound(oTables) + 1)        ReDim Preserve oTables(UBound(oTables) + 1)
       oTables(UBound(oTables)).iId = UBound(oTables)        oTables(UBound(oTables)).iId = UBound(oTables)
       oTables(UBound(oTables)).sName = oMyUnv.Tables(iTable).Name        oTables(UBound(oTables)).sName = oMyUnv.Tables(iTable).Name
       oTables(UBound(oTables)).bIsAlias = oMyUnv.Tables(iTable).IsAlias        oTables(UBound(oTables)).bIsAlias = oMyUnv.Tables(iTable).IsAlias
       oTables(UBound(oTables)).iCountColumns = oMyUnv.Tables(iTable).Columns.Count        oTables(UBound(oTables)).iCountColumns = oMyUnv.Tables(iTable).Columns.Count
       oTables(UBound(oTables)).iCountIncompatibleObjects = oMyUnv.Tables(iTable).IncompatibleObjects.Count        oTables(UBound(oTables)).iCountIncompatibleObjects = oMyUnv.Tables(iTable).IncompatibleObjects.Count
       oTables(UBound(oTables)).iCountIncompatiblePredefConditions = oMyUnv.Tables(iTable).IncompatiblePredefConditions.Count        oTables(UBound(oTables)).iCountIncompatiblePredefConditions = oMyUnv.Tables(iTable).IncompatiblePredefConditions.Count
       oTables(UBound(oTables)).bIsDerived = oMyUnv.Tables(iTable).IsDerived        oTables(UBound(oTables)).bIsDerived = oMyUnv.Tables(iTable).IsDerived
       oTables(UBound(oTables)).sOriginalTable = IIf(sGetOriginalTable(iTable, oMyUnv) = "", oTables(UBound(oTables)).sName, sGetOriginalTable(iTable, oMyUnv))        oTables(UBound(oTables)).sOriginalTable = IIf(sGetOriginalTable(iTable, oMyUnv) = "", oTables(UBound(oTables)).sName, sGetOriginalTable(iTable, oMyUnv))
       oTables(UBound(oTables)).sSqlOfDerivedTable = oMyUnv.Tables(iTable).SqlOfDerivedTable        oTables(UBound(oTables)).sSqlOfDerivedTable = oMyUnv.Tables(iTable).SqlOfDerivedTable
       oTables(UBound(oTables)).sSqlOfDerivedTableWithAlias = oMyUnv.Tables(iTable).SqlOfDerivedTableWithAlias        oTables(UBound(oTables)).sSqlOfDerivedTableWithAlias = oMyUnv.Tables(iTable).SqlOfDerivedTableWithAlias
       oTables(UBound(oTables)).dblWeight = oMyUnv.Tables(iTable).Weight        oTables(UBound(oTables)).dblWeight = oMyUnv.Tables(iTable).Weight
                 
       If oControl.bExecIncomb Then        If oControl.bExecIncomb Then
           ' read incombatibility table to object definition            ' read incombatibility table to object definition
           For iIncompatible = 1 To oMyUnv.Tables(iTable).IncompatibleObjects.Count            For iIncompatible = 1 To oMyUnv.Tables(iTable).IncompatibleObjects.Count
               ReDim Preserve oIncombatibilities(UBound(oIncombatibilities) + 1)                ReDim Preserve oIncombatibilities(UBound(oIncombatibilities) + 1)
                                 
               sClassName = oMyUnv.Tables(iTable).IncompatibleObjects(iIncompatible).RootClass                sClassName = oMyUnv.Tables(iTable).IncompatibleObjects(iIncompatible).RootClass
               sObjectName = oMyUnv.Tables(iTable).IncompatibleObjects(iIncompatible).Name                sObjectName = oMyUnv.Tables(iTable).IncompatibleObjects(iIncompatible).Name
               iObject = iGetObjectID(sClassName, sObjectName)                iObject = iGetObjectID(sClassName, sObjectName)
                                 
               oIncombatibilities(UBound(oIncombatibilities)).iIncId = UBound(oIncombatibilities)                oIncombatibilities(UBound(oIncombatibilities)).iIncId = UBound(oIncombatibilities)
               oIncombatibilities(UBound(oIncombatibilities)).iTableId = UBound(oTables)                oIncombatibilities(UBound(oIncombatibilities)).iTableId = UBound(oTables)
               oIncombatibilities(UBound(oIncombatibilities)).iClassId = oObjects(iObject).iClassId                oIncombatibilities(UBound(oIncombatibilities)).iClassId = oObjects(iObject).iClassId
               oIncombatibilities(UBound(oIncombatibilities)).iObjectID = iObject                oIncombatibilities(UBound(oIncombatibilities)).iObjectID = iObject
               oIncombatibilities(UBound(oIncombatibilities)).sTableName = oTables(UBound(oTables)).sName                oIncombatibilities(UBound(oIncombatibilities)).sTableName = oTables(UBound(oTables)).sName
               oIncombatibilities(UBound(oIncombatibilities)).sClassName = oObjects(iObject).sClassName                oIncombatibilities(UBound(oIncombatibilities)).sClassName = oObjects(iObject).sClassName
               oIncombatibilities(UBound(oIncombatibilities)).sObjectName = oObjects(iObject).sName                oIncombatibilities(UBound(oIncombatibilities)).sObjectName = oObjects(iObject).sName
           Next iIncompatible            Next iIncompatible
                         
           ' read incombatibility table to condition definition            ' read incombatibility table to condition definition
           For iIncompatible = 1 To oMyUnv.Tables(iTable).IncompatiblePredefConditions.Count            For iIncompatible = 1 To oMyUnv.Tables(iTable).IncompatiblePredefConditions.Count
               ReDim Preserve oIncombatibilities(UBound(oIncombatibilities) + 1)                ReDim Preserve oIncombatibilities(UBound(oIncombatibilities) + 1)
                                 
               sClassName = oMyUnv.Tables(iTable).IncompatiblePredefConditions(iIncompatible).RootClass                sClassName = oMyUnv.Tables(iTable).IncompatiblePredefConditions(iIncompatible).RootClass
               sObjectName = oMyUnv.Tables(iTable).IncompatiblePredefConditions(iIncompatible).Name                sObjectName = oMyUnv.Tables(iTable).IncompatiblePredefConditions(iIncompatible).Name
               iObject = iGetObjectID(sClassName, sObjectName)                iObject = iGetObjectID(sClassName, sObjectName)
                                 
               oIncombatibilities(UBound(oIncombatibilities)).iIncId = UBound(oIncombatibilities)                oIncombatibilities(UBound(oIncombatibilities)).iIncId = UBound(oIncombatibilities)
               oIncombatibilities(UBound(oIncombatibilities)).iTableId = UBound(oTables)                oIncombatibilities(UBound(oIncombatibilities)).iTableId = UBound(oTables)
               oIncombatibilities(UBound(oIncombatibilities)).iClassId = oObjects(iObject).iClassId                oIncombatibilities(UBound(oIncombatibilities)).iClassId = oObjects(iObject).iClassId
               oIncombatibilities(UBound(oIncombatibilities)).iObjectID = iObject                oIncombatibilities(UBound(oIncombatibilities)).iObjectID = iObject
               oIncombatibilities(UBound(oIncombatibilities)).sTableName = oTables(UBound(oTables)).sName                oIncombatibilities(UBound(oIncombatibilities)).sTableName = oTables(UBound(oTables)).sName
               oIncombatibilities(UBound(oIncombatibilities)).sClassName = oObjects(iObject).sClassName                oIncombatibilities(UBound(oIncombatibilities)).sClassName = oObjects(iObject).sClassName
               oIncombatibilities(UBound(oIncombatibilities)).sObjectName = oObjects(iObject).sName                oIncombatibilities(UBound(oIncombatibilities)).sObjectName = oObjects(iObject).sName
           Next iIncompatible            Next iIncompatible
       End If        End If
   Next iTable    Next iTable
         
   ' lese distinct der original tabellen    ' lese distinct der original tabellen
         
   For iTable = 1 To UBound(oTables)    For iTable = 1 To UBound(oTables)
       bExistAlready = False        bExistAlready = False
       For iTable2 = 1 To UBound(oOriginalTables)        For iTable2 = 1 To UBound(oOriginalTables)
           If oOriginalTables(iTable2).sName = oTables(iTable).sOriginalTable Then bExistAlready = True            If oOriginalTables(iTable2).sName = oTables(iTable).sOriginalTable Then bExistAlready = True
       Next iTable2        Next iTable2
       If bExistAlready = False Then        If bExistAlready = False Then
           ReDim Preserve oOriginalTables(UBound(oOriginalTables) + 1)            ReDim Preserve oOriginalTables(UBound(oOriginalTables) + 1)
           oOriginalTables(UBound(oOriginalTables)).iId = UBound(oOriginalTables)            oOriginalTables(UBound(oOriginalTables)).iId = UBound(oOriginalTables)
           oOriginalTables(UBound(oOriginalTables)).sName = oTables(iTable).sOriginalTable            oOriginalTables(UBound(oOriginalTables)).sName = oTables(iTable).sOriginalTable
       End If        End If
   Next iTable    Next iTable
         
   ' schreibe id der original table    ' schreibe id der original table
   For iTable = 1 To UBound(oTables)    For iTable = 1 To UBound(oTables)
       For iTable2 = 1 To UBound(oOriginalTables)        For iTable2 = 1 To UBound(oOriginalTables)
           If oTables(iTable).sOriginalTable = oOriginalTables(iTable2).sName Then oTables(iTable).iIdOriginalTable = oOriginalTables(iTable2).iId            If oTables(iTable).sOriginalTable = oOriginalTables(iTable2).sName Then oTables(iTable).iIdOriginalTable = oOriginalTables(iTable2).iId
       Next iTable2        Next iTable2
   Next iTable    Next iTable
   oUnvProp.iCountTables = UBound(oOriginalTables)    oUnvProp.iCountTables = UBound(oOriginalTables)
   oUnvProp.iCountAliases = UBound(oTables) - UBound(oOriginalTables)    oUnvProp.iCountAliases = UBound(oTables) - UBound(oOriginalTables)
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseTableColumns(oMyUnv As Designer.Universe) Private Sub GetUniverseTableColumns(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseTableColumns" sProcName = "GetUniverseTableColumns"
   
Dim iTable As Integer Dim iTable As Integer
Dim iColumn As Integer Dim iColumn As Integer
   
Dim oTable As Designer.Table Dim oTable As Designer.Table
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
         
   ReDim oTableColumns(0)    ReDim oTableColumns(0)
   For iTable = 1 To UBound(oOriginalTables)    For iTable = 1 To UBound(oOriginalTables)
       Set oTable = oMyUnv.Tables(iGetTableID(oOriginalTables(iTable).sName, oMyUnv))        Set oTable = oMyUnv.Tables(iGetTableID(oOriginalTables(iTable).sName, oMyUnv))
           For iColumn = 1 To oTable.Columns.Count            For iColumn = 1 To oTable.Columns.Count
                                 
               ReDim Preserve oTableColumns(UBound(oTableColumns) + 1)                ReDim Preserve oTableColumns(UBound(oTableColumns) + 1)
                                 
               oTableColumns(UBound(oTableColumns)).iId = UBound(oTableColumns)                oTableColumns(UBound(oTableColumns)).iId = UBound(oTableColumns)
               oTableColumns(UBound(oTableColumns)).iTableId = oOriginalTables(iTable).iId                oTableColumns(UBound(oTableColumns)).iTableId = oOriginalTables(iTable).iId
               oTableColumns(UBound(oTableColumns)).sTableName = oOriginalTables(iTable).sName                oTableColumns(UBound(oTableColumns)).sTableName = oOriginalTables(iTable).sName
                                 
               oTableColumns(UBound(oTableColumns)).sName = oTable.Columns(iColumn).Name                oTableColumns(UBound(oTableColumns)).sName = oTable.Columns(iColumn).Name
               oTableColumns(UBound(oTableColumns)).iType = oTable.Columns(iColumn).Type                oTableColumns(UBound(oTableColumns)).iType = oTable.Columns(iColumn).Type
               oTableColumns(UBound(oTableColumns)).iKey = oTable.Columns(iColumn).Key                oTableColumns(UBound(oTableColumns)).iKey = oTable.Columns(iColumn).Key
           Next iColumn            Next iColumn
       Set oTable = Nothing        Set oTable = Nothing
   Next iTable    Next iTable
   
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseContexts(oMyUnv As Designer.Universe) Private Sub GetUniverseContexts(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseContexts" sProcName = "GetUniverseContexts"
   
Dim iJoin As Integer Dim iJoin As Integer
Dim iCount As Integer Dim iCount As Integer
   
Dim oContext As Designer.Context Dim oContext As Designer.Context
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
         
   ReDim oContexts(0)    ReDim oContexts(0)
         
   For Each oContext In oMyUnv.Contexts    For Each oContext In oMyUnv.Contexts
       For iJoin = 1 To oContext.Joins.Count        For iJoin = 1 To oContext.Joins.Count
           For iCount = 1 To oContext.Joins(iJoin).FirstColumns.Count            For iCount = 1 To oContext.Joins(iJoin).FirstColumns.Count
               ReDim Preserve oContexts(UBound(oContexts) + 1)                ReDim Preserve oContexts(UBound(oContexts) + 1)
               On Error Resume Next                On Error Resume Next
               oContexts(UBound(oContexts)).iId = UBound(oContexts)                oContexts(UBound(oContexts)).iId = UBound(oContexts)
               oContexts(UBound(oContexts)).sName = oContext.Name                oContexts(UBound(oContexts)).sName = oContext.Name
               oContexts(UBound(oContexts)).sDescription = oContext.Description                oContexts(UBound(oContexts)).sDescription = oContext.Description
               oContexts(UBound(oContexts)).sFirstTable = oContext.Joins(iJoin).FirstTable.Name                oContexts(UBound(oContexts)).sFirstTable = oContext.Joins(iJoin).FirstTable.Name
               oContexts(UBound(oContexts)).sFirstColumn = oContext.Joins(iJoin).FirstColumns(iCount).Name                oContexts(UBound(oContexts)).sFirstColumn = oContext.Joins(iJoin).FirstColumns(iCount).Name
               oContexts(UBound(oContexts)).sSecondTable = oContext.Joins(iJoin).SecondTable.Name                oContexts(UBound(oContexts)).sSecondTable = oContext.Joins(iJoin).SecondTable.Name
               oContexts(UBound(oContexts)).sSecondColumn = oContext.Joins(iJoin).SecondColumns(iCount).Name                oContexts(UBound(oContexts)).sSecondColumn = oContext.Joins(iJoin).SecondColumns(iCount).Name
               oContexts(UBound(oContexts)).sExpression = oContext.Joins(iJoin).Expression                oContexts(UBound(oContexts)).sExpression = oContext.Joins(iJoin).Expression
           Next iCount            Next iCount
       Next iJoin        Next iJoin
   Next oContext    Next oContext
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetUniverseJoins(oMyUnv As Designer.Universe) Private Sub GetUniverseJoins(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseJoins" sProcName = "GetUniverseJoins"
   
Dim iJoin As Integer Dim iJoin As Integer
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
         
   ReDim oJoins(oMyUnv.Joins.Count)    ReDim oJoins(oMyUnv.Joins.Count)
   For iJoin = 1 To oMyUnv.Joins.Count    For iJoin = 1 To oMyUnv.Joins.Count
       oJoins(iJoin).iJoinId = iJoin        oJoins(iJoin).iJoinId = iJoin
         oJoins(iJoin).iBOJoinId = oMyUnv.Joins(iJoin).ID  
       oJoins(iJoin).iOuterJoin = oMyUnv.Joins(iJoin).OuterJoin        oJoins(iJoin).iOuterJoin = oMyUnv.Joins(iJoin).OuterJoin
       oJoins(iJoin).bShortCut = oMyUnv.Joins(iJoin).ShortCut        oJoins(iJoin).bShortCut = oMyUnv.Joins(iJoin).ShortCut
       oJoins(iJoin).iCardinality = oMyUnv.Joins(iJoin).Cardinality        oJoins(iJoin).iCardinality = oMyUnv.Joins(iJoin).Cardinality
       oJoins(iJoin).sExpression = oMyUnv.Joins(iJoin).Expression        oJoins(iJoin).sExpression = oMyUnv.Joins(iJoin).Expression
   Next iJoin    Next iJoin
   
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Function iGetTableID(sMyName As String, oMyUnv As Designer.Universe) As Integer Private Function iGetTableID(sMyName As String, oMyUnv As Designer.Universe) As Integer
Dim sProcName As String Dim sProcName As String
sProcName = "iGetTableID" sProcName = "iGetTableID"
   
Dim iTab As Integer Dim iTab As Integer
   
On Error GoTo Err On Error GoTo Err
   For iTab = 1 To oMyUnv.Tables.Count    For iTab = 1 To oMyUnv.Tables.Count
       If oMyUnv.Tables(iTab).Name = sMyName Then        If oMyUnv.Tables(iTab).Name = sMyName Then
           iGetTableID = iTab            iGetTableID = iTab
           Exit Function            Exit Function
       End If        End If
   Next iTab    Next iTab
   iGetTableID = 0    iGetTableID = 0
   Exit Function    Exit Function
Err: Err:
   iGetTableID = 0    iGetTableID = 0
End Function End Function
Private Function iGetObjectID(sMyClass As String, sMyObject As String) As Integer Private Function iGetObjectID(sMyClass As String, sMyObject As String) As Integer
Dim sProcName As String Dim sProcName As String
sProcName = "iGetObjectID" sProcName = "iGetObjectID"
   
Dim iObject As Integer Dim iObject As Integer
   
On Error GoTo Err On Error GoTo Err
   
   For iObject = 1 To UBound(oObjects)    For iObject = 1 To UBound(oObjects)
       If oObjects(iObject).sClassName = sMyClass Then        If oObjects(iObject).sClassName = sMyClass Then
           If oObjects(iObject).sName = sMyObject Then            If oObjects(iObject).sName = sMyObject Then
               iGetObjectID = iObject                iGetObjectID = iObject
               Exit Function                Exit Function
           End If            End If
       End If        End If
   Next iObject    Next iObject
         
   iGetObjectID = 0    iGetObjectID = 0
         
   Exit Function    Exit Function
Err: Err:
   iGetObjectID = 0    iGetObjectID = 0
End Function End Function
Private Function sGetOriginalTable(iMyTab As Integer, oMyUnv As Designer.Universe) As String Private Function sGetOriginalTable(iMyTab As Integer, oMyUnv As Designer.Universe) As String
Dim sProcName As String Dim sProcName As String
sProcName = "sGetOriginalTable" sProcName = "sGetOriginalTable"
   
On Error GoTo Err On Error GoTo Err
   sGetOriginalTable = oMyUnv.Tables(iMyTab).OriginalTable    sGetOriginalTable = oMyUnv.Tables(iMyTab).OriginalTable
   Exit Function    Exit Function
Err: Err:
   sGetOriginalTable = ""    sGetOriginalTable = ""
End Function End Function
Private Function sGetAggregateFunction(iMyAggregateFunction As Integer) As String Private Function sGetAggregateFunction(iMyAggregateFunction As Integer) As String
Dim sProcName As String Dim sProcName As String
sProcName = "sGetAggregateFunction" sProcName = "sGetAggregateFunction"
   
Dim iAggFunction As Integer Dim iAggFunction As Integer
   
On Error GoTo Err On Error GoTo Err
                 
   For iAggFunction = 1 To UBound(oAggregateFunction)    For iAggFunction = 1 To UBound(oAggregateFunction)
       If iMyAggregateFunction = oAggregateFunction(iAggFunction).iAggregateFunction Then        If iMyAggregateFunction = oAggregateFunction(iAggFunction).iAggregateFunction Then
           sGetAggregateFunction = oAggregateFunction(iAggFunction).sAggregateFunction            sGetAggregateFunction = oAggregateFunction(iAggFunction).sAggregateFunction
           Exit Function            Exit Function
       End If        End If
   Next iAggFunction    Next iAggFunction
         
   Exit Function    Exit Function
Err: Err:
   
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           sGetAggregateFunction = "unbekannt"            sGetAggregateFunction = "unbekannt"
       Case Else ' english        Case Else ' english
           sGetAggregateFunction = "unknown"            sGetAggregateFunction = "unknown"
   End Select    End Select
End Function End Function
Private Function sGetSecurityAccessLevel(iMySecurityAccessLevel As Integer) As String Private Function sGetSecurityAccessLevel(iMySecurityAccessLevel As Integer) As String
Dim sProcName As String Dim sProcName As String
sProcName = "sGetSecurityAccessLevel" sProcName = "sGetSecurityAccessLevel"
   
Dim iSecAccLevel As Integer Dim iSecAccLevel As Integer
   
On Error GoTo Err On Error GoTo Err
         
   For iSecAccLevel = 1 To UBound(oSecurityAccessLevel)    For iSecAccLevel = 1 To UBound(oSecurityAccessLevel)
       If iMySecurityAccessLevel = oSecurityAccessLevel(iSecAccLevel).iSecurityAccessLevel Then        If iMySecurityAccessLevel = oSecurityAccessLevel(iSecAccLevel).iSecurityAccessLevel Then
           sGetSecurityAccessLevel = oSecurityAccessLevel(iSecAccLevel).sSecurityAccessLevel            sGetSecurityAccessLevel = oSecurityAccessLevel(iSecAccLevel).sSecurityAccessLevel
           Exit Function            Exit Function
       End If        End If
   Next iSecAccLevel    Next iSecAccLevel
         
   Exit Function    Exit Function
Err: Err:
   
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           sGetSecurityAccessLevel = "unbekannt"            sGetSecurityAccessLevel = "unbekannt"
       Case Else ' english        Case Else ' english
           sGetSecurityAccessLevel = "unknown"            sGetSecurityAccessLevel = "unknown"
   End Select    End Select
End Function End Function
Private Sub GetUniverseHierarchies(oMyUnv As Designer.Universe) Private Sub GetUniverseHierarchies(oMyUnv As Designer.Universe)
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseHierarchies" sProcName = "GetUniverseHierarchies"
   
Dim oHier As Designer.CustomHierarchy Dim oHier As Designer.CustomHierarchy
Dim iDim As Integer Dim iDim As Integer
Dim iObject As Integer Dim iObject As Integer
Dim bIsInvalidObject As Boolean Dim bIsInvalidObject As Boolean
   
   If vbErrHand = vbErrExit Then    If vbErrHand = vbErrExit Then
       On Error GoTo Err        On Error GoTo Err
   Else    Else
       On Error Resume Next        On Error Resume Next
   End If    End If
   
   ReDim oHierarchies(0)    ReDim oHierarchies(0)
   For Each oHier In oMyUnv.CustomHierarchies    For Each oHier In oMyUnv.CustomHierarchies
       For iDim = 1 To oHier.Dimensions.Count        For iDim = 1 To oHier.Dimensions.Count
           ReDim Preserve oHierarchies(UBound(oHierarchies) + 1)            ReDim Preserve oHierarchies(UBound(oHierarchies) + 1)
                         
           bIsInvalidObject = bGetValidationOfHierObject(oHier, iDim)            bIsInvalidObject = bGetValidationOfHierObject(oHier, iDim)
           oHierarchies(UBound(oHierarchies)).iId = UBound(oHierarchies)            oHierarchies(UBound(oHierarchies)).iId = UBound(oHierarchies)
           oHierarchies(UBound(oHierarchies)).sName = oHier.Name            oHierarchies(UBound(oHierarchies)).sName = oHier.Name
             oHierarchies(UBound(oHierarchies)).iBOHierId = oHier.ID  
                         
           If bIsInvalidObject Then            If bIsInvalidObject Then
               oHierarchies(UBound(oHierarchies)).sObjectName = oHier.Dimensions(iDim).Name                oHierarchies(UBound(oHierarchies)).sObjectName = oHier.Dimensions(iDim).Name
               oHierarchies(UBound(oHierarchies)).sClassName = oHier.Dimensions(iDim).RootClass                oHierarchies(UBound(oHierarchies)).sClassName = oHier.Dimensions(iDim).RootClass
               oHierarchies(UBound(oHierarchies)).bIsVisible = oHier.Dimensions(iDim).Show                oHierarchies(UBound(oHierarchies)).bIsVisible = oHier.Dimensions(iDim).Show
                                 
               iObject = iGetObjectID(oHier.Dimensions(iDim).RootClass, oHier.Dimensions(iDim).Name)                iObject = iGetObjectID(oHier.Dimensions(iDim).RootClass, oHier.Dimensions(iDim).Name)
               oHierarchies(UBound(oHierarchies)).iObjectID = oObjects(iObject).iId                oHierarchies(UBound(oHierarchies)).iObjectID = oObjects(iObject).iId
               oHierarchies(UBound(oHierarchies)).iClassId = oObjects(iObject).iClassId                oHierarchies(UBound(oHierarchies)).iClassId = oObjects(iObject).iClassId
           Else            Else
               oHierarchies(UBound(oHierarchies)).sObjectName = "n/a"                oHierarchies(UBound(oHierarchies)).sObjectName = "n/a"
               oHierarchies(UBound(oHierarchies)).sClassName = "n/a"                oHierarchies(UBound(oHierarchies)).sClassName = "n/a"
               oHierarchies(UBound(oHierarchies)).bIsVisible = False                oHierarchies(UBound(oHierarchies)).bIsVisible = False
                                 
               oHierarchies(UBound(oHierarchies)).iObjectID = -1                oHierarchies(UBound(oHierarchies)).iObjectID = -1
               oHierarchies(UBound(oHierarchies)).iClassId = -1                oHierarchies(UBound(oHierarchies)).iClassId = -1
           End If            End If
       Next iDim        Next iDim
   Next oHier    Next oHier
         
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Function bGetValidationOfHierObject(oMyHier As Designer.CustomHierarchy, iMyDim As Integer) As Boolean Private Function bGetValidationOfHierObject(oMyHier As Designer.CustomHierarchy, iMyDim As Integer) As Boolean
Dim sProcName As String Dim sProcName As String
sProcName = "bGetValidationOfHierObject" sProcName = "bGetValidationOfHierObject"
   
Dim sName As String Dim sName As String
On Error GoTo Err On Error GoTo Err
   sName = oMyHier.Dimensions(iMyDim).Name    sName = oMyHier.Dimensions(iMyDim).Name
   bGetValidationOfHierObject = True    bGetValidationOfHierObject = True
   Exit Function    Exit Function
Err: Err:
   bGetValidationOfHierObject = False    bGetValidationOfHierObject = False
End Function End Function
Private Sub GetUniverseDependencies() Private Sub GetUniverseDependencies()
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverseDependencies" sProcName = "GetUniverseDependencies"
   
Dim iObject As Integer Dim iObject As Integer
   
On Error GoTo Err On Error GoTo Err
   
   ReDim oObjectTableDependencies(0)    ReDim oObjectTableDependencies(0)
         
   For iObject = 1 To UBound(oObjects)    For iObject = 1 To UBound(oObjects)
       'select        'select
       Call GetObjectDependencies(iObject, 1, oObjects(iObject).sSelect, False)        Call GetObjectDependencies(iObject, 1, oObjects(iObject).sSelect, False)
       Call GetObjectDependenciesAtFunction(iObject, 1, oObjects(iObject).sSelect, "@select")        Call GetObjectDependenciesAtFunction(iObject, 1, oObjects(iObject).sSelect, "@select")
                 
       ' where        ' where
       Call GetObjectDependencies(iObject, 2, oObjects(iObject).sWhere, False)        Call GetObjectDependencies(iObject, 2, oObjects(iObject).sWhere, False)
       Call GetObjectDependenciesAtFunction(iObject, 2, oObjects(iObject).sWhere, "@select")        Call GetObjectDependenciesAtFunction(iObject, 2, oObjects(iObject).sWhere, "@select")
       Call GetObjectDependenciesAtFunction(iObject, 2, oObjects(iObject).sWhere, "@where")        Call GetObjectDependenciesAtFunction(iObject, 2, oObjects(iObject).sWhere, "@where")
   Next iObject    Next iObject
   
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetObjectDependencies(iMyObject As Integer, iMySource As Integer, sMyString As String, bMyIsDerived As Boolean) Private Sub GetObjectDependencies(iMyObject As Integer, iMySource As Integer, sMyString As String, bMyIsDerived As Boolean)
Dim sProcName As String Dim sProcName As String
sProcName = "GetObjectDependencies" sProcName = "GetObjectDependencies"
   
Dim iTable As Integer Dim iTable As Integer
Dim iColumn As Integer Dim iColumn As Integer
   
Dim sString As String Dim sString As String
Dim sColumn As String Dim sColumn As String
   
Dim iPos1 As Integer Dim iPos1 As Integer
Dim iPos2 As Integer Dim iPos2 As Integer
   
On Error GoTo Err On Error GoTo Err
         
   sString = sCleanString(sMyString)    sString = sCleanString(sMyString)
                 
   For iTable = 1 To UBound(oTables)    For iTable = 1 To UBound(oTables)
       iPos1 = InStr(1, sString, sCleanString(oTables(iTable).sName) & ".", vbTextCompare)        iPos1 = InStr(1, sString, sCleanString(oTables(iTable).sName) & ".", vbTextCompare)
       While iPos1 > 0        While iPos1 > 0
           iPos2 = iGetPosOfEnding(iPos1, sString)            iPos2 = iGetPosOfEnding(iPos1, sString)
                         
           sColumn = Mid(sString, iPos1 + Len(oTables(iTable).sName) + 1, iPos2 - (iPos1 + Len(oTables(iTable).sName)))            sColumn = Mid(sString, iPos1 + Len(oTables(iTable).sName) + 1, iPos2 - (iPos1 + Len(oTables(iTable).sName)))
                         
           ReDim Preserve oObjectTableDependencies(UBound(oObjectTableDependencies) + 1)            ReDim Preserve oObjectTableDependencies(UBound(oObjectTableDependencies) + 1)
                         
           oObjectTableDependencies(UBound(oObjectTableDependencies)).iId = UBound(oObjectTableDependencies)            oObjectTableDependencies(UBound(oObjectTableDependencies)).iId = UBound(oObjectTableDependencies)
                         
           oObjectTableDependencies(UBound(oObjectTableDependencies)).iObjectID = iMyObject            oObjectTableDependencies(UBound(oObjectTableDependencies)).iObjectID = iMyObject
           oObjectTableDependencies(UBound(oObjectTableDependencies)).iClassId = oObjects(iMyObject).iClassId            oObjectTableDependencies(UBound(oObjectTableDependencies)).iClassId = oObjects(iMyObject).iClassId
           oObjectTableDependencies(UBound(oObjectTableDependencies)).sClassName = oObjects(iMyObject).sClassName            oObjectTableDependencies(UBound(oObjectTableDependencies)).sClassName = oObjects(iMyObject).sClassName
           oObjectTableDependencies(UBound(oObjectTableDependencies)).sObjectName = oObjects(iMyObject).sName            oObjectTableDependencies(UBound(oObjectTableDependencies)).sObjectName = oObjects(iMyObject).sName
             oObjectTableDependencies(UBound(oObjectTableDependencies)).iBOObjectID = oObjects(iMyObject).iBOObjectID  
             oObjectTableDependencies(UBound(oObjectTableDependencies)).iBOClassId = oObjects(iMyObject).iBOClassId  
                         
           oObjectTableDependencies(UBound(oObjectTableDependencies)).iTableId = iTable            oObjectTableDependencies(UBound(oObjectTableDependencies)).iTableId = iTable
           oObjectTableDependencies(UBound(oObjectTableDependencies)).sTableName = oTables(iTable).sName            oObjectTableDependencies(UBound(oObjectTableDependencies)).sTableName = oTables(iTable).sName
           oObjectTableDependencies(UBound(oObjectTableDependencies)).sTableOriginalName = oTables(iTable).sOriginalTable            oObjectTableDependencies(UBound(oObjectTableDependencies)).sTableOriginalName = oTables(iTable).sOriginalTable
           oObjectTableDependencies(UBound(oObjectTableDependencies)).iSource = iMySource            oObjectTableDependencies(UBound(oObjectTableDependencies)).iSource = iMySource
           oObjectTableDependencies(UBound(oObjectTableDependencies)).bIsDerived = bMyIsDerived            oObjectTableDependencies(UBound(oObjectTableDependencies)).bIsDerived = bMyIsDerived
                         
           For iColumn = 1 To UBound(oTableColumns)            For iColumn = 1 To UBound(oTableColumns)
               If oTableColumns(iColumn).sTableName = oTables(iTable).sOriginalTable Then                If oTableColumns(iColumn).sTableName = oTables(iTable).sOriginalTable Then
                   If sCleanString(oTableColumns(iColumn).sName) = sColumn Then                    If sCleanString(oTableColumns(iColumn).sName) = sColumn Then
                       oObjectTableDependencies(UBound(oObjectTableDependencies)).iColumnId = iColumn                        oObjectTableDependencies(UBound(oObjectTableDependencies)).iColumnId = iColumn
                       oObjectTableDependencies(UBound(oObjectTableDependencies)).sColumnName = oTableColumns(iColumn).sName                        oObjectTableDependencies(UBound(oObjectTableDependencies)).sColumnName = oTableColumns(iColumn).sName
                       Exit For                        Exit For
                   End If                    End If
               End If                End If
           Next iColumn            Next iColumn
   
           iPos1 = InStr(iPos2, sString, oTables(iTable).sName & ".", vbTextCompare)            iPos1 = InStr(iPos2, sString, oTables(iTable).sName & ".", vbTextCompare)
       Wend        Wend
   Next iTable    Next iTable
   
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub GetObjectDependenciesAtFunction(iMyObject As Integer, iMySource As Integer, sMyString As String, sAtFunction As String) Private Sub GetObjectDependenciesAtFunction(iMyObject As Integer, iMySource As Integer, sMyString As String, sAtFunction As String)
Dim sProcName As String Dim sProcName As String
sProcName = "GetObjectDependenciesAtFunction" sProcName = "GetObjectDependenciesAtFunction"
   
Dim iPosAtFunction As Integer Dim iPosAtFunction As Integer
Dim iPos1 As Integer Dim iPos1 As Integer
Dim iPos2 As Integer Dim iPos2 As Integer
   
Dim sString As String Dim sString As String
   
Dim sClassObject As String Dim sClassObject As String
Dim sClass As String Dim sClass As String
Dim sObject As String Dim sObject As String
   
Dim iObject As Integer Dim iObject As Integer
Dim sSelect As String Dim sSelect As String
   
On Error GoTo Err On Error GoTo Err
   
   sString = sCleanString(sMyString)    sString = sCleanString(sMyString)
   iPosAtFunction = InStr(1, sString, sAtFunction, vbTextCompare)    iPosAtFunction = InStr(1, sString, sAtFunction, vbTextCompare)
   
   While iPosAtFunction > 0    While iPosAtFunction > 0
       iPos1 = InStr(iPosAtFunction, sString, "(", vbTextCompare) + 1        iPos1 = InStr(iPosAtFunction, sString, "(", vbTextCompare) + 1
       iPos2 = iGetPosOfClosingBracket(iPos1, sString)        iPos2 = iGetPosOfClosingBracket(iPos1, sString)
   
       sClassObject = Mid(sString, iPos1, iPos2 - iPos1)        sClassObject = Mid(sString, iPos1, iPos2 - iPos1)
       iPos1 = 1        iPos1 = 1
       iPos2 = InStr(1, sClassObject, "\", vbTextCompare)        iPos2 = InStr(1, sClassObject, "\", vbTextCompare)
       sClass = Mid(sClassObject, iPos1, iPos2 - iPos1)        sClass = Mid(sClassObject, iPos1, iPos2 - iPos1)
       iPos1 = iPos2 + 1        iPos1 = iPos2 + 1
       iPos2 = Len(sClassObject)        iPos2 = Len(sClassObject)
       sObject = Mid(sClassObject, iPos1, iPos2 - iPos1 + 1)        sObject = Mid(sClassObject, iPos1, iPos2 - iPos1 + 1)
   
       For iObject = 1 To UBound(oObjects)        For iObject = 1 To UBound(oObjects)
           If sCleanString(oObjects(iObject).sClassName) = sClass Then            If sCleanString(oObjects(iObject).sClassName) = sClass Then
               If sCleanString(oObjects(iObject).sName) = sObject Then                If sCleanString(oObjects(iObject).sName) = sObject Then
                   sSelect = sCleanString(oObjects(iObject).sSelect)                    sSelect = sCleanString(oObjects(iObject).sSelect)
                   If InStr(1, sSelect, sAtFunction, vbTextCompare) > 0 Then                    If InStr(1, sSelect, sAtFunction, vbTextCompare) > 0 Then
                       Call GetObjectDependenciesAtFunction(iMyObject, iMySource, sSelect, sAtFunction)                        Call GetObjectDependenciesAtFunction(iMyObject, iMySource, sSelect, sAtFunction)
                   Else                    Else
                       Call GetObjectDependencies(iMyObject, iMySource, sSelect, True)                        Call GetObjectDependencies(iMyObject, iMySource, sSelect, True)
                   End If                    End If
                   Exit For                    Exit For
               End If                End If
           End If            End If
       Next iObject        Next iObject
   
       iPosAtFunction = InStr(iPosAtFunction + Len(sAtFunction), sMyString, sAtFunction, vbTextCompare)        iPosAtFunction = InStr(iPosAtFunction + Len(sAtFunction), sMyString, sAtFunction, vbTextCompare)
   Wend    Wend
   
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Function iGetPosOfClosingBracket(iMyPos As Integer, sMyStr As String) As Integer Private Function iGetPosOfClosingBracket(iMyPos As Integer, sMyStr As String) As Integer
Dim sProcName As String Dim sProcName As String
sProcName = "iGetPosOfClosingBracket" sProcName = "iGetPosOfClosingBracket"
   
Dim iPos As Integer Dim iPos As Integer
Dim iSpell As String Dim iSpell As String
Dim iCntBrackets As Integer Dim iCntBrackets As Integer
Dim bOpenParagraphs As Boolean Dim bOpenParagraphs As Boolean
   
On Error GoTo Err On Error GoTo Err
   
   iCntBrackets = 1    iCntBrackets = 1
   bOpenParagraphs = False    bOpenParagraphs = False
   For iPos = iMyPos To Len(sMyStr) Step 1    For iPos = iMyPos To Len(sMyStr) Step 1
       iSpell = Mid(sMyStr, iPos, 1)        iSpell = Mid(sMyStr, iPos, 1)
       Select Case iSpell        Select Case iSpell
           Case "("            Case "("
               iCntBrackets = IIf(bOpenParagraphs, iCntBrackets, iCntBrackets + 1)                iCntBrackets = IIf(bOpenParagraphs, iCntBrackets, iCntBrackets + 1)
           Case "'"            Case "'"
               bOpenParagraphs = IIf(bOpenParagraphs, False, True)                bOpenParagraphs = IIf(bOpenParagraphs, False, True)
           Case ")"            Case ")"
               iCntBrackets = IIf(bOpenParagraphs, iCntBrackets, iCntBrackets - 1)                iCntBrackets = IIf(bOpenParagraphs, iCntBrackets, iCntBrackets - 1)
       End Select        End Select
       If iCntBrackets = 0 Then        If iCntBrackets = 0 Then
           iGetPosOfClosingBracket = iPos            iGetPosOfClosingBracket = iPos
           Exit Function            Exit Function
       End If        End If
   Next iPos    Next iPos
   iGetPosOfClosingBracket = 0    iGetPosOfClosingBracket = 0
   Exit Function    Exit Function
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Function End Function
Private Function iGetPosOfEnding(iMyPos As Integer, sMyStr As String) As Integer Private Function iGetPosOfEnding(iMyPos As Integer, sMyStr As String) As Integer
Dim sProcName As String Dim sProcName As String
sProcName = "iGetPosOfEnding" sProcName = "iGetPosOfEnding"
   
Dim iPos As Integer Dim iPos As Integer
Dim iPosSpace As Integer Dim iPosSpace As Integer
Dim iPosComma As Integer Dim iPosComma As Integer
Dim iPosClosingBracket As Integer Dim iPosClosingBracket As Integer
Dim iPosClosingBracket2 As Integer Dim iPosClosingBracket2 As Integer
Dim iPosClosingBracket3 As Integer Dim iPosClosingBracket3 As Integer
Dim iPosConcat As Integer Dim iPosConcat As Integer
Dim iPosEqual As Integer Dim iPosEqual As Integer
Dim iPosPlus As Integer Dim iPosPlus As Integer
Dim iPosMinus As Integer Dim iPosMinus As Integer
   
On Error GoTo Err On Error GoTo Err
   iPosSpace = InStr(iMyPos, sMyStr, " ", vbTextCompare) - 1    iPosSpace = InStr(iMyPos, sMyStr, " ", vbTextCompare) - 1
   iPosComma = InStr(iMyPos, sMyStr, ",", vbTextCompare) - 1    iPosComma = InStr(iMyPos, sMyStr, ",", vbTextCompare) - 1
   iPosClosingBracket = InStr(iMyPos, sMyStr, ")", vbTextCompare) - 1    iPosClosingBracket = InStr(iMyPos, sMyStr, ")", vbTextCompare) - 1
   iPosClosingBracket2 = InStr(iMyPos, sMyStr, ">", vbTextCompare) - 1    iPosClosingBracket2 = InStr(iMyPos, sMyStr, ">", vbTextCompare) - 1
   iPosClosingBracket3 = InStr(iMyPos, sMyStr, "<", vbTextCompare) - 1    iPosClosingBracket3 = InStr(iMyPos, sMyStr, "<", vbTextCompare) - 1
   iPosConcat = InStr(iMyPos, sMyStr, "|", vbTextCompare) - 1    iPosConcat = InStr(iMyPos, sMyStr, "|", vbTextCompare) - 1
   iPosEqual = InStr(iMyPos, sMyStr, "=", vbTextCompare) - 1    iPosEqual = InStr(iMyPos, sMyStr, "=", vbTextCompare) - 1
   iPosPlus = InStr(iMyPos, sMyStr, "+", vbTextCompare) - 1    iPosPlus = InStr(iMyPos, sMyStr, "+", vbTextCompare) - 1
   iPosMinus = InStr(iMyPos, sMyStr, "-", vbTextCompare) - 1    iPosMinus = InStr(iMyPos, sMyStr, "-", vbTextCompare) - 1
         
   iPos = Len(sMyStr)    iPos = Len(sMyStr)
   If iPosSpace > 0 And iPosSpace < iPos Then iPos = iPosSpace    If iPosSpace > 0 And iPosSpace < iPos Then iPos = iPosSpace
   If iPosComma > 0 And iPosComma < iPos Then iPos = iPosComma    If iPosComma > 0 And iPosComma < iPos Then iPos = iPosComma
   If iPosClosingBracket > 0 And iPosClosingBracket < iPos Then iPos = iPosClosingBracket    If iPosClosingBracket > 0 And iPosClosingBracket < iPos Then iPos = iPosClosingBracket
   If iPosClosingBracket2 > 0 And iPosClosingBracket2 < iPos Then iPos = iPosClosingBracket2    If iPosClosingBracket2 > 0 And iPosClosingBracket2 < iPos Then iPos = iPosClosingBracket2
   If iPosClosingBracket3 > 0 And iPosClosingBracket3 < iPos Then iPos = iPosClosingBracket3    If iPosClosingBracket3 > 0 And iPosClosingBracket3 < iPos Then iPos = iPosClosingBracket3
   If iPosConcat > 0 And iPosConcat < iPos Then iPos = iPosConcat    If iPosConcat > 0 And iPosConcat < iPos Then iPos = iPosConcat
   If iPosEqual > 0 And iPosEqual < iPos Then iPos = iPosEqual    If iPosEqual > 0 And iPosEqual < iPos Then iPos = iPosEqual
   If iPosPlus > 0 And iPosPlus < iPos Then iPos = iPosPlus    If iPosPlus > 0 And iPosPlus < iPos Then iPos = iPosPlus
   If iPosMinus > 0 And iPosMinus < iPos Then iPos = iPosMinus    If iPosMinus > 0 And iPosMinus < iPos Then iPos = iPosMinus
         
   iGetPosOfEnding = iPos    iGetPosOfEnding = iPos
   Exit Function    Exit Function
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Function End Function
Private Function sCleanString(sMyStr As String) As String Private Function sCleanString(sMyStr As String) As String
Dim sProcName As String Dim sProcName As String
sProcName = "sCleanString" sProcName = "sCleanString"
   
Dim iPos As Integer Dim iPos As Integer
On Error GoTo Err On Error GoTo Err
   sMyStr = Replace(sMyStr, vbCrLf, " ")    sMyStr = Replace(sMyStr, vbCrLf, " ")
   sMyStr = Replace(sMyStr, vbCr, " ")    sMyStr = Replace(sMyStr, vbCr, " ")
   sMyStr = Replace(sMyStr, vbLf, " ")    sMyStr = Replace(sMyStr, vbLf, " ")
   sMyStr = Trim(sMyStr)    sMyStr = Trim(sMyStr)
   ' look for strings with 2 succeeded spaces    ' look for strings with 2 succeeded spaces
   ' reduce the string to only one space    ' reduce the string to only one space
   While InStr(1, sMyStr, "  ", vbTextCompare) <> 0    While InStr(1, sMyStr, "  ", vbTextCompare) <> 0
       sMyStr = Replace(sMyStr, "  ", " ")        sMyStr = Replace(sMyStr, "  ", " ")
   Wend    Wend
   sCleanString = LCase(sMyStr)    sCleanString = LCase(sMyStr)
   Exit Function    Exit Function
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Function End Function
Private Function bLogOnDesigner(oMyDes As Designer.Application) As Boolean Private Function bLogOnDesigner(oMyDes As Designer.Application) As Boolean
Dim sProcName As String Dim sProcName As String
sProcName = "LogOnDesigner" sProcName = "LogOnDesigner"
   
On Error GoTo Err On Error GoTo Err
   bLogOnDesigner = False    bLogOnDesigner = False
   oMyDes.LogonDialog    oMyDes.LogonDialog
   bLogOnDesigner = True    bLogOnDesigner = True
   Exit Function    Exit Function
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
   bLogOnDesigner = False    bLogOnDesigner = False
End Function End Function
Private Function bGetUniverse() As Boolean Private Function bGetUniverse() As Boolean
Dim sProcName As String Dim sProcName As String
sProcName = "GetUniverse" sProcName = "GetUniverse"
   
Dim oDes As Designer.Application Dim oDes As Designer.Application
Dim oUnv As Designer.Universe Dim oUnv As Designer.Universe
Dim iDesVariables As Integer Dim iDesVariables As Integer
'Dim bLogon As Boolean 'Dim bLogon As Boolean
   
On Error GoTo Err On Error GoTo Err
   bGetUniverse = False    bGetUniverse = False
   'Call GetControlData    'Call GetControlData
         
   Set oDes = New Designer.Application    Set oDes = New Designer.Application
         
   ' start designer    ' start designer
   bGetUniverse = bLogOnDesigner(oDes)    bGetUniverse = bLogOnDesigner(oDes)
   If bGetUniverse = False Then GoTo LogonBreak    If bGetUniverse = False Then GoTo LogonBreak
   'oDes.LogonDialog ' bo xi    'oDes.LogonDialog ' bo xi
         
   oDes.Visible = False    oDes.Visible = False
   oDes.Interactive = False    oDes.Interactive = False
         
   For iDesVariables = 1 To oDes.Variables.Count    For iDesVariables = 1 To oDes.Variables.Count
       If oDes.Variables(iDesVariables).Name = "BOSECURITYDOMAIN" Then oUnvProp.sLogonSystem = oDes.Variables(iDesVariables).Value        If oDes.Variables(iDesVariables).Name = "BOSECURITYDOMAIN" Then oUnvProp.sLogonSystem = oDes.Variables(iDesVariables).Value
       If oDes.Variables(iDesVariables).Name = "BOUSER" Then oUnvProp.sLogonName = oDes.Variables(iDesVariables).Value        If oDes.Variables(iDesVariables).Name = "BOUSER" Then oUnvProp.sLogonName = oDes.Variables(iDesVariables).Value
   Next iDesVariables    Next iDesVariables
         
   ' offline modus    ' offline modus
   If oUnvProp.sLogonSystem = "" Then    If oUnvProp.sLogonSystem = "" Then
       oUnvProp.sLogonSystem = "n/a"        oUnvProp.sLogonSystem = "n/a"
       oUnvProp.sLogonName = "n/a"        oUnvProp.sLogonName = "n/a"
   End If    End If
         
   ' open universe    ' open universe
   oDes.Universes.Open    oDes.Universes.Open
   Set oUnv = oDes.Universes(1)    Set oUnv = oDes.Universes(1)
         
   Call GetUniverseParameter(oUnv)    Call GetUniverseParameter(oUnv)
   Call GetUniverseClasses(oUnv)    Call GetUniverseClasses(oUnv)
   Call GetUniverseTables(oUnv)    Call GetUniverseTables(oUnv)
   Call GetUniverseTableColumns(oUnv)    Call GetUniverseTableColumns(oUnv)
         
   If oControl.bExecHier Then Call GetUniverseHierarchies(oUnv)    If oControl.bExecHier Then Call GetUniverseHierarchies(oUnv)
   If oControl.bExecContext Then Call GetUniverseContexts(oUnv)    If oControl.bExecContext Then Call GetUniverseContexts(oUnv)
   If oControl.bExecJoin Then Call GetUniverseJoins(oUnv)    If oControl.bExecJoin Then Call GetUniverseJoins(oUnv)
   
   oDes.Quit    oDes.Quit
   Set oUnv = Nothing    Set oUnv = Nothing
   Set oDes = Nothing    Set oDes = Nothing
                 
   If oControl.bExecDependency Then Call GetUniverseDependencies    If oControl.bExecDependency Then Call GetUniverseDependencies
         
   Exit Function    Exit Function
LogonBreak: LogonBreak:
   Set oDes = Nothing    Set oDes = Nothing
   Exit Function    Exit Function
Err: Err:
   bGetUniverse = False    bGetUniverse = False
   oDes.Quit    oDes.Quit
   Set oUnv = Nothing    Set oUnv = Nothing
   Set oDes = Nothing    Set oDes = Nothing
         
   Select Case Err.Number    Select Case Err.Number
       Case 31        Case 31
       ' exit during logon to designer        ' exit during logon to designer
       Case Else        Case Else
           MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName            MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
   End Select    End Select
End Function End Function
Private Sub ExportUniverseORA() Private Sub ExportUniverseORA()
Dim sProcName As String Dim sProcName As String
sProcName = "ExportUniverseORA" sProcName = "ExportUniverseORA"
   
Dim sWrkName As String Dim sWrkName As String
Dim iEntry As Integer Dim iEntry As Integer
Dim bGetData As Boolean Dim bGetData As Boolean
   
On Error GoTo Err On Error GoTo Err
         
   bGetData = bGetUniverse    bGetData = bGetUniverse
   If bGetData = False Then GoTo LogonBreak    If bGetData = False Then GoTo LogonBreak
         
         
   sWrkName = oUnvProp.sName & "_v" & oUnvProp.sVersion & "_" & CStr(Format(Now, "yyyymmdd_hhmmss_")) & ".sql"    sWrkName = oUnvProp.sName & "_v" & oUnvProp.sVersion & "_" & CStr(Format(Now, "yyyymmdd_hhmmss_")) & ".sql"
   Open oUnvProp.sPath & "\init_script.sql" For Output As #2    Open oUnvProp.sPath & "\init_script.sql" For Output As #2
   Print #2, "-- initial script ddl"    Print #2, "-- initial script ddl"
   Print #2, "CREATE TABLE META_ALLTABLES"    Print #2, "CREATE TABLE META_ALLTABLES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION                     NUMBER(5),"    Print #2, "  SVERSION                     NUMBER(5),"
   Print #2, "  SUNIVERSENAME                VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME                VARCHAR2(8 BYTE),"
   Print #2, "  IID                          NUMBER(5),"    Print #2, "  IID                          NUMBER(5),"
   Print #2, "  SNAME                        VARCHAR2(255 BYTE),"    Print #2, "  SNAME                        VARCHAR2(255 BYTE),"
   Print #2, "  IORIGINALTABLEID             NUMBER(5),"    Print #2, "  IORIGINALTABLEID             NUMBER(5),"
   Print #2, "  SORIGINALTABLE               VARCHAR2(255 BYTE),"    Print #2, "  SORIGINALTABLE               VARCHAR2(255 BYTE),"
   Print #2, "  BISALIAS                     NUMBER(1),"    Print #2, "  BISALIAS                     NUMBER(1),"
   Print #2, "  BISDERIVED                   NUMBER(1),"    Print #2, "  BISDERIVED                   NUMBER(1),"
   Print #2, "  SSQLOFDERIVEDTABLE           VARCHAR2(2000 BYTE),"    Print #2, "  SSQLOFDERIVEDTABLE           VARCHAR2(2000 BYTE),"
   Print #2, "  SSQLOFDERIVEDTABLEWITHALIAS  VARCHAR2(2000 BYTE)"    Print #2, "  SSQLOFDERIVEDTABLEWITHALIAS  VARCHAR2(2000 BYTE)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_CLASSES"    Print #2, "CREATE TABLE META_CLASSES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  IPARENTID      NUMBER(5),"    Print #2, "  IPARENTID      NUMBER(5),"
   Print #2, "  ICOUNTCLASSES  NUMBER(5),"    Print #2, "  ICOUNTCLASSES  NUMBER(5),"
   Print #2, "  ILEVEL         NUMBER(5),"    Print #2, "  ILEVEL         NUMBER(5),"
   Print #2, "  SDESCRIPTION   VARCHAR2(255 BYTE),"    Print #2, "  SDESCRIPTION   VARCHAR2(255 BYTE),"
   Print #2, "  BISVISIBLE     NUMBER(1),"    Print #2, "  BISVISIBLE     NUMBER(1),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE)"    Print #2, "  SNAME          VARCHAR2(255 BYTE)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_CONTEXTPROPERTIES"    Print #2, "CREATE TABLE META_CONTEXTPROPERTIES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE),"    Print #2, "  SNAME          VARCHAR2(255 BYTE),"
   Print #2, "  SDESCRIPTION   VARCHAR2(255 BYTE),"    Print #2, "  SDESCRIPTION   VARCHAR2(255 BYTE),"
   Print #2, "  S1STTABLE      VARCHAR2(255 BYTE),"    Print #2, "  S1STTABLE      VARCHAR2(255 BYTE),"
   Print #2, "  I1STTABLEID    NUMBER(5),"    Print #2, "  I1STTABLEID    NUMBER(5),"
   Print #2, "  S2NDTABLE      VARCHAR2(255 BYTE),"    Print #2, "  S2NDTABLE      VARCHAR2(255 BYTE),"
   Print #2, "  I2NDTABLEID    NUMBER(5),"    Print #2, "  I2NDTABLEID    NUMBER(5),"
   Print #2, "  S1STCOLUMN     VARCHAR2(255 BYTE),"    Print #2, "  S1STCOLUMN     VARCHAR2(255 BYTE),"
   Print #2, "  I1STCOLUMNID   NUMBER(5),"    Print #2, "  I1STCOLUMNID   NUMBER(5),"
   Print #2, "  S2NDCOLUMN     VARCHAR2(255 BYTE),"    Print #2, "  S2NDCOLUMN     VARCHAR2(255 BYTE),"
   Print #2, "  I2NDCOLUMNID   NUMBER(5),"    Print #2, "  I2NDCOLUMNID   NUMBER(5),"
   Print #2, "  SEXPRESSION    VARCHAR2(2000 BYTE)"    Print #2, "  SEXPRESSION    VARCHAR2(2000 BYTE)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_DEPENDENCIES"    Print #2, "CREATE TABLE META_DEPENDENCIES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION            NUMBER(5),"    Print #2, "  SVERSION            NUMBER(5),"
   Print #2, "  SUNIVERSENAME       VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME       VARCHAR2(8 BYTE),"
   Print #2, "  IID                 NUMBER(5),"    Print #2, "  IID                 NUMBER(5),"
   Print #2, "  IOBJECTID           NUMBER(5),"    Print #2, "  IOBJECTID           NUMBER(5),"
   Print #2, "  ITABLEID            NUMBER(5),"    Print #2, "  ITABLEID            NUMBER(5),"
   Print #2, "  ICOLUMNID           NUMBER(5),"    Print #2, "  ICOLUMNID           NUMBER(5),"
   Print #2, "  SCLASSNAME          VARCHAR2(255 BYTE),"    Print #2, "  SCLASSNAME          VARCHAR2(255 BYTE),"
   Print #2, "  SOBJECTNAME         VARCHAR2(255 BYTE),"    Print #2, "  SOBJECTNAME         VARCHAR2(255 BYTE),"
   Print #2, "  STABLENAME          VARCHAR2(255 BYTE),"    Print #2, "  STABLENAME          VARCHAR2(255 BYTE),"
   Print #2, "  STABLEORIGINALNAME  VARCHAR2(255 BYTE),"    Print #2, "  STABLEORIGINALNAME  VARCHAR2(255 BYTE),"
   Print #2, "  SCOLUMNNAME         VARCHAR2(255 BYTE),"    Print #2, "  SCOLUMNNAME         VARCHAR2(255 BYTE),"
   Print #2, "  ISOURCE             NUMBER(1),"    Print #2, "  ISOURCE             NUMBER(1),"
   Print #2, "  BISDERIVED          NUMBER(1)"    Print #2, "  BISDERIVED          NUMBER(1)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_HIERARCHYPROPERTIES"    Print #2, "CREATE TABLE META_HIERARCHYPROPERTIES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE),"    Print #2, "  SNAME          VARCHAR2(255 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  IOBJECTID      NUMBER(5),"    Print #2, "  IOBJECTID      NUMBER(5),"
   Print #2, "  ICLASSID       NUMBER(5),"    Print #2, "  ICLASSID       NUMBER(5),"
   Print #2, "  SOBJECTNAME    VARCHAR2(255 BYTE),"    Print #2, "  SOBJECTNAME    VARCHAR2(255 BYTE),"
   Print #2, "  SCLASSNAME     VARCHAR2(255 BYTE),"    Print #2, "  SCLASSNAME     VARCHAR2(255 BYTE),"
   Print #2, "  BISVISIBLE     NUMBER(1)"    Print #2, "  BISVISIBLE     NUMBER(1)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_OBJECTKEYS"    Print #2, "CREATE TABLE META_OBJECTKEYS"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  SCLASSID       NUMBER(5),"    Print #2, "  SCLASSID       NUMBER(5),"
   Print #2, "  SOBJECTID      NUMBER(5),"    Print #2, "  SOBJECTID      NUMBER(5),"
   Print #2, "  SCLASSNAME     VARCHAR2(255 BYTE),"    Print #2, "  SCLASSNAME     VARCHAR2(255 BYTE),"
   Print #2, "  SOBJECTNAME    VARCHAR2(255 BYTE),"    Print #2, "  SOBJECTNAME    VARCHAR2(255 BYTE),"
   Print #2, "  SSELECT        VARCHAR2(255 BYTE),"    Print #2, "  SSELECT        VARCHAR2(255 BYTE),"
   Print #2, "  SWHERE         VARCHAR2(255 BYTE),"    Print #2, "  SWHERE         VARCHAR2(255 BYTE),"
   Print #2, "  BENABLE        NUMBER(1),"    Print #2, "  BENABLE        NUMBER(1),"
   Print #2, "  ITYPE          NUMBER(1)"    Print #2, "  ITYPE          NUMBER(1)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_OBJECTPROPERTIES"    Print #2, "CREATE TABLE META_OBJECTPROPERTIES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION                       NUMBER(5),"    Print #2, "  SVERSION                       NUMBER(5),"
   Print #2, "  SUNIVERSENAME                  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME                  VARCHAR2(8 BYTE),"
   Print #2, "  SNAME                          VARCHAR2(255 BYTE),"    Print #2, "  SNAME                          VARCHAR2(255 BYTE),"
   Print #2, "  IID                            NUMBER(5),"    Print #2, "  IID                            NUMBER(5),"
   Print #2, "  IIDCLASS                       NUMBER(5),"    Print #2, "  IIDCLASS                       NUMBER(5),"
   Print #2, "  SCLASSNAME                     VARCHAR2(255 BYTE),"    Print #2, "  SCLASSNAME                     VARCHAR2(255 BYTE),"
   Print #2, "  SDESCRIPTION                   VARCHAR2(2000 BYTE),"    Print #2, "  SDESCRIPTION                   VARCHAR2(2000 BYTE),"
   Print #2, "  SSELECT                        VARCHAR2(2000 BYTE),"    Print #2, "  SSELECT                        VARCHAR2(2000 BYTE),"
   Print #2, "  SWHERE                         VARCHAR2(2000 BYTE),"    Print #2, "  SWHERE                         VARCHAR2(2000 BYTE),"
   Print #2, "  IDATABASEFORMAT                NUMBER(1),"    Print #2, "  IDATABASEFORMAT                NUMBER(1),"
   Print #2, "  IQUALIFICATION                 NUMBER(1),"    Print #2, "  IQUALIFICATION                 NUMBER(1),"
   Print #2, "  IAGGREGATEFUNCTION             NUMBER(1),"    Print #2, "  IAGGREGATEFUNCTION             NUMBER(1),"
   Print #2, "  BISVISIBLE                     NUMBER(1),"    Print #2, "  BISVISIBLE                     NUMBER(1),"
   Print #2, "  BCANBEUSEDCONDITION            NUMBER(1),"    Print #2, "  BCANBEUSEDCONDITION            NUMBER(1),"
   Print #2, "  BCANBEUSEDRESULT               NUMBER(1),"    Print #2, "  BCANBEUSEDRESULT               NUMBER(1),"
   Print #2, "  BCANBEUSEDSORT                 NUMBER(1),"    Print #2, "  BCANBEUSEDSORT                 NUMBER(1),"
   Print #2, "  BALLOWUSERTOEDITLOV            NUMBER(1),"    Print #2, "  BALLOWUSERTOEDITLOV            NUMBER(1),"
   Print #2, "  BAUTOMATICLOVREFRESHBEFOREUSE  NUMBER(1),"    Print #2, "  BAUTOMATICLOVREFRESHBEFOREUSE  NUMBER(1),"
   Print #2, "  BEXPORTLOVWITHUNIVERSE         NUMBER(1),"    Print #2, "  BEXPORTLOVWITHUNIVERSE         NUMBER(1),"
   Print #2, "  BHASLISTOFVALUES               NUMBER(1),"    Print #2, "  BHASLISTOFVALUES               NUMBER(1),"
   Print #2, "  SLISTOFVALUESNAME              VARCHAR2(255 BYTE),"    Print #2, "  SLISTOFVALUESNAME              VARCHAR2(255 BYTE),"
   Print #2, "  ICOUNTOBJECTS                  NUMBER(5),"    Print #2, "  ICOUNTOBJECTS                  NUMBER(5),"
   Print #2, "  ISECURITYACCESSLEVEL           NUMBER(1),"    Print #2, "  ISECURITYACCESSLEVEL           NUMBER(1),"
   Print #2, "  ITYPE                          NUMBER(1),"    Print #2, "  ITYPE                          NUMBER(1),"
   Print #2, "  BUSEHIERARCHICALDISPLAY        NUMBER(1)"    Print #2, "  BUSEHIERARCHICALDISPLAY        NUMBER(1)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_ORIGINALTABLES"    Print #2, "CREATE TABLE META_ORIGINALTABLES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE)"    Print #2, "  SNAME          VARCHAR2(255 BYTE)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_TABLECOLUMNS"    Print #2, "CREATE TABLE META_TABLECOLUMNS"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  IID            NUMBER(5),"    Print #2, "  IID            NUMBER(5),"
   Print #2, "  ITABLEID       NUMBER(5),"    Print #2, "  ITABLEID       NUMBER(5),"
   Print #2, "  STABLE         VARCHAR2(255 BYTE),"    Print #2, "  STABLE         VARCHAR2(255 BYTE),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE),"    Print #2, "  SNAME          VARCHAR2(255 BYTE),"
   Print #2, "  ITYP           NUMBER(1),"    Print #2, "  ITYP           NUMBER(1),"
   Print #2, "  IKEY           NUMBER(1)"    Print #2, "  IKEY           NUMBER(1)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_UNIVERSEPARAMETERS"    Print #2, "CREATE TABLE META_UNIVERSEPARAMETERS"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION       NUMBER(5),"    Print #2, "  SVERSION       NUMBER(5),"
   Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"    Print #2, "  SUNIVERSENAME  VARCHAR2(8 BYTE),"
   Print #2, "  ID             NUMBER(5),"    Print #2, "  ID             NUMBER(5),"
   Print #2, "  SNAME          VARCHAR2(255 BYTE),"    Print #2, "  SNAME          VARCHAR2(255 BYTE),"
   Print #2, "  SVALUE         VARCHAR2(255 BYTE)"    Print #2, "  SVALUE         VARCHAR2(255 BYTE)"
   Print #2, ");"    Print #2, ");"
   Print #2,    Print #2,
   Print #2, "CREATE TABLE META_UNIVERSEPROPERTIES"    Print #2, "CREATE TABLE META_UNIVERSEPROPERTIES"
   Print #2, "("    Print #2, "("
   Print #2, "  SVERSION                       NUMBER(5),"    Print #2, "  SVERSION                       NUMBER(5),"
   Print #2, "  SNAME                          VARCHAR2(8 BYTE),"    Print #2, "  SNAME                          VARCHAR2(8 BYTE),"
   Print #2, "  SLONGNAME                      VARCHAR2(200 BYTE),"    Print #2, "  SLONGNAME                      VARCHAR2(200 BYTE),"
   Print #2, "  SPATH                          VARCHAR2(200 BYTE),"    Print #2, "  SPATH                          VARCHAR2(200 BYTE),"
   Print #2, "  SAUTHOR                        VARCHAR2(100 BYTE),"    Print #2, "  SAUTHOR                        VARCHAR2(100 BYTE),"
   Print #2, "  DCREATE                        DATE,"    Print #2, "  DCREATE                        DATE,"
   Print #2, "  DCHANGED                       DATE,"    Print #2, "  DCHANGED                       DATE,"
   Print #2, "  DIMPORTED                      DATE,"    Print #2, "  DIMPORTED                      DATE,"
   Print #2, "  SCONNECTION                    VARCHAR2(100 BYTE),"    Print #2, "  SCONNECTION                    VARCHAR2(100 BYTE),"
   Print #2, "  SDESCRIPTION                   VARCHAR2(2000 BYTE),"    Print #2, "  SDESCRIPTION                   VARCHAR2(2000 BYTE),"
   Print #2, "  SCOMMENT                       VARCHAR2(2000 BYTE),"    Print #2, "  SCOMMENT                       VARCHAR2(2000 BYTE),"
   Print #2, "  ICOUNTCLASSES                  NUMBER(5),"    Print #2, "  ICOUNTCLASSES                  NUMBER(5),"
   Print #2, "  ICOUNTOBJECTS                  NUMBER(5),"    Print #2, "  ICOUNTOBJECTS                  NUMBER(5),"
   Print #2, "  ICOUNTCONDITIONS               NUMBER(5),"    Print #2, "  ICOUNTCONDITIONS               NUMBER(5),"
   Print #2, "  ICOUNTTABLES                   NUMBER(5),"    Print #2, "  ICOUNTTABLES                   NUMBER(5),"
   Print #2, "  ICOUNTALIASES                  NUMBER(5),"    Print #2, "  ICOUNTALIASES                  NUMBER(5),"
   Print #2, "  ICOUNTJOINS                    NUMBER(5),"    Print #2, "  ICOUNTJOINS                    NUMBER(5),"
   Print #2, "  ICOUNTCONTEXTS                 NUMBER(5),"    Print #2, "  ICOUNTCONTEXTS                 NUMBER(5),"
   Print #2, "  ICOUNTHIERACHIES               NUMBER(5),"    Print #2, "  ICOUNTHIERACHIES               NUMBER(5),"
   Print #2, "  ICURRENTOBJECTSTRATEGY         NUMBER(5),"    Print #2, "  ICURRENTOBJECTSTRATEGY         NUMBER(5),"
   Print #2, "  ICURRENTJOINSTRATEGY           NUMBER(5),"    Print #2, "  ICURRENTJOINSTRATEGY           NUMBER(5),"
   Print #2, "  ICURRENTTABLESTRATEGY          NUMBER(5),"    Print #2, "  ICURRENTTABLESTRATEGY          NUMBER(5),"
   Print #2, "  BSQLCOMPLEXOPERATORS           NUMBER(1),"    Print #2, "  BSQLCOMPLEXOPERATORS           NUMBER(1),"
   Print #2, "  BSQLMULTIPLESQLFORCONTEXT      NUMBER(1),"    Print #2, "  BSQLMULTIPLESQLFORCONTEXT      NUMBER(1),"
   Print #2, "  BSQLMULTIPLESQLFORMEASURE      NUMBER(1),"    Print #2, "  BSQLMULTIPLESQLFORMEASURE      NUMBER(1),"
   Print #2, "  BSQLOPERATORS                  NUMBER(1),"    Print #2, "  BSQLOPERATORS                  NUMBER(1),"
   Print #2, "  BSQLPREVENTCARTESIANPRODUCTS   NUMBER(1),"    Print #2, "  BSQLPREVENTCARTESIANPRODUCTS   NUMBER(1),"
   Print #2, "  BSQLSELECTMULTIPLECONTEXTS     NUMBER(1),"    Print #2, "  BSQLSELECTMULTIPLECONTEXTS     NUMBER(1),"
   Print #2, "  BSQLSUBQUERIES                 NUMBER(1),"    Print #2, "  BSQLSUBQUERIES                 NUMBER(1),"
   Print #2, "  BLIMITEXECUTIONTIME            NUMBER(1),"    Print #2, "  BLIMITEXECUTIONTIME            NUMBER(1),"
   Print #2, "  DBLLIMITEXECUTIONTIMEVALUE     NUMBER(10),"    Print #2, "  DBLLIMITEXECUTIONTIMEVALUE     NUMBER(10),"
   Print #2, "  BLIMITSIZEOFLONGTEXTOBJECT     NUMBER(1),"    Print #2, "  BLIMITSIZEOFLONGTEXTOBJECT     NUMBER(1),"
   Print #2, "  ILIMITSIZEOFLONGTEXTOBJECTVAL  NUMBER(10),"    Print #2, "  ILIMITSIZEOFLONGTEXTOBJECTVAL  NUMBER(10),"
   Print #2, "  BLIMITSIZEOFRESULTSET          NUMBER(1),"    Print #2, "  BLIMITSIZEOFRESULTSET          NUMBER(1),"
   Print #2, "  ILIMITSIZEOFRESULTSETVALUE     NUMBER(10),"    Print #2, "  ILIMITSIZEOFRESULTSETVALUE     NUMBER(10),"
   Print #2, "  BWARNIFCOSTESTIMATEEXCEEDED    NUMBER(1),"    Print #2, "  BWARNIFCOSTESTIMATEEXCEEDED    NUMBER(1),"
   Print #2, "  DBLCOSTESTIMATEEXCEEDEDVAL     NUMBER(10)"    Print #2, "  DBLCOSTESTIMATEEXCEEDEDVAL     NUMBER(10)"
   Print #2, ");"    Print #2, ");"
   Close #2    Close #2
         
   Open oUnvProp.sPath & "\" & sWrkName For Output As #1    Open oUnvProp.sPath & "\" & sWrkName For Output As #1
   Print #1, "-- meta_UniverseProperties"    Print #1, "-- meta_UniverseProperties"
   Print #1, "insert into meta_UniverseProperties"    Print #1, "insert into meta_UniverseProperties"
   Print #1, "values ("    Print #1, "values ("
   Print #1, CStr(oUnvProp.sVersion) & ","    Print #1, CStr(oUnvProp.sVersion) & ","
   Print #1, "'" & oUnvProp.sName & "',"    Print #1, "'" & oUnvProp.sName & "',"
   Print #1, "'" & oUnvProp.sLongName & "',"    Print #1, "'" & oUnvProp.sLongName & "',"
   Print #1, "'" & oUnvProp.sPath & "',"    Print #1, "'" & oUnvProp.sPath & "',"
   Print #1, "'" & oUnvProp.sAuthor & "',"    Print #1, "'" & oUnvProp.sAuthor & "',"
   Print #1, "to_date('" & Format(oUnvProp.sCreate, "dd.mm.yyyy") & "','dd.mm.yyyy'),"    Print #1, "to_date('" & Format(oUnvProp.sCreate, "dd.mm.yyyy") & "','dd.mm.yyyy'),"
   Print #1, "to_date('" & Format(oUnvProp.sChanged, "dd.mm.yyyy") & "','dd.mm.yyyy'),"    Print #1, "to_date('" & Format(oUnvProp.sChanged, "dd.mm.yyyy") & "','dd.mm.yyyy'),"
   Print #1, "to_date('" & Format(oUnvProp.dImported, "dd.mm.yyyy") & "','dd.mm.yyyy'),"    Print #1, "to_date('" & Format(oUnvProp.dImported, "dd.mm.yyyy") & "','dd.mm.yyyy'),"
   Print #1, "'" & oUnvProp.sConnection & "',"    Print #1, "'" & oUnvProp.sConnection & "',"
   Print #1, "'" & oUnvProp.sDescription & "',"    Print #1, "'" & oUnvProp.sDescription & "',"
   Print #1, "'" & oUnvProp.sComment & "',"    Print #1, "'" & oUnvProp.sComment & "',"
   Print #1, CStr(oUnvProp.iCountClasses) & ","    Print #1, CStr(oUnvProp.iCountClasses) & ","
   Print #1, CStr(oUnvProp.iCountObjects) & ","    Print #1, CStr(oUnvProp.iCountObjects) & ","
   Print #1, CStr(oUnvProp.iCountConditions) & ","    Print #1, CStr(oUnvProp.iCountConditions) & ","
   Print #1, CStr(oUnvProp.iCountTables) & ","    Print #1, CStr(oUnvProp.iCountTables) & ","
   Print #1, CStr(oUnvProp.iCountAliases) & ","    Print #1, CStr(oUnvProp.iCountAliases) & ","
   Print #1, CStr(oUnvProp.iCountJoins) & ","    Print #1, CStr(oUnvProp.iCountJoins) & ","
   Print #1, CStr(oUnvProp.iCountContexts) & ","    Print #1, CStr(oUnvProp.iCountContexts) & ","
   Print #1, CStr(oUnvProp.iCountHierachies) & ","    Print #1, CStr(oUnvProp.iCountHierachies) & ","
   Print #1, CStr(oUnvProp.iCurrentObjectStrategy) & ","    Print #1, CStr(oUnvProp.iCurrentObjectStrategy) & ","
   Print #1, CStr(oUnvProp.iCurrentJoinStrategy) & ","    Print #1, CStr(oUnvProp.iCurrentJoinStrategy) & ","
   Print #1, CStr(oUnvProp.iCurrentTableStrategy) & ","    Print #1, CStr(oUnvProp.iCurrentTableStrategy) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLComplexOperators, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLComplexOperators, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLMultipleSQLForContext, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLMultipleSQLForContext, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLMultipleSQLForMeasure, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLMultipleSQLForMeasure, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLOperators, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLOperators, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLPreventCartesianProducts, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLPreventCartesianProducts, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLSelectMultipleContexts, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLSelectMultipleContexts, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bSQLSubQueries, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bSQLSubQueries, 1, 0)) & ","
   Print #1, CStr(IIf(oUnvProp.bLimitExecutionTime, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bLimitExecutionTime, 1, 0)) & ","
   Print #1, CStr(oUnvProp.dblLimitExecutionTimeValue) & ","    Print #1, CStr(oUnvProp.dblLimitExecutionTimeValue) & ","
   Print #1, CStr(IIf(oUnvProp.bLimitSizeOfLongTextObject, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bLimitSizeOfLongTextObject, 1, 0)) & ","
   Print #1, CStr(oUnvProp.dblLimitSizeOfLongTextObjectValue) & ","    Print #1, CStr(oUnvProp.dblLimitSizeOfLongTextObjectValue) & ","
   Print #1, CStr(IIf(oUnvProp.bLimitSizeofResultSet, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bLimitSizeofResultSet, 1, 0)) & ","
   Print #1, CStr(oUnvProp.dblLimitSizeofResultSetValue) & ","    Print #1, CStr(oUnvProp.dblLimitSizeofResultSetValue) & ","
   Print #1, CStr(IIf(oUnvProp.bWarnIfCostEstimateExceeded, 1, 0)) & ","    Print #1, CStr(IIf(oUnvProp.bWarnIfCostEstimateExceeded, 1, 0)) & ","
   Print #1, CStr(oUnvProp.dblCostEstimateExceededValue)    Print #1, CStr(oUnvProp.dblCostEstimateExceededValue)
   Print #1, ");"    Print #1, ");"
   Print #1,    Print #1,
   Print #1, "-- meta_UniverseProperties"    Print #1, "-- meta_UniverseProperties"
   For iEntry = 1 To UBound(oUnvParams)    For iEntry = 1 To UBound(oUnvParams)
       Print #1, "insert into meta_UniverseParameters"        Print #1, "insert into meta_UniverseParameters"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
                 
       Print #1, "'" & oUnvParams(iEntry).sName & "',"        Print #1, "'" & oUnvParams(iEntry).sName & "',"
       Print #1, "'" & oUnvParams(iEntry).sValue & "'"        Print #1, "'" & oUnvParams(iEntry).sValue & "'"
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_Classes"    Print #1, "-- meta_Classes"
   For iEntry = 1 To UBound(oClasses)    For iEntry = 1 To UBound(oClasses)
       Print #1, "insert into meta_Classes"        Print #1, "insert into meta_Classes"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oClasses(iEntry).iParentId) & ","        Print #1, CStr(oClasses(iEntry).iParentId) & ","
       Print #1, CStr(oClasses(iEntry).iCountClasses) & ","        Print #1, CStr(oClasses(iEntry).iCountClasses) & ","
       Print #1, CStr(oClasses(iEntry).iLevel) & ","        Print #1, CStr(oClasses(iEntry).iLevel) & ","
       Print #1, "'" & oClasses(iEntry).sDescription & "',"        Print #1, "'" & oClasses(iEntry).sDescription & "',"
       Print #1, IIf(oClasses(iEntry).bIsVisible, 1, 0) & ","        Print #1, IIf(oClasses(iEntry).bIsVisible, 1, 0) & ","
       Print #1, "'" & oClasses(iEntry).sName & "'"        Print #1, "'" & oClasses(iEntry).sName & "'"
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_Classes"    Print #1, "-- meta_Classes"
   For iEntry = 1 To UBound(oHierarchies)    For iEntry = 1 To UBound(oHierarchies)
       Print #1, "insert into meta_HierarchyProperties"        Print #1, "insert into meta_HierarchyProperties"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, "'" & oHierarchies(iEntry).sName & "',"        Print #1, "'" & oHierarchies(iEntry).sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oHierarchies(iEntry).iObjectID) & ","        Print #1, CStr(oHierarchies(iEntry).iObjectID) & ","
       Print #1, CStr(oHierarchies(iEntry).iClassId) & ","        Print #1, CStr(oHierarchies(iEntry).iClassId) & ","
       Print #1, "'" & oHierarchies(iEntry).sObjectName & "',"        Print #1, "'" & oHierarchies(iEntry).sObjectName & "',"
       Print #1, "'" & oHierarchies(iEntry).sClassName & "',"        Print #1, "'" & oHierarchies(iEntry).sClassName & "',"
       Print #1, IIf(oHierarchies(iEntry).bIsVisible, 1, 0)        Print #1, IIf(oHierarchies(iEntry).bIsVisible, 1, 0)
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_ObjectProperties"    Print #1, "-- meta_ObjectProperties"
   For iEntry = 1 To UBound(oObjects)    For iEntry = 1 To UBound(oObjects)
       Print #1, "insert into meta_ObjectProperties"        Print #1, "insert into meta_ObjectProperties"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, "'" & oObjects(iEntry).sName & "',"        Print #1, "'" & oObjects(iEntry).sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oObjects(iEntry).iClassId) & ","        Print #1, CStr(oObjects(iEntry).iClassId) & ","
       Print #1, "'" & oObjects(iEntry).sClassName & "',"        Print #1, "'" & oObjects(iEntry).sClassName & "',"
       Print #1, "'" & Replace(oObjects(iEntry).sDescription, "'", """") & "',"        Print #1, "'" & Replace(oObjects(iEntry).sDescription, "'", """") & "',"
       Print #1, "'" & Replace(oObjects(iEntry).sSelect, "'", """") & "',"        Print #1, "'" & Replace(oObjects(iEntry).sSelect, "'", """") & "',"
       Print #1, "'" & Replace(oObjects(iEntry).sWhere, "'", """") & "',"        Print #1, "'" & Replace(oObjects(iEntry).sWhere, "'", """") & "',"
       Print #1, CStr(oObjects(iEntry).iDataBaseFormat) & ","        Print #1, CStr(oObjects(iEntry).iDataBaseFormat) & ","
       Print #1, CStr(oObjects(iEntry).iQualification) & ","        Print #1, CStr(oObjects(iEntry).iQualification) & ","
       Print #1, oObjects(iEntry).iAggregateFunction & ","        Print #1, oObjects(iEntry).iAggregateFunction & ","
       Print #1, IIf(oObjects(iEntry).bIsVisible, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bIsVisible, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bCanBeUsedCondition, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bCanBeUsedCondition, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bCanBeUsedResult, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bCanBeUsedResult, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bCanBeUsedSort, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bCanBeUsedSort, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bAllowUserToEditLov, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bAllowUserToEditLov, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bAutomaticLovRefreshBeforeUse, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bAutomaticLovRefreshBeforeUse, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bExportLovWithUniverse, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bExportLovWithUniverse, 1, 0) & ","
       Print #1, IIf(oObjects(iEntry).bHasListOfValues, 1, 0) & ","        Print #1, IIf(oObjects(iEntry).bHasListOfValues, 1, 0) & ","
       Print #1, "'" & oObjects(iEntry).sListOfValuesName & "',"        Print #1, "'" & oObjects(iEntry).sListOfValuesName & "',"
       Print #1, CStr(oObjects(iEntry).iCountObjects) & ","        Print #1, CStr(oObjects(iEntry).iCountObjects) & ","
       Print #1, CStr(oObjects(iEntry).iSecurityAccessLevel) & ","        Print #1, CStr(oObjects(iEntry).iSecurityAccessLevel) & ","
       Print #1, CStr(oObjects(iEntry).iType) & ","        Print #1, CStr(oObjects(iEntry).iType) & ","
       Print #1, IIf(oObjects(iEntry).bUseHierarchicalDisplay, 1, 0)        Print #1, IIf(oObjects(iEntry).bUseHierarchicalDisplay, 1, 0)
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_Dependencies"    Print #1, "-- meta_Dependencies"
   For iEntry = 1 To UBound(oObjectTableDependencies)    For iEntry = 1 To UBound(oObjectTableDependencies)
       Print #1, "insert into meta_Dependencies"        Print #1, "insert into meta_Dependencies"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oObjectTableDependencies(iEntry).iObjectID) & ","        Print #1, CStr(oObjectTableDependencies(iEntry).iObjectID) & ","
       Print #1, CStr(oObjectTableDependencies(iEntry).iTableId) & ","        Print #1, CStr(oObjectTableDependencies(iEntry).iTableId) & ","
       Print #1, CStr(oObjectTableDependencies(iEntry).iColumnId) & ","        Print #1, CStr(oObjectTableDependencies(iEntry).iColumnId) & ","
       Print #1, "'" & oObjectTableDependencies(iEntry).sClassName & "',"        Print #1, "'" & oObjectTableDependencies(iEntry).sClassName & "',"
       Print #1, "'" & oObjectTableDependencies(iEntry).sObjectName & "',"        Print #1, "'" & oObjectTableDependencies(iEntry).sObjectName & "',"
       Print #1, "'" & oObjectTableDependencies(iEntry).sTableName & "',"        Print #1, "'" & oObjectTableDependencies(iEntry).sTableName & "',"
       Print #1, "'" & oObjectTableDependencies(iEntry).sTableOriginalName & "',"        Print #1, "'" & oObjectTableDependencies(iEntry).sTableOriginalName & "',"
       Print #1, "'" & oObjectTableDependencies(iEntry).sColumnName & "',"        Print #1, "'" & oObjectTableDependencies(iEntry).sColumnName & "',"
       Print #1, CStr(oObjectTableDependencies(iEntry).iSource) & ","        Print #1, CStr(oObjectTableDependencies(iEntry).iSource) & ","
       Print #1, IIf(oObjectTableDependencies(iEntry).bIsDerived, 1, 0)        Print #1, IIf(oObjectTableDependencies(iEntry).bIsDerived, 1, 0)
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_ObjectKeys"    Print #1, "-- meta_ObjectKeys"
   For iEntry = 1 To UBound(oObjectKeys)    For iEntry = 1 To UBound(oObjectKeys)
       Print #1, "insert into meta_ObjectKeys"        Print #1, "insert into meta_ObjectKeys"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oObjectKeys(iEntry).iClassId) & ","        Print #1, CStr(oObjectKeys(iEntry).iClassId) & ","
       Print #1, CStr(oObjectKeys(iEntry).iObjectID) & ","        Print #1, CStr(oObjectKeys(iEntry).iObjectID) & ","
       Print #1, "'" & oObjectKeys(iEntry).sClassName & "',"        Print #1, "'" & oObjectKeys(iEntry).sClassName & "',"
       Print #1, "'" & oObjectKeys(iEntry).sObjectName & "',"        Print #1, "'" & oObjectKeys(iEntry).sObjectName & "',"
       Print #1, "'" & Replace(oObjectKeys(iEntry).sSelect, "'", """") & "',"        Print #1, "'" & Replace(oObjectKeys(iEntry).sSelect, "'", """") & "',"
       Print #1, "'" & Replace(oObjectKeys(iEntry).sWhere, "'", """") & "',"        Print #1, "'" & Replace(oObjectKeys(iEntry).sWhere, "'", """") & "',"
       Print #1, IIf(oObjectKeys(iEntry).bEnable, 1, 0) & ","        Print #1, IIf(oObjectKeys(iEntry).bEnable, 1, 0) & ","
       Print #1, CStr(oObjectKeys(iEntry).iType)        Print #1, CStr(oObjectKeys(iEntry).iType)
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_AllTables"    Print #1, "-- meta_AllTables"
   For iEntry = 1 To UBound(oTables)    For iEntry = 1 To UBound(oTables)
       Print #1, "insert into meta_AllTables"        Print #1, "insert into meta_AllTables"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, "'" & oTables(iEntry).sName & "',"        Print #1, "'" & oTables(iEntry).sName & "',"
       Print #1, CStr(oTables(iEntry).iIdOriginalTable) & ","        Print #1, CStr(oTables(iEntry).iIdOriginalTable) & ","
       Print #1, "'" & oTables(iEntry).sOriginalTable & "',"        Print #1, "'" & oTables(iEntry).sOriginalTable & "',"
       Print #1, IIf(oTables(iEntry).bIsAlias, 1, 0) & ","        Print #1, IIf(oTables(iEntry).bIsAlias, 1, 0) & ","
       Print #1, IIf(oTables(iEntry).bIsDerived, 1, 0) & ","        Print #1, IIf(oTables(iEntry).bIsDerived, 1, 0) & ","
       Print #1, "'" & Replace(oTables(iEntry).sSqlOfDerivedTable, "'", """") & "',"        Print #1, "'" & Replace(oTables(iEntry).sSqlOfDerivedTable, "'", """") & "',"
       Print #1, "'" & Replace(oTables(iEntry).sSqlOfDerivedTableWithAlias, "'", """") & "'"        Print #1, "'" & Replace(oTables(iEntry).sSqlOfDerivedTableWithAlias, "'", """") & "'"
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_OriginalTables"    Print #1, "-- meta_OriginalTables"
   For iEntry = 1 To UBound(oOriginalTables)    For iEntry = 1 To UBound(oOriginalTables)
       Print #1, "insert into meta_OriginalTables"        Print #1, "insert into meta_OriginalTables"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, "'" & oOriginalTables(iEntry).sName & "'"        Print #1, "'" & oOriginalTables(iEntry).sName & "'"
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_TableColumns"    Print #1, "-- meta_TableColumns"
   For iEntry = 1 To UBound(oTableColumns)    For iEntry = 1 To UBound(oTableColumns)
       Print #1, "insert into meta_TableColumns"        Print #1, "insert into meta_TableColumns"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, CStr(oTableColumns(iEntry).iTableId) & ","        Print #1, CStr(oTableColumns(iEntry).iTableId) & ","
       Print #1, "'" & oTableColumns(iEntry).sTableName & "',"        Print #1, "'" & oTableColumns(iEntry).sTableName & "',"
       Print #1, "'" & oTableColumns(iEntry).sName & "',"        Print #1, "'" & oTableColumns(iEntry).sName & "',"
       Print #1, CStr(oTableColumns(iEntry).iType) & ","        Print #1, CStr(oTableColumns(iEntry).iType) & ","
       Print #1, CStr(oTableColumns(iEntry).iKey)        Print #1, CStr(oTableColumns(iEntry).iKey)
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1,    Print #1,
   Print #1, "-- meta_ContextProperties"    Print #1, "-- meta_ContextProperties"
   For iEntry = 1 To UBound(oContexts)    For iEntry = 1 To UBound(oContexts)
       Print #1, "insert into meta_ContextProperties"        Print #1, "insert into meta_ContextProperties"
       Print #1, "values ("        Print #1, "values ("
       Print #1, CStr(oUnvProp.sVersion) & ","        Print #1, CStr(oUnvProp.sVersion) & ","
       Print #1, "'" & oUnvProp.sName & "',"        Print #1, "'" & oUnvProp.sName & "',"
       Print #1, CStr(iEntry) & ","        Print #1, CStr(iEntry) & ","
       Print #1, "'" & oContexts(iEntry).sName & "',"        Print #1, "'" & oContexts(iEntry).sName & "',"
       Print #1, "'" & oContexts(iEntry).sDescription & "',"        Print #1, "'" & oContexts(iEntry).sDescription & "',"
       Print #1, "'" & oContexts(iEntry).sFirstTable & "',"        Print #1, "'" & oContexts(iEntry).sFirstTable & "',"
       Print #1, CStr(oContexts(iEntry).iFirstTableId) & ","        Print #1, CStr(oContexts(iEntry).iFirstTableId) & ","
       Print #1, "'" & oContexts(iEntry).sSecondTable & "',"        Print #1, "'" & oContexts(iEntry).sSecondTable & "',"
       Print #1, CStr(oContexts(iEntry).iSecondTable) & ","        Print #1, CStr(oContexts(iEntry).iSecondTable) & ","
       Print #1, "'" & oContexts(iEntry).sFirstColumn & "',"        Print #1, "'" & oContexts(iEntry).sFirstColumn & "',"
       Print #1, CStr(oContexts(iEntry).iFirstColumn) & ","        Print #1, CStr(oContexts(iEntry).iFirstColumn) & ","
       Print #1, "'" & oContexts(iEntry).sSecondColumn & "',"        Print #1, "'" & oContexts(iEntry).sSecondColumn & "',"
       Print #1, CStr(oContexts(iEntry).iSecondColumn) & ","        Print #1, CStr(oContexts(iEntry).iSecondColumn) & ","
       Print #1, "'" & Replace(oContexts(iEntry).sExpression, "'", """") & "'"        Print #1, "'" & Replace(oContexts(iEntry).sExpression, "'", """") & "'"
       Print #1, ");"        Print #1, ");"
       Print #1,        Print #1,
   Next iEntry    Next iEntry
   Print #1, "commit;"    Print #1, "commit;"
   Close #1    Close #1
         
   Exit Sub    Exit Sub
LogonBreak: LogonBreak:
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
   Close #1    Close #1
End Sub End Sub
Private Sub WriteUniverseXLS() Private Sub WriteUniverseXLS()
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLS" sProcName = "WriteUniverseXLS"
   
Dim oXls As Excel.Application Dim oXls As Excel.Application
   
Dim bGetData As Boolean Dim bGetData As Boolean
   
On Error GoTo Err On Error GoTo Err
                 
   vbLang = iGetLanguage    vbLang = iGetLanguage
   vbErrHand = iGetErrHand    vbErrHand = iGetErrHand
         
   If vbModus = vbModusDemo Then    If vbModus = vbModusDemo Then
       Select Case vbLang        Select Case vbLang
       Case 49 'german        Case 49 'german
           MsgBox "Demomodus." & vbCrLf & _            MsgBox "Demomodus." & vbCrLf & _
                  "In der Demonstration werden lediglich" & vbCrLf & _                   "In der Demonstration werden lediglich" & vbCrLf & _
                  "50% der Informationen verarbeitet.", vbInformation, _                   "50% der Informationen verarbeitet.", vbInformation, _
                  Title:=vbVersion                   Title:=vbVersion
       Case Else ' english        Case Else ' english
           MsgBox "Demo mode." & vbCrLf & _            MsgBox "Demo mode." & vbCrLf & _
                  "For demonstration" & vbCrLf & _                   "For demonstration" & vbCrLf & _
                  "50% of data will be processed only.", vbInformation, _                   "50% of data will be processed only.", vbInformation, _
                  Title:=vbVersion                   Title:=vbVersion
   End Select    End Select
   End If    End If
   
   Set oXls = Excel.Application    Set oXls = Excel.Application
   oXls.Interactive = False    oXls.Interactive = False
   oXls.DisplayAlerts = False    oXls.DisplayAlerts = False
         
   'Call GetControlData    'Call GetControlData
         
   bGetData = bGetUniverse    bGetData = bGetUniverse
   If bGetData = False Then GoTo LogonBreak    If bGetData = False Then GoTo LogonBreak
         
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           Call DefinitionOfDimensionTablesDE            Call DefinitionOfDimensionTablesDE
                 
       Case Else ' english        Case Else ' english
           Call DefinitionOfDimensionTablesEN            Call DefinitionOfDimensionTablesEN
   End Select    End Select
         
   Call WriteUniverseXLSInfos(ActiveWorkbook)    Call WriteUniverseXLSInfos(ActiveWorkbook)
   Call WriteUniverseXLSObjects(ActiveWorkbook)    Call WriteUniverseXLSObjects(ActiveWorkbook)
   Call WriteUniverseXLSObjectsCopy(ActiveWorkbook)    Call WriteUniverseXLSObjectsCopy(ActiveWorkbook)
         
   oXls.Interactive = True    oXls.Interactive = True
   oXls.DisplayAlerts = True    oXls.DisplayAlerts = True
         
   Set oXls = Nothing    Set oXls = Nothing
   Exit Sub    Exit Sub
LogonBreak: LogonBreak:
   oXls.Interactive = True    oXls.Interactive = True
   oXls.DisplayAlerts = True    oXls.DisplayAlerts = True
         
   Set oXls = Nothing    Set oXls = Nothing
   Exit Sub    Exit Sub
Err: Err:
   oXls.Interactive = True    oXls.Interactive = True
   oXls.DisplayAlerts = True    oXls.DisplayAlerts = True
         
   Set oXls = Nothing    Set oXls = Nothing
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub ExportUniverseXLS() Private Sub ExportUniverseXLS()
Dim sProcName As String Dim sProcName As String
sProcName = "ExportUniverseXLS" sProcName = "ExportUniverseXLS"
   
Dim oXls As Excel.Application Dim oXls As Excel.Application
Dim oWrk As Excel.Workbook Dim oWrk As Excel.Workbook
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
   
Dim sWrkName As String Dim sWrkName As String
Dim bGetData  As Boolean Dim bGetData  As Boolean
   
On Error GoTo Err On Error GoTo Err
   
   vbLang = iGetLanguage    vbLang = iGetLanguage
   vbErrHand = iGetErrHand    vbErrHand = iGetErrHand
         
   If vbModus = vbModusDemo Then    If vbModus = vbModusDemo Then
       Select Case vbLang        Select Case vbLang
       Case 49 'german        Case 49 'german
           MsgBox "Demomodus." & vbCrLf & _            MsgBox "Demomodus." & vbCrLf & _
                  "In der Demonstration werden lediglich" & vbCrLf & _                   "In der Demonstration werden lediglich" & vbCrLf & _
                  "50% der Informationen verarbeitet.", vbInformation, _                   "50% der Informationen verarbeitet.", vbInformation, _
                  Title:=vbVersion                   Title:=vbVersion
       Case Else ' english        Case Else ' english
           MsgBox "Demo mode." & vbCrLf & _            MsgBox "Demo mode." & vbCrLf & _
                  "For demonstration" & vbCrLf & _                   "For demonstration" & vbCrLf & _
                  "50% of data will be processed only.", vbInformation, _                   "50% of data will be processed only.", vbInformation, _
                  Title:=vbVersion                   Title:=vbVersion
   End Select    End Select
   End If    End If
                 
   Call GetControlData    Call GetControlData
         
   bGetData = bGetUniverse    bGetData = bGetUniverse
   If bGetData = False Then GoTo LogonBreak    If bGetData = False Then GoTo LogonBreak
                 
   Set oXls = Excel.Application    Set oXls = Excel.Application
   Set oWrk = oXls.Workbooks.Add    Set oWrk = oXls.Workbooks.Add
         
   oXls.Interactive = False    oXls.Interactive = False
   oXls.DisplayAlerts = False    oXls.DisplayAlerts = False
   sWrkName = oUnvProp.sName & "_v" & oUnvProp.sVersion & "_" & CStr(Format(Now, "yyyymmdd_hhmmss_")) & ".xls"    sWrkName = oUnvProp.sName & "_v" & oUnvProp.sVersion & "_" & CStr(Format(Now, "yyyymmdd_hhmmss_")) & ".xls"
         
   oWrk.SaveAs oUnvProp.sPath & "\" & sWrkName    oWrk.SaveAs oUnvProp.sPath & "\" & sWrkName
         
   While oWrk.Worksheets.Count > 1    While oWrk.Worksheets.Count > 1
       oWrk.Worksheets(1).Delete        oWrk.Worksheets(1).Delete
   Wend    Wend
   oWrk.Worksheets(1).Name = "master"    oWrk.Worksheets(1).Name = "master"
         
   Select Case oXls.International(xlCountryCode)    Select Case oXls.International(xlCountryCode)
       Case 49 'german        Case 49 'german
               Call DefinitionOfDimensionTablesDE                Call DefinitionOfDimensionTablesDE
         
       Case Else ' english        Case Else ' english
               Call DefinitionOfDimensionTablesEN                Call DefinitionOfDimensionTablesEN
   
   End Select    End Select
   
   If oControl.bExecInfo Then Call WriteUniverseXLSInfos(oWrk)    If oControl.bExecInfo Then Call WriteUniverseXLSInfos(oWrk)
   If oControl.bExecParameter Then Call WriteUniverseXLSParameters(oWrk)    If oControl.bExecParameter Then Call WriteUniverseXLSParameters(oWrk)
   If oControl.bExecObject Then Call WriteUniverseXLSObjectsComplete(oWrk)    If oControl.bExecObject Then Call WriteUniverseXLSObjectsComplete(oWrk)
   If oControl.bExecDependency Then Call WriteUniverseXLSDependecies(oWrk)    If oControl.bExecDependency Then Call WriteUniverseXLSDependecies(oWrk)
   If oControl.bExecHier Then Call WriteUniverseXLSHierarchies(ActiveWorkbook)    If oControl.bExecHier Then Call WriteUniverseXLSHierarchies(ActiveWorkbook)
   If oControl.bExecContext Then Call WriteUniverseXLSContexts(oWrk)    If oControl.bExecContext Then Call WriteUniverseXLSContexts(oWrk)
   If oControl.bExecJoin Then Call WriteUniverseXLSJoins(ActiveWorkbook)    If oControl.bExecJoin Then Call WriteUniverseXLSJoins(ActiveWorkbook)
   If oControl.bExecIncomb Then Call WriteUniverseXLSInCombs(oWrk)    If oControl.bExecIncomb Then Call WriteUniverseXLSInCombs(oWrk)
         
         
   oXls.Worksheets(1).Activate    oXls.Worksheets(1).Activate
   oXls.Interactive = True    oXls.Interactive = True
   oWrk.Save    oWrk.Save
   oWrk.Close    oWrk.Close
         
   oXls.DisplayAlerts = True    oXls.DisplayAlerts = True
   Set oWrk = Nothing    Set oWrk = Nothing
   Set oXls = Nothing    Set oXls = Nothing
         
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           MsgBox "Export in die Datei" & vbCrLf & _            MsgBox "Export in die Datei" & vbCrLf & _
                   oUnvProp.sPath & "\" & sWrkName & vbCrLf & _                    oUnvProp.sPath & "\" & sWrkName & vbCrLf & _
                   "erfolgreich.", vbInformation, Title:=vbVersion                    "erfolgreich.", vbInformation, Title:=vbVersion
       Case Else ' english        Case Else ' english
           MsgBox "Export to file" & vbCrLf & _            MsgBox "Export to file" & vbCrLf & _
                   oUnvProp.sPath & "\" & sWrkName & vbCrLf & _                    oUnvProp.sPath & "\" & sWrkName & vbCrLf & _
                   "successful.", vbInformation, Title:=vbVersion                    "successful.", vbInformation, Title:=vbVersion
   End Select    End Select
         
   Exit Sub    Exit Sub
LogonBreak: LogonBreak:
   Exit Sub    Exit Sub
   
Err: Err:
   oXls.DisplayAlerts = True    oXls.DisplayAlerts = True
   oXls.Interactive = True    oXls.Interactive = True
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSObjects(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSObjects(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSObjects" sProcName = "WriteUniverseXLSObjects"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iObject As Integer Dim iObject As Integer
Dim iMaxObject As Integer Dim iMaxObject As Integer
   
On Error GoTo Err On Error GoTo Err
                 
   iSh = iCreateWorksheet(oMyWrk, "objects_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "obj_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
         
   'init    'init
   Select Case vbLang    Select Case vbLang
   Case 49 'german    Case 49 'german
       oSh.Cells(1, colObjClassId).Value = "Klasse ID"        oSh.Cells(1, colObjClassId).Value = "Klasse ID"
       oSh.Cells(1, colObjObjectId).Value = "Objekt ID"        oSh.Cells(1, colObjObjectId).Value = "Objekt ID"
       oSh.Cells(1, colObjClassName).Value = "Klasse Name"        oSh.Cells(1, colObjClassName).Value = "Klasse Name"
       oSh.Cells(1, colObjObjectName).Value = "Objekt Name"        oSh.Cells(1, colObjObjectName).Value = "Objekt Name"
       oSh.Cells(1, colObjObjectType).Value = "Objekt Typ"        oSh.Cells(1, colObjObjectType).Value = "Objekt Typ"
       oSh.Cells(1, colObjDataType).Value = "Datentyp"        oSh.Cells(1, colObjDataType).Value = "Datentyp"
       oSh.Cells(1, colObjDescription).Value = "Beschreibung"        oSh.Cells(1, colObjDescription).Value = "Beschreibung"
       oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"        oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"
       oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"        oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"
       oSh.Cells(1, colObjHidden).Value = "Ausgeblendet"        oSh.Cells(1, colObjHidden).Value = "Ausgeblendet"
                 
   Case Else ' english    Case Else ' english
       oSh.Cells(1, colObjClassId).Value = "Class ID"        oSh.Cells(1, colObjClassId).Value = "Class ID"
       oSh.Cells(1, colObjObjectId).Value = "Object ID"        oSh.Cells(1, colObjObjectId).Value = "Object ID"
       oSh.Cells(1, colObjClassName).Value = "Class name"        oSh.Cells(1, colObjClassName).Value = "Class name"
       oSh.Cells(1, colObjObjectName).Value = "Object name"        oSh.Cells(1, colObjObjectName).Value = "Object name"
       oSh.Cells(1, colObjObjectType).Value = "Data Type"        oSh.Cells(1, colObjObjectType).Value = "Data Type"
       oSh.Cells(1, colObjDataType).Value = "Object type"        oSh.Cells(1, colObjDataType).Value = "Object type"
       oSh.Cells(1, colObjDescription).Value = "Description"        oSh.Cells(1, colObjDescription).Value = "Description"
       oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"        oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"
       oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"        oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"
       oSh.Cells(1, colObjHidden).Value = "Hidden"        oSh.Cells(1, colObjHidden).Value = "Hidden"
                 
   End Select    End Select
   
   oSh.Cells(1, colObjClassId).Font.Bold = True    oSh.Cells(1, colObjClassId).Font.Bold = True
   oSh.Columns(colObjClassId).NumberFormat = "@"    oSh.Columns(colObjClassId).NumberFormat = "@"
   oSh.Columns(colObjClassId).ColumnWidth = 5    oSh.Columns(colObjClassId).ColumnWidth = 5
                 
   oSh.Cells(1, colObjObjectId).Font.Bold = True    oSh.Cells(1, colObjObjectId).Font.Bold = True
   oSh.Columns(colObjObjectId).NumberFormat = "@"    oSh.Columns(colObjObjectId).NumberFormat = "@"
   oSh.Columns(colObjObjectId).ColumnWidth = 5    oSh.Columns(colObjObjectId).ColumnWidth = 5
                 
   oSh.Cells(1, colObjClassName).Font.Bold = True    oSh.Cells(1, colObjClassName).Font.Bold = True
   oSh.Columns(colObjClassName).NumberFormat = "@"    oSh.Columns(colObjClassName).NumberFormat = "@"
   oSh.Columns(colObjClassName).ColumnWidth = 30    oSh.Columns(colObjClassName).ColumnWidth = 30
                 
   oSh.Cells(1, colObjObjectName).Font.Bold = True    oSh.Cells(1, colObjObjectName).Font.Bold = True
   oSh.Columns(colObjObjectName).NumberFormat = "@"    oSh.Columns(colObjObjectName).NumberFormat = "@"
   oSh.Columns(colObjObjectName).ColumnWidth = 30    oSh.Columns(colObjObjectName).ColumnWidth = 30
                 
   oSh.Cells(1, colObjObjectType).Font.Bold = True    oSh.Cells(1, colObjObjectType).Font.Bold = True
   oSh.Columns(colObjObjectType).NumberFormat = "@"    oSh.Columns(colObjObjectType).NumberFormat = "@"
   oSh.Columns(colObjObjectType).ColumnWidth = 10    oSh.Columns(colObjObjectType).ColumnWidth = 10
                 
   oSh.Cells(1, colObjDataType).Font.Bold = True    oSh.Cells(1, colObjDataType).Font.Bold = True
   oSh.Columns(colObjDataType).NumberFormat = "@"    oSh.Columns(colObjDataType).NumberFormat = "@"
   oSh.Columns(colObjDataType).ColumnWidth = 15    oSh.Columns(colObjDataType).ColumnWidth = 15
                 
   oSh.Cells(1, colObjDescription).Font.Bold = True    oSh.Cells(1, colObjDescription).Font.Bold = True
   oSh.Columns(colObjDescription).NumberFormat = "@"    oSh.Columns(colObjDescription).NumberFormat = "@"
   oSh.Columns(colObjDescription).ColumnWidth = 30    oSh.Columns(colObjDescription).ColumnWidth = 30
                 
   oSh.Cells(1, colObjSqlSelect).Font.Bold = True    oSh.Cells(1, colObjSqlSelect).Font.Bold = True
   oSh.Columns(colObjSqlSelect).NumberFormat = "@"    oSh.Columns(colObjSqlSelect).NumberFormat = "@"
   oSh.Columns(colObjSqlSelect).ColumnWidth = 30    oSh.Columns(colObjSqlSelect).ColumnWidth = 30
                 
   oSh.Cells(1, colObjSQLWhere).Font.Bold = True    oSh.Cells(1, colObjSQLWhere).Font.Bold = True
   oSh.Columns(colObjSQLWhere).NumberFormat = "@"    oSh.Columns(colObjSQLWhere).NumberFormat = "@"
   oSh.Columns(colObjSQLWhere).ColumnWidth = 30    oSh.Columns(colObjSQLWhere).ColumnWidth = 30
                 
   oSh.Cells(1, colObjHidden).Font.Bold = True    oSh.Cells(1, colObjHidden).Font.Bold = True
   oSh.Columns(colObjHidden).NumberFormat = "@"    oSh.Columns(colObjHidden).NumberFormat = "@"
   oSh.Columns(colObjHidden).ColumnWidth = 5    oSh.Columns(colObjHidden).ColumnWidth = 5
         
   ' data    ' data
   ' demo mode    ' demo mode
   ' only the first half of data will be outputted    ' only the first half of data will be outputted
   iMaxObject = IIf(vbModus = vbModusLive, UBound(oObjects), UBound(oObjects) / 2)    iMaxObject = IIf(vbModus = vbModusLive, UBound(oObjects), UBound(oObjects) / 2)
         
   If iMaxObject > 0 Then    If iMaxObject > 0 Then
      For iObject = 1 To iMaxObject       For iObject = 1 To iMaxObject
          oSh.Cells(iObject + 1, colObjClassId).Value = oObjects(iObject).iClassId           oSh.Cells(iObject + 1, colObjClassId).Value = oObjects(iObject).iClassId
          oSh.Cells(iObject + 1, colObjObjectId).Value = oObjects(iObject).iObjectID           oSh.Cells(iObject + 1, colObjObjectId).Value = oObjects(iObject).iObjectID
          oSh.Cells(iObject + 1, colObjClassName).Value = oObjects(iObject).sClassName           oSh.Cells(iObject + 1, colObjClassName).Value = oObjects(iObject).sClassName
          oSh.Cells(iObject + 1, colObjObjectName).Value = oObjects(iObject).sName           oSh.Cells(iObject + 1, colObjObjectName).Value = oObjects(iObject).sName
          Select Case oObjects(iObject).iQualification           Select Case oObjects(iObject).iQualification
              Case dsDimensionObject               Case dsDimensionObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(1).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(1).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDimensionObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDimensionObject
              Case dsDetailObject               Case dsDetailObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(2).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(2).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDetailObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDetailObject
              Case dsMeasureObject               Case dsMeasureObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(3).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(3).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsMeasureObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsMeasureObject
              Case 4               Case 4
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(4).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(4).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsConditionObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsConditionObject
              Case Else               Case Else
                  oSh.Cells(iObject + 1, colObjObjectType).Value = "unbekannt"                   oSh.Cells(iObject + 1, colObjObjectType).Value = "unbekannt"
          End Select           End Select
                       
          Select Case oObjects(iObject).iType           Select Case oObjects(iObject).iType
              Case dsNumericObject               Case dsNumericObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(1).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(1).sType
              Case dsCharacterObject               Case dsCharacterObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(2).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(2).sType
         
              Case dsDateObject               Case dsDateObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(3).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(3).sType
              Case dsBlobObject               Case dsBlobObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(4).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(4).sType
              Case dsUnknownObject               Case dsUnknownObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(5).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(5).sType
              Case dsNullObject               Case dsNullObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(6).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(6).sType
          End Select           End Select
                       
          oSh.Cells(iObject + 1, colObjDescription).Value = oObjects(iObject).sDescription           oSh.Cells(iObject + 1, colObjDescription).Value = "'" & oObjects(iObject).sDescription
          oSh.Cells(iObject + 1, colObjSqlSelect).Value = oObjects(iObject).sSelect           oSh.Cells(iObject + 1, colObjSqlSelect).Value = "'" & oObjects(iObject).sSelect
          oSh.Cells(iObject + 1, colObjSQLWhere).Value = oObjects(iObject).sWhere           oSh.Cells(iObject + 1, colObjSQLWhere).Value = "'" & oObjects(iObject).sWhere
          oSh.Cells(iObject + 1, colObjHidden).Value = IIf(oObjects(iObject).bIsVisible, "", "x")           oSh.Cells(iObject + 1, colObjHidden).Value = IIf(oObjects(iObject).bIsVisible, "", "x")
      Next iObject       Next iObject
               
      If vbModus = vbModusDemo Then       If vbModus = vbModusDemo Then
          oSh.Rows(iObject + 1).Select           oSh.Rows(iObject + 1).Select
          oSh.Rows(iObject + 1).MergeCells = True           oSh.Rows(iObject + 1).MergeCells = True
          oSh.Rows(iObject + 1).Font.FontStyle = "Bold"           oSh.Rows(iObject + 1).Font.FontStyle = "Bold"
          oSh.Rows(iObject + 1).Font.ColorIndex = 40           oSh.Rows(iObject + 1).Font.ColorIndex = 40
          oSh.Rows(iObject + 1).Interior.ColorIndex = 3           oSh.Rows(iObject + 1).Interior.ColorIndex = 3
          oSh.Rows(iObject + 1) = "demo mode, only first half of data will be represented"           oSh.Rows(iObject + 1) = "demo mode, only first half of data will be represented"
      End If       End If
               
      oSh.Activate       oSh.Activate
      oSh.Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjHidden)).Select       oSh.Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjHidden)).Select
      Selection.AutoFilter       Selection.AutoFilter
      oSh.Cells(2, 1).Select       oSh.Cells(2, 1).Select
      ActiveWindow.FreezePanes = True       ActiveWindow.FreezePanes = True
   Else    Else
       oSh.Visible = xlSheetVeryHidden        oSh.Visible = xlSheetVeryHidden
   End If    End If
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSObjectsComplete(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSObjectsComplete(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSObjects" sProcName = "WriteUniverseXLSObjects"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iObject As Integer Dim iObject As Integer
Dim iMaxObject As Integer Dim iMaxObject As Integer
   
On Error GoTo Err On Error GoTo Err
         
   iSh = iCreateWorksheet(oMyWrk, "objects_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "obj_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
         
   'init    'init
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           oSh.Cells(1, colObjClassId).Value = "Klasse ID"            oSh.Cells(1, colObjClassId).Value = "Klasse ID"
           oSh.Cells(1, colObjObjectId).Value = "Objekt ID"            oSh.Cells(1, colObjObjectId).Value = "Objekt ID"
           oSh.Cells(1, colObjClassName).Value = "Klasse Name"            oSh.Cells(1, colObjClassName).Value = "Klasse Name"
           oSh.Cells(1, colObjObjectName).Value = "Objekt Name"            oSh.Cells(1, colObjObjectName).Value = "Objekt Name"
           oSh.Cells(1, colObjObjectType).Value = "Objekt Typ"            oSh.Cells(1, colObjObjectType).Value = "Objekt Typ"
           oSh.Cells(1, colObjDataType).Value = "Datentyp"            oSh.Cells(1, colObjDataType).Value = "Datentyp"
           oSh.Cells(1, colObjDescription).Value = "Beschreibung"            oSh.Cells(1, colObjDescription).Value = "Beschreibung"
           oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"            oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"
           oSh.Cells(1, colObjHidden).Value = "Ausgeblendet"            oSh.Cells(1, colObjHidden).Value = "Ausgeblendet"
           oSh.Cells(1, colObjAggregateFunction).Value = "Aggregat Funktion"            oSh.Cells(1, colObjAggregateFunction).Value = "Aggregat Funktion"
           oSh.Cells(1, colObjCanBeUsedResult).Value = "zu verwenden in: Ergebnis"            oSh.Cells(1, colObjCanBeUsedResult).Value = "zu verwenden in: Ergebnis"
           oSh.Cells(1, colObjCanBeUsedCondition).Value = "zu verwenden in: Bedingung"            oSh.Cells(1, colObjCanBeUsedCondition).Value = "zu verwenden in: Bedingung"
           oSh.Cells(1, colObjCanBeUsedSort).Value = "zu verwenden in: Sortierung"            oSh.Cells(1, colObjCanBeUsedSort).Value = "zu verwenden in: Sortierung"
           oSh.Cells(1, colObjAllowUserToEditLov).Value = "Anwendern Bearbeitungsrecht gewähren"            oSh.Cells(1, colObjAllowUserToEditLov).Value = "Anwendern Bearbeitungsrecht gewähren"
           oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Value = "Vor Benutzung stets aktualisieren"            oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Value = "Vor Benutzung stets aktualisieren"
           oSh.Cells(1, colObjExportLovWithUniverse).Value = "Mit Universum exportieren"            oSh.Cells(1, colObjExportLovWithUniverse).Value = "Mit Universum exportieren"
           oSh.Cells(1, colObjHasListOfValues).Value = "Werteliste verbinden"            oSh.Cells(1, colObjHasListOfValues).Value = "Werteliste verbinden"
           oSh.Cells(1, colObjListOfValuesName).Value = "Listenname"            oSh.Cells(1, colObjListOfValuesName).Value = "Listenname"
           oSh.Cells(1, colObjSecurityAccessLevel).Value = "Sicherheitszugriffsniveau"            oSh.Cells(1, colObjSecurityAccessLevel).Value = "Sicherheitszugriffsniveau"
           oSh.Cells(1, colObjUseHierarchicalDisplay).Value = "Hierarchische Anzeige"            oSh.Cells(1, colObjUseHierarchicalDisplay).Value = "Hierarchische Anzeige"
             oSh.Cells(1, colObjBOClassId).Value = "Klasse BOID"  
             oSh.Cells(1, colObjBOObjectId).Value = "Objekt BOID"  
                 
       Case Else ' english        Case Else ' english
           oSh.Cells(1, colObjClassId).Value = "Class ID"            oSh.Cells(1, colObjClassId).Value = "Class ID"
           oSh.Cells(1, colObjObjectId).Value = "Object ID"            oSh.Cells(1, colObjObjectId).Value = "Object ID"
           oSh.Cells(1, colObjClassName).Value = "Class name"            oSh.Cells(1, colObjClassName).Value = "Class name"
           oSh.Cells(1, colObjObjectName).Value = "Object name"            oSh.Cells(1, colObjObjectName).Value = "Object name"
           oSh.Cells(1, colObjObjectType).Value = "Data Type"            oSh.Cells(1, colObjObjectType).Value = "Data Type"
           oSh.Cells(1, colObjDataType).Value = "Object type"            oSh.Cells(1, colObjDataType).Value = "Object type"
           oSh.Cells(1, colObjDescription).Value = "Description"            oSh.Cells(1, colObjDescription).Value = "Description"
           oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"            oSh.Cells(1, colObjSqlSelect).Value = "SQL Select"
           oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"            oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"
           oSh.Cells(1, colObjHidden).Value = "Hidden"            oSh.Cells(1, colObjHidden).Value = "Hidden"
           oSh.Cells(1, colObjAggregateFunction).Value = "Aggregat function"            oSh.Cells(1, colObjAggregateFunction).Value = "Aggregat function"
           oSh.Cells(1, colObjCanBeUsedResult).Value = "can be used in: Result"            oSh.Cells(1, colObjCanBeUsedResult).Value = "can be used in: Result"
           oSh.Cells(1, colObjCanBeUsedCondition).Value = "can be used in: Condition"            oSh.Cells(1, colObjCanBeUsedCondition).Value = "can be used in: Condition"
           oSh.Cells(1, colObjCanBeUsedSort).Value = "can be used in: Sort"            oSh.Cells(1, colObjCanBeUsedSort).Value = "can be used in: Sort"
           oSh.Cells(1, colObjAllowUserToEditLov).Value = "Allow users to edit this list of values"            oSh.Cells(1, colObjAllowUserToEditLov).Value = "Allow users to edit this list of values"
           oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Value = "Automatic refresh before use"            oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Value = "Automatic refresh before use"
           oSh.Cells(1, colObjExportLovWithUniverse).Value = "Export with universe"            oSh.Cells(1, colObjExportLovWithUniverse).Value = "Export with universe"
           oSh.Cells(1, colObjHasListOfValues).Value = "Associate a List of Values"            oSh.Cells(1, colObjHasListOfValues).Value = "Associate a List of Values"
           oSh.Cells(1, colObjListOfValuesName).Value = "List name"            oSh.Cells(1, colObjListOfValuesName).Value = "List name"
           oSh.Cells(1, colObjSecurityAccessLevel).Value = "Security Access Level"            oSh.Cells(1, colObjSecurityAccessLevel).Value = "Security Access Level"
           oSh.Cells(1, colObjUseHierarchicalDisplay).Value = "Hierarchical Display"            oSh.Cells(1, colObjUseHierarchicalDisplay).Value = "Hierarchical Display"
             oSh.Cells(1, colObjBOClassId).Value = "Class BOID"  
             oSh.Cells(1, colObjBOObjectId).Value = "Object BOID"  
   End Select    End Select
   
   oSh.Cells(1, colObjClassId).Font.Bold = True    oSh.Cells(1, colObjClassId).Font.Bold = True
   oSh.Columns(colObjClassId).NumberFormat = "@"    oSh.Columns(colObjClassId).NumberFormat = "@"
   oSh.Columns(colObjClassId).ColumnWidth = 5    oSh.Columns(colObjClassId).ColumnWidth = 5
                 
   oSh.Cells(1, colObjObjectId).Font.Bold = True    oSh.Cells(1, colObjObjectId).Font.Bold = True
   oSh.Columns(colObjObjectId).NumberFormat = "@"    oSh.Columns(colObjObjectId).NumberFormat = "@"
   oSh.Columns(colObjObjectId).ColumnWidth = 5    oSh.Columns(colObjObjectId).ColumnWidth = 5
                 
   oSh.Cells(1, colObjClassName).Font.Bold = True    oSh.Cells(1, colObjClassName).Font.Bold = True
   oSh.Columns(colObjClassName).NumberFormat = "@"    oSh.Columns(colObjClassName).NumberFormat = "@"
   oSh.Columns(colObjClassName).ColumnWidth = 30    oSh.Columns(colObjClassName).ColumnWidth = 30
                 
   oSh.Cells(1, colObjObjectName).Font.Bold = True    oSh.Cells(1, colObjObjectName).Font.Bold = True
   oSh.Columns(colObjObjectName).NumberFormat = "@"    oSh.Columns(colObjObjectName).NumberFormat = "@"
   oSh.Columns(colObjObjectName).ColumnWidth = 30    oSh.Columns(colObjObjectName).ColumnWidth = 30
                 
   oSh.Cells(1, colObjObjectType).Font.Bold = True    oSh.Cells(1, colObjObjectType).Font.Bold = True
   oSh.Columns(colObjObjectType).NumberFormat = "@"    oSh.Columns(colObjObjectType).NumberFormat = "@"
   oSh.Columns(colObjObjectType).ColumnWidth = 10    oSh.Columns(colObjObjectType).ColumnWidth = 10
                 
   oSh.Cells(1, colObjDataType).Font.Bold = True    oSh.Cells(1, colObjDataType).Font.Bold = True
   oSh.Columns(colObjDataType).NumberFormat = "@"    oSh.Columns(colObjDataType).NumberFormat = "@"
   oSh.Columns(colObjDataType).ColumnWidth = 15    oSh.Columns(colObjDataType).ColumnWidth = 15
                 
   oSh.Cells(1, colObjDescription).Font.Bold = True    oSh.Cells(1, colObjDescription).Font.Bold = True
   oSh.Columns(colObjDescription).NumberFormat = "@"    oSh.Columns(colObjDescription).NumberFormat = "@"
   oSh.Columns(colObjDescription).ColumnWidth = 30    oSh.Columns(colObjDescription).ColumnWidth = 30
                 
   oSh.Cells(1, colObjSqlSelect).Font.Bold = True    oSh.Cells(1, colObjSqlSelect).Font.Bold = True
   oSh.Columns(colObjSqlSelect).NumberFormat = "@"    oSh.Columns(colObjSqlSelect).NumberFormat = "@"
   oSh.Columns(colObjSqlSelect).ColumnWidth = 30    oSh.Columns(colObjSqlSelect).ColumnWidth = 30
                 
   oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"    oSh.Cells(1, colObjSQLWhere).Value = "SQL Where"
   oSh.Cells(1, colObjSQLWhere).Font.Bold = True    oSh.Cells(1, colObjSQLWhere).Font.Bold = True
   oSh.Columns(colObjSQLWhere).NumberFormat = "@"    oSh.Columns(colObjSQLWhere).NumberFormat = "@"
   oSh.Columns(colObjSQLWhere).ColumnWidth = 30    oSh.Columns(colObjSQLWhere).ColumnWidth = 30
                 
   oSh.Cells(1, colObjHidden).Font.Bold = True    oSh.Cells(1, colObjHidden).Font.Bold = True
   oSh.Columns(colObjHidden).NumberFormat = "@"    oSh.Columns(colObjHidden).NumberFormat = "@"
   oSh.Columns(colObjHidden).ColumnWidth = 5    oSh.Columns(colObjHidden).ColumnWidth = 5
         
   oSh.Cells(1, colObjAggregateFunction).Font.Bold = True    oSh.Cells(1, colObjAggregateFunction).Font.Bold = True
   oSh.Columns(colObjAggregateFunction).NumberFormat = "@"    oSh.Columns(colObjAggregateFunction).NumberFormat = "@"
   oSh.Columns(colObjAggregateFunction).ColumnWidth = 10    oSh.Columns(colObjAggregateFunction).ColumnWidth = 10
         
   oSh.Cells(1, colObjCanBeUsedResult).Font.Bold = True    oSh.Cells(1, colObjCanBeUsedResult).Font.Bold = True
   oSh.Columns(colObjCanBeUsedResult).NumberFormat = "@"    oSh.Columns(colObjCanBeUsedResult).NumberFormat = "@"
   oSh.Columns(colObjCanBeUsedResult).ColumnWidth = 5    oSh.Columns(colObjCanBeUsedResult).ColumnWidth = 5
         
   oSh.Cells(1, colObjCanBeUsedCondition).Font.Bold = True    oSh.Cells(1, colObjCanBeUsedCondition).Font.Bold = True
   oSh.Columns(colObjCanBeUsedCondition).NumberFormat = "@"    oSh.Columns(colObjCanBeUsedCondition).NumberFormat = "@"
   oSh.Columns(colObjCanBeUsedCondition).ColumnWidth = 5    oSh.Columns(colObjCanBeUsedCondition).ColumnWidth = 5
   
   oSh.Cells(1, colObjCanBeUsedSort).Font.Bold = True    oSh.Cells(1, colObjCanBeUsedSort).Font.Bold = True
   oSh.Columns(colObjCanBeUsedSort).NumberFormat = "@"    oSh.Columns(colObjCanBeUsedSort).NumberFormat = "@"
   oSh.Columns(colObjCanBeUsedSort).ColumnWidth = 5    oSh.Columns(colObjCanBeUsedSort).ColumnWidth = 5
   
   oSh.Cells(1, colObjAllowUserToEditLov).Font.Bold = True    oSh.Cells(1, colObjAllowUserToEditLov).Font.Bold = True
   oSh.Columns(colObjAllowUserToEditLov).NumberFormat = "@"    oSh.Columns(colObjAllowUserToEditLov).NumberFormat = "@"
   oSh.Columns(colObjAllowUserToEditLov).ColumnWidth = 5    oSh.Columns(colObjAllowUserToEditLov).ColumnWidth = 5
   
   oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Font.Bold = True    oSh.Cells(1, colObjAutomaticLovRefreshBeforeUse).Font.Bold = True
   oSh.Columns(colObjAutomaticLovRefreshBeforeUse).NumberFormat = "@"    oSh.Columns(colObjAutomaticLovRefreshBeforeUse).NumberFormat = "@"
   oSh.Columns(colObjAutomaticLovRefreshBeforeUse).ColumnWidth = 5    oSh.Columns(colObjAutomaticLovRefreshBeforeUse).ColumnWidth = 5
   
   oSh.Cells(1, colObjExportLovWithUniverse).Font.Bold = True    oSh.Cells(1, colObjExportLovWithUniverse).Font.Bold = True
   oSh.Columns(colObjExportLovWithUniverse).NumberFormat = "@"    oSh.Columns(colObjExportLovWithUniverse).NumberFormat = "@"
   oSh.Columns(colObjExportLovWithUniverse).ColumnWidth = 5    oSh.Columns(colObjExportLovWithUniverse).ColumnWidth = 5
   
   oSh.Cells(1, colObjHasListOfValues).Font.Bold = True    oSh.Cells(1, colObjHasListOfValues).Font.Bold = True
   oSh.Columns(colObjHasListOfValues).NumberFormat = "@"    oSh.Columns(colObjHasListOfValues).NumberFormat = "@"
   oSh.Columns(colObjHasListOfValues).ColumnWidth = 5    oSh.Columns(colObjHasListOfValues).ColumnWidth = 5
   
   oSh.Cells(1, colObjListOfValuesName).Font.Bold = True    oSh.Cells(1, colObjListOfValuesName).Font.Bold = True
   oSh.Columns(colObjListOfValuesName).NumberFormat = "@"    oSh.Columns(colObjListOfValuesName).NumberFormat = "@"
   oSh.Columns(colObjListOfValuesName).ColumnWidth = 5    oSh.Columns(colObjListOfValuesName).ColumnWidth = 5
   
   oSh.Cells(1, colObjSecurityAccessLevel).Font.Bold = True    oSh.Cells(1, colObjSecurityAccessLevel).Font.Bold = True
   oSh.Columns(colObjSecurityAccessLevel).NumberFormat = "@"    oSh.Columns(colObjSecurityAccessLevel).NumberFormat = "@"
   oSh.Columns(colObjSecurityAccessLevel).ColumnWidth = 5    oSh.Columns(colObjSecurityAccessLevel).ColumnWidth = 5
   
   oSh.Cells(1, colObjUseHierarchicalDisplay).Font.Bold = True    oSh.Cells(1, colObjUseHierarchicalDisplay).Font.Bold = True
   oSh.Columns(colObjUseHierarchicalDisplay).NumberFormat = "@"    oSh.Columns(colObjUseHierarchicalDisplay).NumberFormat = "@"
   oSh.Columns(colObjUseHierarchicalDisplay).ColumnWidth = 5    oSh.Columns(colObjUseHierarchicalDisplay).ColumnWidth = 5
         
     oSh.Cells(1, colObjBOClassId).Font.Bold = True  
     oSh.Columns(colObjBOClassId).NumberFormat = "@"  
     oSh.Columns(colObjBOClassId).ColumnWidth = 5  
       
     oSh.Cells(1, colObjBOObjectId).Font.Bold = True  
     oSh.Columns(colObjBOObjectId).NumberFormat = "@"  
     oSh.Columns(colObjBOObjectId).ColumnWidth = 5  
       
         
   ' data    ' data
   ' demo mode    ' demo mode
   ' only the first half of data will be outputted    ' only the first half of data will be outputted
   iMaxObject = IIf(vbModus = vbModusLive, UBound(oObjects), UBound(oObjects) / 2)    iMaxObject = IIf(vbModus = vbModusLive, UBound(oObjects), UBound(oObjects) / 2)
         
   If iMaxObject > 0 Then    If iMaxObject > 0 Then
      For iObject = 1 To iMaxObject       For iObject = 1 To iMaxObject
          oSh.Cells(iObject + 1, colObjClassId).Value = oObjects(iObject).iClassId           oSh.Cells(iObject + 1, colObjClassId).Value = oObjects(iObject).iClassId
          oSh.Cells(iObject + 1, colObjObjectId).Value = oObjects(iObject).iObjectID           oSh.Cells(iObject + 1, colObjObjectId).Value = oObjects(iObject).iObjectID
          oSh.Cells(iObject + 1, colObjClassName).Value = oObjects(iObject).sClassName           oSh.Cells(iObject + 1, colObjClassName).Value = oObjects(iObject).sClassName
          oSh.Cells(iObject + 1, colObjObjectName).Value = oObjects(iObject).sName           oSh.Cells(iObject + 1, colObjObjectName).Value = oObjects(iObject).sName
          Select Case oObjects(iObject).iQualification           Select Case oObjects(iObject).iQualification
              Case dsDimensionObject               Case dsDimensionObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(1).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(1).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDimensionObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDimensionObject
              Case dsDetailObject               Case dsDetailObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(2).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(2).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDetailObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsDetailObject
              Case dsMeasureObject               Case dsMeasureObject
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(3).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(3).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsMeasureObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsMeasureObject
              Case 4               Case 4
                  oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(4).sQualification                   oSh.Cells(iObject + 1, colObjObjectType).Value = oQualification(4).sQualification
                  oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsConditionObject                   oSh.Rows(iObject + 1).Font.ColorIndex = vbColorDsConditionObject
              Case Else               Case Else
                  oSh.Cells(iObject + 1, colObjObjectType).Value = "unbekannt"                   oSh.Cells(iObject + 1, colObjObjectType).Value = "unbekannt"
          End Select           End Select
                       
          Select Case oObjects(iObject).iType           Select Case oObjects(iObject).iType
              Case dsNumericObject               Case dsNumericObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(1).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(1).sType
              Case dsCharacterObject               Case dsCharacterObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(2).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(2).sType
         
              Case dsDateObject               Case dsDateObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(3).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(3).sType
              Case dsBlobObject               Case dsBlobObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(4).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(4).sType
              Case dsUnknownObject               Case dsUnknownObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(5).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(5).sType
              Case dsNullObject               Case dsNullObject
                  oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(6).sType                   oSh.Cells(iObject + 1, colObjDataType).Value = oObjectPropertiesType(6).sType
          End Select           End Select
                       
          oSh.Cells(iObject + 1, colObjDescription).Value = oObjects(iObject).sDescription           oSh.Cells(iObject + 1, colObjDescription).Value = "'" & oObjects(iObject).sDescription
          oSh.Cells(iObject + 1, colObjSqlSelect).Value = oObjects(iObject).sSelect           oSh.Cells(iObject + 1, colObjSqlSelect).Value = "'" & oObjects(iObject).sSelect
          oSh.Cells(iObject + 1, colObjSQLWhere).Value = oObjects(iObject).sWhere           oSh.Cells(iObject + 1, colObjSQLWhere).Value = "'" & oObjects(iObject).sWhere
          oSh.Cells(iObject + 1, colObjHidden).Value = IIf(oObjects(iObject).bIsVisible, "", "x")           oSh.Cells(iObject + 1, colObjHidden).Value = IIf(oObjects(iObject).bIsVisible, "", "x")
                       
          oSh.Cells(iObject + 1, colObjAggregateFunction).Value = sGetAggregateFunction(oObjects(iObject).iAggregateFunction)           oSh.Cells(iObject + 1, colObjAggregateFunction).Value = sGetAggregateFunction(oObjects(iObject).iAggregateFunction)
          oSh.Cells(iObject + 1, colObjHasListOfValues).Value = IIf(oObjects(iObject).bHasListOfValues, "x", "")           oSh.Cells(iObject + 1, colObjHasListOfValues).Value = IIf(oObjects(iObject).bHasListOfValues, "x", "")
          oSh.Cells(iObject + 1, colObjListOfValuesName).Value = oObjects(iObject).sListOfValuesName           oSh.Cells(iObject + 1, colObjListOfValuesName).Value = oObjects(iObject).sListOfValuesName
          oSh.Cells(iObject + 1, colObjAllowUserToEditLov).Value = IIf(oObjects(iObject).bAllowUserToEditLov, "x", "")           oSh.Cells(iObject + 1, colObjAllowUserToEditLov).Value = IIf(oObjects(iObject).bAllowUserToEditLov, "x", "")
          oSh.Cells(iObject + 1, colObjAutomaticLovRefreshBeforeUse).Value = IIf(oObjects(iObject).bAutomaticLovRefreshBeforeUse, "x", "")           oSh.Cells(iObject + 1, colObjAutomaticLovRefreshBeforeUse).Value = IIf(oObjects(iObject).bAutomaticLovRefreshBeforeUse, "x", "")
          oSh.Cells(iObject + 1, colObjUseHierarchicalDisplay).Value = IIf(oObjects(iObject).bUseHierarchicalDisplay, "x", "")           oSh.Cells(iObject + 1, colObjUseHierarchicalDisplay).Value = IIf(oObjects(iObject).bUseHierarchicalDisplay, "x", "")
          oSh.Cells(iObject + 1, colObjExportLovWithUniverse).Value = IIf(oObjects(iObject).bExportLovWithUniverse, "x", "")           oSh.Cells(iObject + 1, colObjExportLovWithUniverse).Value = IIf(oObjects(iObject).bExportLovWithUniverse, "x", "")
          oSh.Cells(iObject + 1, colObjSecurityAccessLevel).Value = sGetSecurityAccessLevel(oObjects(iObject).iSecurityAccessLevel)           oSh.Cells(iObject + 1, colObjSecurityAccessLevel).Value = sGetSecurityAccessLevel(oObjects(iObject).iSecurityAccessLevel)
                       
          oSh.Cells(iObject + 1, colObjCanBeUsedResult).Value = IIf(oObjects(iObject).bCanBeUsedResult, "x", "")           oSh.Cells(iObject + 1, colObjCanBeUsedResult).Value = IIf(oObjects(iObject).bCanBeUsedResult, "x", "")
          oSh.Cells(iObject + 1, colObjCanBeUsedCondition).Value = IIf(oObjects(iObject).bCanBeUsedCondition, "x", "")           oSh.Cells(iObject + 1, colObjCanBeUsedCondition).Value = IIf(oObjects(iObject).bCanBeUsedCondition, "x", "")
          oSh.Cells(iObject + 1, colObjCanBeUsedSort).Value = IIf(oObjects(iObject).bCanBeUsedSort, "x", "")           oSh.Cells(iObject + 1, colObjCanBeUsedSort).Value = IIf(oObjects(iObject).bCanBeUsedSort, "x", "")
            oSh.Cells(iObject + 1, colObjBOClassId).Value = oObjects(iObject).iBOClassId  
            oSh.Cells(iObject + 1, colObjBOObjectId).Value = oObjects(iObject).iBOObjectID  
                       
      Next iObject       Next iObject
               
      If vbModus = vbModusDemo Then       If vbModus = vbModusDemo Then
          oSh.Rows(iObject + 1).Select           oSh.Rows(iObject + 1).Select
          oSh.Rows(iObject + 1).MergeCells = True           oSh.Rows(iObject + 1).MergeCells = True
          oSh.Rows(iObject + 1).Font.FontStyle = "Bold"           oSh.Rows(iObject + 1).Font.FontStyle = "Bold"
          oSh.Rows(iObject + 1).Font.ColorIndex = 40           oSh.Rows(iObject + 1).Font.ColorIndex = 40
          oSh.Rows(iObject + 1).Interior.ColorIndex = 3           oSh.Rows(iObject + 1).Interior.ColorIndex = 3
          oSh.Rows(iObject + 1) = "demo mode, only first half of data will be represented"           oSh.Rows(iObject + 1) = "demo mode, only first half of data will be represented"
      End If       End If
               
      oSh.Activate       oSh.Activate
      oSh.Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjCanBeUsedSort)).Select        oSh.Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjBOObjectId)).Select 
      Selection.AutoFilter       Selection.AutoFilter
      oSh.Cells(2, 1).Select       oSh.Cells(2, 1).Select
      ActiveWindow.FreezePanes = True       ActiveWindow.FreezePanes = True
   Else    Else
       oSh.Visible = xlSheetVeryHidden        oSh.Visible = xlSheetVeryHidden
   End If    End If
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSObjectsCopy(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSObjectsCopy(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSObjectsCopy" sProcName = "WriteUniverseXLSObjectsCopy"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
On Error GoTo Err On Error GoTo Err
         
   iSh = iCreateWorksheet(oMyWrk, "copy_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "copy_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
   oSh.Visible = xlSheetVisible    oSh.Visible = xlSheetVisible
         
   iSh = iGetWorksheetID(oMyWrk, "objects_" & oUnvProp.sName)     iSh = iGetWorksheetID(oMyWrk, "obj_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
         
   oMyWrk.Worksheets(iSh).Activate    oMyWrk.Worksheets(iSh).Activate
   oMyWrk.Worksheets(iSh).Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjHidden)).Select    oMyWrk.Worksheets(iSh).Range(Cells(1, 1), Cells(UBound(oObjects) + 1, colObjHidden)).Select
   Selection.Copy    Selection.Copy
   
   oSh.Activate    oSh.Activate
   oSh.Paste    oSh.Paste
   oSh.Visible = xlSheetVeryHidden    oSh.Visible = xlSheetVeryHidden
         
   Application.CutCopyMode = False    Application.CutCopyMode = False
   oMyWrk.Worksheets(iSh).Cells(2, 1).Select    oMyWrk.Worksheets(iSh).Cells(2, 1).Select
         
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSInCombs(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSInCombs(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSInCombs" sProcName = "WriteUniverseXLSInCombs"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iIncomb As Integer Dim iIncomb As Integer
   
On Error GoTo Err On Error GoTo Err
                 
   iSh = iCreateWorksheet(oMyWrk, "incomb_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "incom_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
   oSh.Activate    oSh.Activate
         
   'init    'init
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           oSh.Cells(1, colInCombTableName).Value = "Tabelle Name"            oSh.Cells(1, colInCombTableName).Value = "Tabelle Name"
           oSh.Cells(1, colInCombClassName).Value = "Klasse Name"            oSh.Cells(1, colInCombClassName).Value = "Klasse Name"
           oSh.Cells(1, colInCombObjectName).Value = "Objekt Name"            oSh.Cells(1, colInCombObjectName).Value = "Objekt Name"
           oSh.Cells(1, colInCombTableId).Value = "Tabelle ID"            oSh.Cells(1, colInCombTableId).Value = "Tabelle ID"
           oSh.Cells(1, colInCombClassId).Value = "Klasse ID"            oSh.Cells(1, colInCombClassId).Value = "Klasse ID"
           oSh.Cells(1, colInCombObjectId).Value = "Objekt ID"            oSh.Cells(1, colInCombObjectId).Value = "Objekt ID"
                         
       Case Else ' english        Case Else ' english
           oSh.Cells(1, colInCombTableName).Value = "Table name"            oSh.Cells(1, colInCombTableName).Value = "Table name"
           oSh.Cells(1, colInCombClassName).Value = "Class name"            oSh.Cells(1, colInCombClassName).Value = "Class name"
           oSh.Cells(1, colInCombObjectName).Value = "Object name"            oSh.Cells(1, colInCombObjectName).Value = "Object name"
           oSh.Cells(1, colInCombTableId).Value = "Table ID"            oSh.Cells(1, colInCombTableId).Value = "Table ID"
           oSh.Cells(1, colInCombClassId).Value = "Class ID"            oSh.Cells(1, colInCombClassId).Value = "Class ID"
           oSh.Cells(1, colInCombObjectId).Value = "Object ID"            oSh.Cells(1, colInCombObjectId).Value = "Object ID"
                         
   End Select    End Select
         
   oSh.Cells(1, colInCombTableName).Font.Bold = True    oSh.Cells(1, colInCombTableName).Font.Bold = True
   oSh.Columns(colInCombTableName).NumberFormat = "@"    oSh.Columns(colInCombTableName).NumberFormat = "@"
   oSh.Columns(colInCombTableName).ColumnWidth = 30    oSh.Columns(colInCombTableName).ColumnWidth = 30
                 
   oSh.Cells(1, colInCombClassName).Font.Bold = True    oSh.Cells(1, colInCombClassName).Font.Bold = True
   oSh.Columns(colInCombClassName).NumberFormat = "@"    oSh.Columns(colInCombClassName).NumberFormat = "@"
   oSh.Columns(colInCombClassName).ColumnWidth = 30    oSh.Columns(colInCombClassName).ColumnWidth = 30
                 
   oSh.Cells(1, colInCombObjectName).Font.Bold = True    oSh.Cells(1, colInCombObjectName).Font.Bold = True
   oSh.Columns(colInCombObjectName).NumberFormat = "@"    oSh.Columns(colInCombObjectName).NumberFormat = "@"
   oSh.Columns(colInCombObjectName).ColumnWidth = 30    oSh.Columns(colInCombObjectName).ColumnWidth = 30
                 
   oSh.Cells(1, colInCombTableId).Font.Bold = True    oSh.Cells(1, colInCombTableId).Font.Bold = True
   oSh.Columns(colInCombTableId).NumberFormat = "@"    oSh.Columns(colInCombTableId).NumberFormat = "@"
   oSh.Columns(colInCombTableId).ColumnWidth = 10    oSh.Columns(colInCombTableId).ColumnWidth = 10
                 
   oSh.Cells(1, colInCombClassId).Font.Bold = True    oSh.Cells(1, colInCombClassId).Font.Bold = True
   oSh.Columns(colInCombClassId).NumberFormat = "@"    oSh.Columns(colInCombClassId).NumberFormat = "@"
   oSh.Columns(colInCombClassId).ColumnWidth = 10    oSh.Columns(colInCombClassId).ColumnWidth = 10
                 
   oSh.Cells(1, colInCombObjectId).Font.Bold = True    oSh.Cells(1, colInCombObjectId).Font.Bold = True
   oSh.Columns(colInCombObjectId).NumberFormat = "@"    oSh.Columns(colInCombObjectId).NumberFormat = "@"
   oSh.Columns(colInCombObjectId).ColumnWidth = 10    oSh.Columns(colInCombObjectId).ColumnWidth = 10
                         
   ' data    ' data
   If UBound(oIncombatibilities) > 0 Then    If UBound(oIncombatibilities) > 0 Then
       For iIncomb = 1 To UBound(oIncombatibilities)        For iIncomb = 1 To UBound(oIncombatibilities)
           oSh.Cells(iIncomb + 1, colInCombTableName).Value = oIncombatibilities(iIncomb).sTableName            oSh.Cells(iIncomb + 1, colInCombTableName).Value = oIncombatibilities(iIncomb).sTableName
           oSh.Cells(iIncomb + 1, colInCombClassName).Value = oIncombatibilities(iIncomb).sClassName            oSh.Cells(iIncomb + 1, colInCombClassName).Value = oIncombatibilities(iIncomb).sClassName
           oSh.Cells(iIncomb + 1, colInCombObjectName).Value = oIncombatibilities(iIncomb).sObjectName            oSh.Cells(iIncomb + 1, colInCombObjectName).Value = oIncombatibilities(iIncomb).sObjectName
           oSh.Cells(iIncomb + 1, colInCombTableId).Value = oIncombatibilities(iIncomb).iTableId            oSh.Cells(iIncomb + 1, colInCombTableId).Value = oIncombatibilities(iIncomb).iTableId
           oSh.Cells(iIncomb + 1, colInCombClassId).Value = oIncombatibilities(iIncomb).iClassId            oSh.Cells(iIncomb + 1, colInCombClassId).Value = oIncombatibilities(iIncomb).iClassId
           oSh.Cells(iIncomb + 1, colInCombObjectId).Value = oIncombatibilities(iIncomb).iObjectID            oSh.Cells(iIncomb + 1, colInCombObjectId).Value = oIncombatibilities(iIncomb).iObjectID
       Next iIncomb        Next iIncomb
                 
       oSh.Range(Cells(2, 1), Cells(UBound(oIncombatibilities) + 1, colInCombObjectId)).Select        oSh.Range(Cells(2, 1), Cells(UBound(oIncombatibilities) + 1, colInCombObjectId)).Select
       Selection.Font.ColorIndex = vbColorDsStandard        Selection.Font.ColorIndex = vbColorDsStandard
                 
       If vbModus = vbModusDemo Then        If vbModus = vbModusDemo Then
           oSh.Rows(iIncomb + 1).Select            oSh.Rows(iIncomb + 1).Select
           oSh.Rows(iIncomb + 1).MergeCells = True            oSh.Rows(iIncomb + 1).MergeCells = True
           oSh.Rows(iIncomb + 1).Font.FontStyle = "Bold"            oSh.Rows(iIncomb + 1).Font.FontStyle = "Bold"
           oSh.Rows(iIncomb + 1).Font.ColorIndex = 40            oSh.Rows(iIncomb + 1).Font.ColorIndex = 40
           oSh.Rows(iIncomb + 1).Interior.ColorIndex = 3            oSh.Rows(iIncomb + 1).Interior.ColorIndex = 3
                         
           Select Case vbLang            Select Case vbLang
               Case 49 'german                Case 49 'german
                   oSh.Rows(iIncomb + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."                    oSh.Rows(iIncomb + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."
               Case Else ' english                Case Else ' english
                   oSh.Rows(iIncomb + 1) = "demo mode, only first half of data will be represented"                    oSh.Rows(iIncomb + 1) = "demo mode, only first half of data will be represented"
           End Select            End Select
                         
       End If        End If
                 
       oSh.Activate        oSh.Activate
       oSh.Range(Cells(1, 1), Cells(UBound(oIncombatibilities) + 1, colInCombObjectId)).Select        oSh.Range(Cells(1, 1), Cells(UBound(oIncombatibilities) + 1, colInCombObjectId)).Select
       Selection.AutoFilter        Selection.AutoFilter
                 
       oSh.Cells(2, 1).Select        oSh.Cells(2, 1).Select
       ActiveWindow.FreezePanes = True        ActiveWindow.FreezePanes = True
       oSh.Visible = xlSheetVisible        oSh.Visible = xlSheetVisible
   Else    Else
       oSh.Visible = xlSheetVeryHidden        oSh.Visible = xlSheetVeryHidden
   End If    End If
         
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSHierarchies(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSHierarchies(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSHierarchies" sProcName = "WriteUniverseXLSHierarchies"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iHier As Integer Dim iHier As Integer
Dim iMaxHier As Integer Dim iMaxHier As Integer
                 
On Error GoTo Err On Error GoTo Err
         
   iSh = iCreateWorksheet(oMyWrk, "hier_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "hier_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
   oSh.Activate    oSh.Activate
                 
   'init    'init
         
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
             oSh.Cells(1, colBOHierID).Value = "Hierarchie BOID"  
           oSh.Cells(1, colHierName).Value = "Hierarchie Name"            oSh.Cells(1, colHierName).Value = "Hierarchie Name"
           oSh.Cells(1, colHierObjectName).Value = "Objekt Name"            oSh.Cells(1, colHierObjectName).Value = "Objekt Name"
           oSh.Cells(1, colHierClassName).Value = "Klasse Name"            oSh.Cells(1, colHierClassName).Value = "Klasse Name"
           oSh.Cells(1, colHierIsVisible).Value = "Ausgeblendet"            oSh.Cells(1, colHierIsVisible).Value = "Ausgeblendet"
                         
       Case Else ' english        Case Else ' english
             oSh.Cells(1, colBOHierID).Value = "Hierarchy BOID"  
           oSh.Cells(1, colHierName).Value = "Hierarchy name"            oSh.Cells(1, colHierName).Value = "Hierarchy name"
           oSh.Cells(1, colHierObjectName).Value = "Object name"            oSh.Cells(1, colHierObjectName).Value = "Object name"
           oSh.Cells(1, colHierClassName).Value = "Class name"            oSh.Cells(1, colHierClassName).Value = "Class name"
           oSh.Cells(1, colHierIsVisible).Value = "Hidden"            oSh.Cells(1, colHierIsVisible).Value = "Hidden"
                         
   End Select    End Select
         
     oSh.Cells(1, colBOHierID).Font.Bold = True  
     oSh.Columns(colBOHierID).NumberFormat = "@"  
     oSh.Columns(colBOHierID).ColumnWidth = 10  
       
   oSh.Cells(1, colHierName).Font.Bold = True    oSh.Cells(1, colHierName).Font.Bold = True
   oSh.Columns(colHierName).NumberFormat = "@"    oSh.Columns(colHierName).NumberFormat = "@"
   oSh.Columns(colHierName).ColumnWidth = 30    oSh.Columns(colHierName).ColumnWidth = 30
                 
   oSh.Cells(1, colHierObjectName).Font.Bold = True    oSh.Cells(1, colHierObjectName).Font.Bold = True
   oSh.Columns(colHierObjectName).NumberFormat = "@"    oSh.Columns(colHierObjectName).NumberFormat = "@"
   oSh.Columns(colHierObjectName).ColumnWidth = 30    oSh.Columns(colHierObjectName).ColumnWidth = 30
                         
   oSh.Cells(1, colHierClassName).Font.Bold = True    oSh.Cells(1, colHierClassName).Font.Bold = True
   oSh.Columns(colHierClassName).NumberFormat = "@"    oSh.Columns(colHierClassName).NumberFormat = "@"
   oSh.Columns(colHierClassName).ColumnWidth = 30    oSh.Columns(colHierClassName).ColumnWidth = 30
                         
   oSh.Cells(1, colHierIsVisible).Font.Bold = True    oSh.Cells(1, colHierIsVisible).Font.Bold = True
   oSh.Columns(colHierIsVisible).NumberFormat = "@"    oSh.Columns(colHierIsVisible).NumberFormat = "@"
   oSh.Columns(colHierIsVisible).ColumnWidth = 10    oSh.Columns(colHierIsVisible).ColumnWidth = 10
                         
   ' data    ' data
   ' demo mode    ' demo mode
   ' only the first half of data will be outputted    ' only the first half of data will be outputted
   iMaxHier = IIf(vbModus = vbModusLive, UBound(oHierarchies), UBound(oHierarchies) / 2)    iMaxHier = IIf(vbModus = vbModusLive, UBound(oHierarchies), UBound(oHierarchies) / 2)
         
   If iMaxHier > 0 Then    If iMaxHier > 0 Then
       For iHier = 1 To UBound(oHierarchies)        For iHier = 1 To UBound(oHierarchies)
             oSh.Cells(iHier + 1, colBOHierID).Value = oHierarchies(iHier).iBOHierId  
           oSh.Cells(iHier + 1, colHierName).Value = oHierarchies(iHier).sName            oSh.Cells(iHier + 1, colHierName).Value = oHierarchies(iHier).sName
           oSh.Cells(iHier + 1, colHierObjectName).Value = oHierarchies(iHier).sObjectName            oSh.Cells(iHier + 1, colHierObjectName).Value = oHierarchies(iHier).sObjectName
           oSh.Cells(iHier + 1, colHierClassName).Value = oHierarchies(iHier).sClassName            oSh.Cells(iHier + 1, colHierClassName).Value = oHierarchies(iHier).sClassName
           oSh.Cells(iHier + 1, colHierIsVisible).Value = IIf(oHierarchies(iHier).bIsVisible, "", "x")            oSh.Cells(iHier + 1, colHierIsVisible).Value = IIf(oHierarchies(iHier).bIsVisible, "", "x")
                         
           If oHierarchies(iHier).iObjectID = -1 Then            If oHierarchies(iHier).iObjectID = -1 Then
               oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsError                oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsError
           Else            Else
               Select Case oObjects(oHierarchies(iHier).iObjectID).iQualification                Select Case oObjects(oHierarchies(iHier).iObjectID).iQualification
                   Case dsDimensionObject                    Case dsDimensionObject
                       oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsDimensionObject                        oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsDimensionObject
                   Case dsDetailObject                    Case dsDetailObject
                       oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsDetailObject                        oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsDetailObject
                   Case dsMeasureObject                    Case dsMeasureObject
                       oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsMeasureObject                        oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsMeasureObject
                   Case 4                    Case 4
                       oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsConditionObject                        oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsConditionObject
                   Case Else                    Case Else
                       oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsError                        oSh.Rows(iHier + 1).Font.ColorIndex = vbColorDsError
               End Select                End Select
           End If            End If
       Next iHier        Next iHier
                 
       If vbModus = vbModusDemo Then        If vbModus = vbModusDemo Then
           oSh.Rows(iHier + 1).Select            oSh.Rows(iHier + 1).Select
           oSh.Rows(iHier + 1).MergeCells = True            oSh.Rows(iHier + 1).MergeCells = True
           oSh.Rows(iHier + 1).Font.FontStyle = "Bold"            oSh.Rows(iHier + 1).Font.FontStyle = "Bold"
           oSh.Rows(iHier + 1).Font.ColorIndex = 40            oSh.Rows(iHier + 1).Font.ColorIndex = 40
           oSh.Rows(iHier + 1).Interior.ColorIndex = 3            oSh.Rows(iHier + 1).Interior.ColorIndex = 3
                         
           Select Case vbLang            Select Case vbLang
               Case 49 'german                Case 49 'german
                   oSh.Rows(iHier + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."                    oSh.Rows(iHier + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."
               Case Else ' english                Case Else ' english
                   oSh.Rows(iHier + 1) = "demo mode, only first half of data will be represented"                    oSh.Rows(iHier + 1) = "demo mode, only first half of data will be represented"
           End Select            End Select
                         
       End If        End If
                 
       oSh.Activate        oSh.Activate
       oSh.Range(Cells(1, 1), Cells(UBound(oHierarchies) + 1, colHierIsVisible)).Select        oSh.Range(Cells(1, 1), Cells(UBound(oHierarchies) + 1, colHierIsVisible)).Select
       Selection.AutoFilter        Selection.AutoFilter
                 
       oSh.Cells(2, 1).Select        oSh.Cells(2, 1).Select
       ActiveWindow.FreezePanes = True        ActiveWindow.FreezePanes = True
       oSh.Visible = xlSheetVisible        oSh.Visible = xlSheetVisible
   Else    Else
       oSh.Visible = xlSheetVeryHidden        oSh.Visible = xlSheetVeryHidden
   End If    End If
         
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSJoins(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSJoins(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSJoins" sProcName = "WriteUniverseXLSJoins"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iJoin As Integer Dim iJoin As Integer
Dim iMaxJoin As Integer Dim iMaxJoin As Integer
   
On Error GoTo Err On Error GoTo Err
         
   iSh = iCreateWorksheet(oMyWrk, "joins_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "join_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
   oSh.Activate    oSh.Activate
                 
   'init    'init
     oSh.Cells(1, colBOJoinId).Value = "Join BOID"  
     oSh.Cells(1, colBOJoinId).Font.Bold = True  
     oSh.Columns(colBOJoinId).NumberFormat = "@"  
     oSh.Columns(colBOJoinId).ColumnWidth = 10  
           
   oSh.Cells(1, colJoinId).Value = "Join Id"    oSh.Cells(1, colJoinId).Value = "Join Id"
   oSh.Cells(1, colJoinId).Font.Bold = True    oSh.Cells(1, colJoinId).Font.Bold = True
   oSh.Columns(colJoinId).NumberFormat = "@"    oSh.Columns(colJoinId).NumberFormat = "@"
   oSh.Columns(colJoinId).ColumnWidth = 10    oSh.Columns(colJoinId).ColumnWidth = 10
                 
   oSh.Cells(1, colJoinExpr).Value = "Expression"    oSh.Cells(1, colJoinExpr).Value = "Expression"
   oSh.Cells(1, colJoinExpr).Font.Bold = True    oSh.Cells(1, colJoinExpr).Font.Bold = True
   oSh.Columns(colJoinExpr).NumberFormat = "@"    oSh.Columns(colJoinExpr).NumberFormat = "@"
   oSh.Columns(colJoinExpr).ColumnWidth = 100    oSh.Columns(colJoinExpr).ColumnWidth = 100
                         
   ' data    ' data
   ' demo mode    ' demo mode
   ' only the first half of data will be outputted    ' only the first half of data will be outputted
   iMaxJoin = IIf(vbModus = vbModusLive, UBound(oJoins), UBound(oJoins) / 2)    iMaxJoin = IIf(vbModus = vbModusLive, UBound(oJoins), UBound(oJoins) / 2)
         
   If iMaxJoin > 0 Then    If iMaxJoin > 0 Then
       For iJoin = 1 To iMaxJoin        For iJoin = 1 To iMaxJoin
             oSh.Cells(iJoin + 1, colBOJoinId).Value = oJoins(iJoin).iBOJoinId  
           oSh.Cells(iJoin + 1, colJoinId).Value = oJoins(iJoin).iJoinId            oSh.Cells(iJoin + 1, colJoinId).Value = oJoins(iJoin).iJoinId
           oSh.Cells(iJoin + 1, colJoinExpr).Value = oJoins(iJoin).sExpression            oSh.Cells(iJoin + 1, colJoinExpr).Value = "'" & oJoins(iJoin).sExpression
       Next iJoin        Next iJoin
                 
       oSh.Range(Cells(2, 1), Cells(UBound(oJoins) + 1, colJoinExpr)).Select        oSh.Range(Cells(2, 1), Cells(UBound(oJoins) + 1, colJoinExpr)).Select
       Selection.Font.ColorIndex = vbColorDsStandard        Selection.Font.ColorIndex = vbColorDsStandard
                 
       If vbModus = vbModusDemo Then        If vbModus = vbModusDemo Then
           oSh.Rows(iJoin + 1).Select            oSh.Rows(iJoin + 1).Select
           oSh.Rows(iJoin + 1).MergeCells = True            oSh.Rows(iJoin + 1).MergeCells = True
           oSh.Rows(iJoin + 1).Font.FontStyle = "Bold"            oSh.Rows(iJoin + 1).Font.FontStyle = "Bold"
           oSh.Rows(iJoin + 1).Font.ColorIndex = 40            oSh.Rows(iJoin + 1).Font.ColorIndex = 40
           oSh.Rows(iJoin + 1).Interior.ColorIndex = 3            oSh.Rows(iJoin + 1).Interior.ColorIndex = 3
                 
           Select Case vbLang            Select Case vbLang
               Case 49 'german                Case 49 'german
                   oSh.Rows(iJoin + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."                    oSh.Rows(iJoin + 1) = "Demomodus. Es werden nur 50% der Daten angezeigt."
               Case Else ' english                Case Else ' english
                   oSh.Rows(iJoin + 1) = "demo mode, only first half of data will be represented"                    oSh.Rows(iJoin + 1) = "demo mode, only first half of data will be represented"
           End Select            End Select
                 
       End If        End If
                 
       oSh.Activate        oSh.Activate
       oSh.Range(Cells(1, 1), Cells(UBound(oJoins) + 1, colJoinExpr)).Select        oSh.Range(Cells(1, 1), Cells(UBound(oJoins) + 1, colJoinExpr)).Select
       Selection.AutoFilter        Selection.AutoFilter
                 
       oSh.Cells(2, 1).Select        oSh.Cells(2, 1).Select
       ActiveWindow.FreezePanes = True        ActiveWindow.FreezePanes = True
       oSh.Visible = xlSheetVisible        oSh.Visible = xlSheetVisible
   Else    Else
       oSh.Visible = xlSheetVeryHidden        oSh.Visible = xlSheetVeryHidden
   End If    End If
         
   Set oSh = Nothing    Set oSh = Nothing
   Exit Sub    Exit Sub
Err: Err:
   MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName    MsgBox Err.Description, vbCritical, Title:=vbErrHeader & sProcName
End Sub End Sub
Private Sub WriteUniverseXLSContexts(oMyWrk As Excel.Workbook) Private Sub WriteUniverseXLSContexts(oMyWrk As Excel.Workbook)
Dim sProcName As String Dim sProcName As String
sProcName = "WriteUniverseXLSContexts" sProcName = "WriteUniverseXLSContexts"
   
Dim oSh As Excel.Worksheet Dim oSh As Excel.Worksheet
Dim iSh As Integer Dim iSh As Integer
   
Dim iContext As Integer Dim iContext As Integer
Dim iMaxContext As Integer Dim iMaxContext As Integer
   
On Error GoTo Err On Error GoTo Err
         
   iSh = iCreateWorksheet(oMyWrk, "contexts_" & oUnvProp.sName)     iSh = iCreateWorksheet(oMyWrk, "ctxt_" & IIf(Len(oUnvProp.sName) > 24, Left(oUnvProp.sName, 24), oUnvProp.sName)) 
   Set oSh = oMyWrk.Worksheets(iSh)    Set oSh = oMyWrk.Worksheets(iSh)
   oSh.Activate    oSh.Activate
                 
   'init    'init
   Select Case vbLang    Select Case vbLang
       Case 49 'german        Case 49 'german
           oSh.Cells(1, colCtxtName).Value = "Context Name"            oSh.Cells(1, colCtxtName).Value = "Context Name"
           oSh.Cells(1, colCtxtTab1).Value = "Tabelle 1"            oSh.Cells(1, colCtxtTab1).Value = "Tabelle 1"
           oSh.Cells(1, colCtxtCol1).Value = "Spalte 1"            oSh.Cells(1, colCtxtCol1).Value = "Spalte 1"
           oSh.Cells(1, colCtxtTab2).Value = "Tabelle 2"            oSh.Cells(1, colCtxtTab2).Value = "Tabelle 2"
           oSh.Cells(1, colCtxtCol2).Value = "Spalte 2"            oSh.Cells(1, colCtxtCol2).Value = "Spalte 2"
           oSh.Cells(1, colCtxtExpr).Value = "Expression"            oSh.Cells(1, colCtxtExpr).Value = "Expression"
                 
       Case Else ' english        Case Else ' english
           oSh.Cells(1, colCtxtName).Value = "Context name"            oSh.Cells(1, colCtxtName).Value = "Context name"
           oSh.Cells(1, colCtxtTab1).Value = "Table 1"            oSh.Cells(1, colCtxtTab1).Value = "Table 1"
           oSh.Cells(1, colCtxtCol1).Value = "Column 1"            oSh.Cells(1, colCtxtCol1).Value = "Column 1"
           oSh.Cells(1, colCtxtTab2).Value = "Table 2"            oSh.Cells(1, colCtxtTab2).Value = "Table 2"
           oSh.Cells(1, colCtxtCol2).Value = "Column 2"            oSh.Cells(1, colCtxtCol2).Value = "Column 2"
           oSh.Cells(1, colCtxtExpr).Value = "Expression"            oSh.Cells(1, colCtxtExpr).Value = "Expression"
                 
   End Select    End Select
   
   oSh.Cells(1, colCtxtName).Font.Bold = True    oSh.Cells(1, colCtxtName).Font.Bold = True
   oSh.Columns(colCtxtName).NumberFormat = "@"    oSh.Columns(colCtxtName).NumberFormat = "@"