SymbolElements

 

Remarks Properties Methods Samples

ED
avaliable
RT
not used

Remarks:Top

This collection contains the 'Element' objects within a symbol. It is possible, that there are symbols in symbols and so on, so it could be neccessary to enumerate the object recursive.

Properties:Top

Count Parent  

Methods:Top

Add Item Remove

Samples:Top

Sub SymbolElem()
Dim zPIC As DynPicture
Dim zSymbol As Element
Dim zText As Element
Dim zCircle As Element

	Set zPIC = MyWorkspace.ActiveDocument.DynPictures.Item("START")

	'create static text element
	Set zText = zPIC.Elements.Create("MyStaticText", tpText)
	zText.Top = 100
	zText.Left = 100

	'create circle
	Set zCircle = zPIC.Elements.Create("MyStaticCircle", tpCircle)
	zCircle.Top = 150
	zCircle.Left = 150

	'create symbol
	Set zSymbol = zPIC.Elements.Create("MyNewSymbol", tpSymbol)
	zSymbol.Elements.Add zText
	zSymbol.Elements.Add zCircle
	zPIC.Save
End Sub

Sub EnumSymbolElements()
Dim zPicture As DynPicture
Dim zSymbol As Element
Dim zSymElements As SymbolElements
Dim i As Integer

	'get Picture,(embedded) Symbol, SymbolElements collection...
	Set zPicture = MyWorkspace.ActiveDocument.DynPictures.Item("START")
	Set zSymbol = zPicture.Elements.Item("MyNewSymbol")
	Set zSymElements = zSymbol.Elements

	'enumerate all elements within a (embedded) symbol
	For i = 0 To zSymElements.Count - 1
		Debug.Print zSymElements.Item(i).Name & " [" & zSymElements.Item(i).Top & "/" & zSymElements.Item(i).Left & "]"
	Next

End Sub