![]() |
![]() |
Layer.Properties
Property Properties As Properties
Member of Layer
The Properties property returns the Properties collection that allows you to specify and manipulate custom data associated for the given layer belonging to a specified page only.
The Properties property returns a read-only value.
The following code example creates 100 shapes and stores their IDs in the active layer for future reference:
Sub CreateAndStoreShapes() Dim i As Long Dim x As Double, y As Double, r As Double Dim MaxX As Double, MaxY As Double, MaxR As Double Dim s As Shape, Num As Long MaxX = ActivePage.SizeWidth MaxY = ActivePage.SizeHeight MaxR = 1 Num = 100 ActiveLayer.Properties("ShapeArray", 0) = Num ' Store the total number of shapes For i = 1 To Num x = Rnd() * MaxX y = Rnd() * MaxY r = Rnd() * MaxR Set s = ActiveLayer.CreateEllipse2(x, y, r) s.Fill.UniformColor.RGBAssign Rnd() * 256, Rnd() * 256, Rnd() * 256 ActiveLayer.Properties("ShapeArray", i) = s.StaticID ' Store the current shape's ID number Next i End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.