Seating chart, amphitheater style

M

McDuck

I want to make a seating chart for my class (120 students).The room is laid
out amphitheater style. That is, the room is a big piece of pie, except that
the tip of the pie is cut off. There are rows of seats in semi-circle
formation, with several aisles. It this realistic to do in visio (I have
Vioio 2000)? Are there any samples I could get as a starter?
TIA
 
J

John Marshall, MVP

This is possible with all versions of Visio.

If you are into a bit of programming, there is an example of laying out a
copy of a shape in a circular pattern with each copy facing the center. The
example is called Polar Array at
www.mvps.org/visio/VBA.htm.

You can change the arc that the program covers and remember that the number
of seats per arc changes the further you go from the center.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
P

Phil

Here is the macro. Email me if you want the .vsd file.

'
' Amphitheatre.vsd written by Phil Suematsu
'
' To use this macro, delete all shapes on Page-1 of the document, and
run this macro
' The resulting diagram may need to be scaled to fit the page
'
' To customize the diagram, change the seating parameters up to "---
End of configuration ---"
' The dimensions of Page-1 are 44ft wide by 34ft high (this macro may
be dependent on these dimensions)
' The seat shape is the only object on Page-2 of the document
' The dimensions of the seat shape are 2ft by 1.75ft (this macro may
be dependent on these dimensions)
'
Sub CopyRotate()
Const pi = 3.1415926

' --- Start of configuration ---

Const RowDepth = 24 ' Depth of each row
Const RadiusStart = 100 ' Radius of front row
Const AisleWidth = 45 ' Width of aisles

'
' A section is defined by the group of seats bounded by the left
or right sides or aisles
'
Const MaxSection = 3 ' Number of sections
Const MaxRow = 10 ' Number of rows

Dim SeatCount(MaxRow, MaxSection) As Integer
SeatCount(1, 1) = 3 ' Row 1 Section 1 (Defines the front row)
SeatCount(1, 2) = 2 ' Row 1 Section 2
SeatCount(1, 3) = 3 ' Row 1 Section 3

SeatCount(2, 1) = 4 ' Row 2 Section 1
SeatCount(2, 2) = 3 ' Row 2 Section 2
SeatCount(2, 3) = 4 ' Row 2 Section 3

SeatCount(3, 1) = 5
SeatCount(3, 2) = 4
SeatCount(3, 3) = 5

SeatCount(4, 1) = 6
SeatCount(4, 2) = 5
SeatCount(4, 3) = 6

SeatCount(5, 1) = 6
SeatCount(5, 2) = 6
SeatCount(5, 3) = 6

SeatCount(6, 1) = 7
SeatCount(6, 2) = 7
SeatCount(6, 3) = 7

SeatCount(7, 1) = 8
SeatCount(7, 2) = 8
SeatCount(7, 3) = 8

SeatCount(8, 1) = 9
SeatCount(8, 2) = 9
SeatCount(8, 3) = 9

SeatCount(9, 1) = 10
SeatCount(9, 2) = 10
SeatCount(9, 3) = 10

SeatCount(10, 1) = 11
SeatCount(10, 2) = 11
SeatCount(10, 3) = 11

Dim SectionAngle(MaxSection + 1) As Double
SectionAngle(1) = 22 ' Angle (Degrees) of left side of
seating chart
SectionAngle(2) = 66 ' Angle (Degrees) of leftmost aisle
SectionAngle(3) = 180 - 66 ' Angle of next aisle
SectionAngle(4) = 180 - 22 ' Angle of right side of seating
chart

CenterX = 265 ' Center of seating chart
CenterY = -RadiusStart * Sin(SectionAngle(1) / 360 * 2 * pi) +
RowDepth

' --- End of configuration ---

For i = 1 To MaxSection + 1
SectionAngle(i) = SectionAngle(i) / 360 * 2 * pi ' Convert
to radians
Next

Radius = RadiusStart
For Row = 1 To MaxRow
nSeat = 0
For Section = 1 To MaxSection
Angle = SectionAngle(Section)
If Section <> 1 Then
Angle = Angle + Atn(AisleWidth / Radius) / 2
End If

StopAngle = SectionAngle(Section + 1)
If Section <> MaxSection Then
StopAngle = StopAngle - Atn(AisleWidth / Radius) / 2
End If

AngleDelta = (StopAngle - Angle) / (SeatCount(Row,
Section) - 1)

For i = 0 To SeatCount(Row, Section) - 1
nSeat = nSeat + 1
ActiveDocument.Pages.Item(2).Shapes.Item(1).Copy
ActiveWindow.Paste
ActiveWindow.Selection.PrimaryItem.Cells("PinX") =
CenterX + Radius * Cos(pi - Angle)
ActiveWindow.Selection.PrimaryItem.Cells("PinY") =
CenterY + Radius * Sin(pi - Angle)
ActiveWindow.Selection.PrimaryItem.Cells("Angle") = pi
- Angle
ActiveWindow.Selection.PrimaryItem.Text = Str(Row) +
"," + Str(nSeat)
Angle = Angle + AngleDelta
Next
DoEvents
Next
Radius = Radius + RowDepth
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top