|
ED
|
avaliable
|
RT
|
not used
|
With this method you are able to create new variables within a
project.
Sub CreateVariable() Dim zVariables As Variables 'Object from type Variables Dim zVariable As Variable 'Child object from type Variables Dim zDrivers As Drivers 'Object from type Drivers Dim zVarTypes As VarTypes 'Object from type VarTypes 'Fill the objects Set zVariables = MyWorkspace.ActiveDocument.Variables Set zDrivers = MyWorkspace.ActiveDocument.Drivers Set zVarTypes = MyWorkspace.ActiveDocument.VarTypes 'Create a "intern driver" variable called "TestVariable" with object type "internal variable" and datatype "INT" Set zVariable = zVariables.CreateVar("TestVariable", zDrivers.Item(0), 33, zVarTypes.Item("INT")) End Sub
Channel type | Constant |
tpAdChan | 1 |
tpConfigDef | 6 |
tpControlStatus | 0 |
tpCsDaialogLast | 95 |
tpCsDbFirst | 96 |
tpCsDbLast | 127 |
tpCsDbDialog | 80 |
tpCsFirst | 64 |
tpCsLast | 79 |
tpDaChan | 2 |
tpDataBlock | 25 |
tpDataTakerChan | 18 |
tpDatenbaustein | 15 |
tpDigital | 3 |
tpDriverVariable | 35 |
tpExBaustein | 34 |
tpEzObjekt | 32 |
tpFilter | 4 |
tpHWStatus | 24 |
tpInitFile | 14 |
tpProgram | 19 |
tpSonderMerker | 9 |
tpSonderMerker1 | 36 |
tpSPSAusgang | 11 |
tpSPSDatenRegister | 20 |
tpSPSEingang | 10 |
tpSPSFileRegister | 21 |
tpSPSMerker | 8 |
tpSPSTimer | 22 |
tpSPSZaehler | 23 |
tpStrings | 5 |
tpSystemVariable | 33 |
tpTerminal | 16 |
tpTimerEvent | 12 |
tpTriggerEvent | 13 |
tpVirtuell | 7 |
tpVirtuellOnlBerechnen | 17 |