Interlocking.CreateDynProperty



CreateDynProperty(bsPath As String) As Boolean

Parameters

bsPath As String
Name of DynProperty to be created as string
ED
avaliable
RT
not used

Remarks

With the DynProperties "Variables" and "Actions" you have the opportunity to create a variable at an interlocking and to create an action at a command interlocking (special interlockings for zenOn Energy).

Sample:


Sub Command_Interlockings()

Dim zInterlockings As Interlockings 'Object from type Interlockings
Dim zInterlocking As Interlocking   'Child object from type Interlocking

	'Load the available Interlockings
	Set zInterlockings = thisProject.Interlockings
	'Select a command interlocking
	Set zInterlocking = zInterlockings.Item("Verriegelung 1")
	
		'Create a "variable" at the command interlocking
		zInterlocking.CreateDynProperty ("Variables")
		'Allocate the first variable of the project variables list
		zInterlocking.DynProperties("Variables[0].Name") = thisProject.Variables.Item(0)
	
		
		'Create an "action" at the command interlocking
		zInterlocking.CreateDynProperty ("Actions")
		'The action should be from type "Double command"
		zInterlocking.DynProperties("Actions[0].Type") = 1
		'Set the "variable" via a string
		zInterlocking.DynProperties("Actions[0].TTA") = "switch_1"
		'Set the "switching direction" to ON
		zInterlocking.DynProperties("Actions[0].Direction") = 1
		'Set the "command setting status" to 1
		zInterlocking.DynProperties("Actions[0].CommandState") = 1
		'Set that CEL entries should be suppressed
		zInterlocking.DynProperties("Actions[0].CELBlock") = True
		'Set the "timeout" to 60 sec
		zInterlocking.DynProperties("Actions[0].Timeout") = 60
		'Set the edge "delay" to 2000 msec
		zInterlocking.DynProperties("Actions[0].EdgeDelay") = 2000
		'Read the "modifyable stati"
		Debug.Print zInterlocking.DynProperties("Actions[0].State")
		'Set the "nominal/actual value comparison" active
		zInterlocking.DynProperties("Actions[0].Actual") = True
		'Set the "menu specific picture" (menu type = commands) via a string
		zInterlocking.DynProperties("Actions[0].Picture") = "Picture 1"
		'Set the "close automatically" property active
		zInterlocking.DynProperties("Actions[0].CloseMDIWnd") = True
		'Set the "two-stage" property active
		zInterlocking.DynProperties("Actions[0].TwoLevel") = True
		'Set the "two-hand operation" property active
		zInterlocking.DynProperties("Actions[0].TwoHand") = True

End Sub


See Also

Interlocking