30.01.2013 Views

6.3 Suspended Ceiling Design Process - Bilkent University

6.3 Suspended Ceiling Design Process - Bilkent University

6.3 Suspended Ceiling Design Process - Bilkent University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The Program Code in Microsoft Visual Basic<br />

' Reachability Macro<br />

' This macro partitions the matrix based on the reachability matrix result<br />

'<br />

Option Explicit<br />

Option Base 1<br />

Public reach As Variant 'reach contains the elements in the<br />

reachability matrix<br />

Dim temp1, temp2 As Variant<br />

Public color(150)<br />

Sub reachability_matrix()<br />

Dim i, j, k, m As Integer<br />

ReDim reach(n, n), temp1(n, n), temp2(n, n)<br />

Dim counter As Integer<br />

''''''''''''''''''''''''''''''''''''''<br />

' Clear contents<br />

Application.ScreenUpdating = False<br />

Partitioned = 1 ' flag to indicate that the problem is<br />

partitioned now<br />

'Worksheets("DSM").Select<br />

'Cells(2, 1).Select<br />

'counter = 1<br />

'Do While (Len(ActiveCell.Value) > 0)<br />

' color(counter) = ActiveCell.Interior.ColorIndex<br />

' counter = counter + 1<br />

' Cells(1 + counter, 1).Select<br />

'Loop<br />

Worksheets("New Sequence").Select<br />

Range(Cells(1, 2), Cells(250, 250)).Select<br />

Selection.ClearContents<br />

Cells(1, 1).Select<br />

Worksheets("Partitioned DSM").Select<br />

Range(Cells(1, 1), Cells(250, 250)).Select<br />

Selection.ClearContents<br />

With Selection.Interior<br />

.ColorIndex = 2<br />

.Pattern = xlPatternNone<br />

225

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!