|
ED
|
avaliable
|
RT
|
not used
|
With this method you can create new sub items for a structure datatype.
Sub NewSubItem() Dim zVarTypes As VarTypes 'Object from type VarTypes Dim zVarType As VarType 'Child object from type VarTypes Dim zVarType_1 As VarType 'Child object from type VarTypes Dim zDrivers As Drivers 'Object from type Drivers Dim zComplexItem As ComplexItem 'Child object from type ComplexItem 'Fill the objects Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes 'Read the own created structure datatype "struct" Set zVarType = zVarTypes.Item("struct") 'Read the INT datatype as base type for the structure element Set zVarType_1 = zVarTypes.Item("INT") 'Create a new structure element called "Element_1" from type INT which should be embedded Set zComplexItem = zVarType.NewSubItem("Element_1", zVarType_1, False, 0, 0, 0, 0) End Sub