DynPictures

 

Remarks Properties Methods Samples

ED
avaliable
RT
read only

Remarks:Top

This collection contains the defined pictures. The single pictures can contain different dynamic elements. Each picture is linked to a template, that contains general information on the outer appearance.

Pictures always come from the current project

Properties:Top

Count Parent  

Methods:Top

Create Delete Export
Import Item  

Samples:Top

Sub CreatePicture()
	Dim zPIC As DynPicture
	Const PictureName As String = "Alarm-Picture"
	Const TemplateName As String = "MAIN"
	'check if Picture already exists...
	Set zPIC = MyWorkspace.ActiveDocument.DynPictures.Item(PictureName)
	If zPIC Is Nothing Then
		'create new picture if not existing...
		Set zPIC = MyWorkspace.ActiveDocument.DynPictures.Create(PictureName, TemplateName, tpAML)
		'set the backcolor and create Default MDI Elements
		With zPIC
			.BackColor = vbRed
			.CreateMdiDefaultElements
		End With
	End If
End Sub

Sub PictureList()
	Dim i, n As Integer
	Dim zProject As Project
	Dim zPicture As DynPicture
	'use this in VBA at zenOn Runtime...
	'Set zProject = thisproject
	'or use this in the zenOn Editor...
	Set zProject = MyWorkspace.ActiveDocument
	'run trough all pictures of the project...
	For i = 0 To zProject.DynPictures.Count - 1
		Set zPicture = zProject.DynPictures.Item(i)
		Debug.Print zPicture.Name
		'get count of elements within the actual picture
		Debug.Print zPicture.Elements.Count & " Elements in this Picture..."
	Next i
End Sub