ArchiveED

 

Remarks Properties Methods DynProperties Samples

ED
avaliable
RT
not used

Remarks:Top

The "ArchiveED" object contains project information like the name, the source archive and other properties.

It is used within the editor in order to initialize the archive. Hence, the object won't be available in the runtime.
In the "Archive" object, which will be available in the runtime, some properties will be set to read-only.

→ Therefore all important initialization should be done by means of the "ArchiveED" object.

Properties:Top

Parent    

Methods:Top

AddVariable Count DynPropertiesEnum[GET]
DynProperties[GET] DynProperties[PUT] Item
RemoveVariable    

DynProperties:Top

Name Type Description
AuslUnicode Boolean This property returns if the archive is evacuated in unicode when the evacuation via ASCII is selected.
BeginTime Long Returns the time an archive file is created.
ChargeVar ZT_VARIABLE This property gets/sets the variable which is used as batch variable.
Count Long This property gets/sets the number of archive files which are evacuated. For example: Scan cycle of 10 minutes and an evacuation storage time of 2 hours sets the count property on value 6.
Cycle Long This property gets/sets the number of values which are arranged in an archive file. For example: Scan cycle of 1 second and cyclic file creation every 30 seconds sets the cycle property on value 30.
CycleStart Long This property gets/sets the cycle start time.
Cyclic Long This property gets/sets the scanning settings of an archive.
Cyclic scanning, Cycle = 9
Cyclic scanning, Monthly = 13
Event triggered scanning, Internal = 7
Event triggered scanning, External = 15
Spontaneous scanning = 14
DataSource String This property gets/sets the database provider string for the sql evacuation of the archives.
EventVar ZT_VARIABLE This property gets/sets the trigger variable of an archive.
FileFormat Long This property gets/sets the kind of archive saving format.
Internal database (*.arx), no evacuation = 9
Internal database (*.arx), evacuation in internal format (*.arx) = 2049
Internal database (*.arx), evacuation in SQL database (*.arx) = 1025
Internal database (*.arx), evacuation in XML format (*.xml) = 513
Internal database (*.arx), evacuation in ASCII format (*.txt) = 33
Internal database (*.arx), evacuation in dBase IV format (*.dbf) = 33
dBase IV format (*.dbf), no evacuation = 10
ASCII file (*.txt), no evacuation = 10
XML file (*.xml), no evacuation = 264

FktEnd Long This property gets/sets the function which is linked as end function via its function ID.
FktStart Long This property gets/sets the function which is linked as end function via its function ID.
Flags Long This property gets/sets the "option" settings of an archive via a bit coded value.
Format String This property gets/sets the format of ASCII/dBase evacuation files.
IsChargeIdx Boolean This property gets/sets the "index batches" option of an batch archive.
LastIndex Long
LongName String This property gets/sets the name of the archive.
Modus Long This property gets/sets the kind of start and stop of an archive.
At start and end of runtime = 3
User defined = 2
RDA block archive = 0
Offset Long This property gets/sets the offset time (in sec) when cyclic scanning is used.
ShortName String This property gets/sets the identificator of an archive.
SourceShortName String This property gets the identificatior of the head archive. It is only set when a follow archive is available.
TimeGap Long
Unicode Boolean This property gets/sets the unicode flag when the saving format ASCII is used for archives.

Samples:Top

Sub zenOn_ArchiveED()
	'Declarations
	Dim zArchiveED As ArchiveED
	Dim zTimeConvert As clsTimeConvert
	Dim i As Integer

	'Initialize zArchiveED with the archive selected by the identification name "01"
	Set zArchiveED = MyWorkspace.ActiveDocument.ArchivesED.Item("01")
	'If no such archive is available ...
	If zArchiveED Is Nothing Then
		'... then create a whole new archive with the identification name "01" and the name "zenOn_ArchiveED"
		Set zArchiveED = MyWorkspace.ActiveDocument.ArchivesED.CreateArchive("01", "zenOn_ArchiveED", Nothing)
	End If

	'Initialize zTimeConvert by creating a new instance of the zenOn "clsTimeConvert" macro
	Set zTimeConvert = New clsTimeConvert

	With zArchiveED
		'Set the scanning mode: Cyclic scanning
		.DynProperties("Cyclic") = 1
		'Set the scanning cycle rate: 5 seconds
		.DynProperties("TimeGap") = 5
		'Set the offset: 0 seconds
		.DynProperties("Offset") = 0
		'Set the saving cycle: 60 seconds
		.DynProperties("Cycle") = 60
		'Set the start time of the cycle: 2007-07-30 12:00:00
		.DynProperties("CycleStart") = zTimeConvert.System2zenOn(CDbl(CDate("30.07.2007 12:00:00")))
		'Add the "WIZ_VAR_12" variable to the archive
		.AddVariable "WIZ_VAR_12", 0, Nothing
	End With

	'Output the configuration
	With zArchiveED
		'Output the identifier and the name
		Debug.Print "Name: " & .DynProperties("ShortName") & " - " & .DynProperties("LongName")
		'Output the scanning mode
		Debug.Print vbTab & "Cyclic: " & .DynProperties("Cyclic")
		'Output the scanning cycle
		Debug.Print vbTab & "Scanning cycle: " & .DynProperties("TimeGap") & " sec."
		'Output the offset
		Debug.Print vbTab & "Offset: " & .DynProperties("Offset") & " sec."
		'Output the archive saving cycle
		Debug.Print vbTab & "Save cycle: " & .DynProperties("Cycle") & " sec."
		'Output the start time of the cycle
		Debug.Print vbTab & "Cycle start: " & Format(zTimeConvert.zenOn2System(CDbl(.DynProperties("CycleStart"))), "yyyy-mm-dd hh:mm:ss")
	End With

End Sub