Sheet Metal API

I am trying to create a macro within solidworks 2k8 sp3.0that allows me to apply a base flange to a sketch. I recorded amacro of the steps and commented out one line to get some of thefunctionality I wanted. Here is what it looks like:

Dim swApp As Object
Dim Part As Object
Dim SelMgr As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Dim Feature As Object
Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc
Set SelMgr = Part.SelectionManager
Part.ShowNamedView2 "*Trimetric", 8
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
swApp.ActiveDoc.ActiveView.FrameState = 1
'Part.CloseFamilyTable
Set CustomBendAllowanceData =Part.FeatureManager.CreateCustomBendAllowance
CustomBendAllowanceData.BendTableFile = "L:\\Library\\SolidWorks BendTables\\GalvHR.xls"
Part.FeatureManager.InsertSheetMetalBaseFlange 0.00100584, 0,0.00127, 0.254, 0.00254, 0, 6, 0, 1, CustomBendAllowanceData, 0, 0,0.0001, 0.0001, 0.5, 1
Part.ClearSelection2 True
End Sub

My question now is, how do I set the bend radius, thickness anddirection for this base flange using my macro? API help says thatthe command should work like this:
retVal = FeatureManager.InsertSheetMetalBaseFlange ( thickness,thickenDir, radius, extrudeDist1, extrudeDist2, flipExtruDir,endCondition1, endCondition2, dirToUse, pCBA, useDefaultRelief,reliefType, reliefWidth, reliefDepth, reliefRatio, useReliefRatio )

This is not right because when I just change the first number itmesses with some other thickness, not material thickness.

Any help would be much appreciated.

ThanksSolidworksApi macros