exportToDWG help.

No matter how many different combinations I try, I cant get this to work.  Could someone please look at my code and tell me whats wrong?

After much trial, I copied the example they have in the help files, but could not get that to work either.  So most (almost all) of this code belongs to this example.

The idea is to export the Top View when I click the toDXF Button.  Here is the API help article for exportToDWG.

Private Sub toDxfBT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles toDxfBT.Click


        sModelName = Part.GetPathName
        dataAlignment(0) = 0.0
        dataAlignment(1) = 0.0
        dataAlignment(2) = 0.0
        dataAlignment(3) = 1.0
        dataAlignment(4) = 0.0
        dataAlignment(5) = 0.0
        dataAlignment(6) = 0.0
        dataAlignment(7) = 1.0
        dataAlignment(8) = 0.0
        dataAlignment(9) = 0.0
        dataAlignment(10) = 0.0
        dataAlignment(11) = 1.0
        varAlignment = dataAlignment
        dataViews(0) = "*Top"
        varViews = dataViews


        swPart.ExportToDWG("S:\CHASE COVERS\08-06-2010\test.DWG", sModelName, 3, False, varAlignment, True, False, 0, varViews)
    End Sub

Any pointers would be appreciated.

SolidworksApi macros