swSMBendStateFlattened

here is my code

nRetVal = swModel.SetBendState(swSMBendStateFlattened)
debug.print nRetVal
If nRetVal <> 0 Then
MsgBox "There are features in this part preventing it from beingflattened." & vbCrLf & _
"If the part contains fillets and/or chamfers on edges that crossbends" & vbCrLf & _
"then you must rollback the part prior to those features."
GoTo CleanUp
End If


I need to check the part to see if it can be flattened before mymacro can continue. The above works just fine for the most part. IfI have a sheetmetal part the has a fillet or chamfer along an edgethat crosses a bend nRetVal still returns 0 even though that partcan not be flattened. Is there a way around this, or is there a wayto find out if the part can be flatted?SolidworksApi macros