VarType

 

Remarks Properties Methods Samples

ED
avaliable
RT
not used

Remarks:Top

With the object VarType you have the opportunity to edit selected datatypes.

Properties:Top

ID Name Parent

Methods:Top

CanDeleteType CheckIn CheckOut
CreateEdLimit DeleteEdLimit DeleteSubItem
DynPropertiesEnum[GET] DynProperties[GET] DynProperties[PUT]
EdLimitCount EdLimitItem Get
GetDataType IsAllowed IsCheckedOut
IsDifferent IsLocked IsSimple
NewSubItem SubItem SubItemCount
UndoCheckOut    

Samples:Top



Sub CreateComplexType()

Dim zVarTypes As VarTypes   'Object from type VarTypes
Dim zVarType As VarType 'Child object from type VarTypes

'Fill the objects
Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes

'Create a structure datatype called "Structure_1"
Set zVarType = zVarTypes.CreateComplexType("Structure_1")
Call NewSubItem

End Sub

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
Dim i As Integer

'Fill the objects
Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes

'Read the own created structure datatype "struct"
Set zVarType = zVarTypes.Item("Structure_1")
'Read the INT datatype as base type for the structure element
Set zVarType_1 = zVarTypes.Item("INT")
'Create 5 structure elements called "Element_" from type INT which should be embedded
For i = 1 To 5
Set zComplexItem = zVarType.NewSubItem("Element_" & i, zVarType_1, False, 1, 0, 0, 0)
Next i

End Sub