Dim pl
Dim doc

Set pl = CreateObject("PhotoLine.Application")
Set doc = pl.ActiveDocument
if (not doc is nothing) then
	Dim layer
	
	Set layer = doc.ActivePage.ActiveLayer

	if (not layer is nothing) then
		call CreateRotation(layer, 8)
	end if
end if

Sub CreateRotation(layer, count)
	Dim	angle
	Dim	referencePoint
	Dim	i
	Dim	copy
	Dim	matrix

	angle = 360 / (count + 1)
	referencePoint = layer.ReferencePoint(0)
	set matrix = pl.GetRotationMatrix(angle, referencePoint)
	
	for i = 1 to count
		Set copy = layer.DuplicateVirtual
		copy.MatrixToPage = copy.MatrixToPage.Concatenate(matrix)
		Set layer = copy
	next
End Sub