BodyStd Script

Build 1501 on 14/Nov/2017  This topic last edited on: 9/May/2012, at 13:02

Description

Returns data for only body frames.

Syntax

command

param

description

Example

If bOnlyBody Then aOA = BodyStd(x, y, w, h, blink)

Code

  Function BodyStd(ByVal x, ByVal y, ByVal w, ByVal h, ByVal bLink)

    ' return data for only body

    Dim aOA(1, 10) ' defaults for the return array

    aOA(0, 0) = 1

    aOA(0, 2) = GetCols(w)

    aOA(0, 3) = IIf(SystemUserOptions.AFCS_VRules, "R+", "R-")

    aOA(0, 4) = IIf(bLink, "L+", "L-")

    aOA(0, 5) = "K-"

 

    Dim iHea As Integer = 0

    Dim iBdy As Integer = 0

    Dim nCol = GetCols(w)

    Dim iD As Integer = 0

    Dim cH = SystemUserOptions.AFCS_CurHeadH

    Dim pH = SystemUserOptions.AFCS_PromptHH

    Dim sD = SystemUserOptions.AFCS_BodyDistHead

 

    ' body

    If sD <> "" Then iD = Units.ToVal(sD)

    aOA(1, 4) = IIf(iBdy > 0, NormH(iBdy / aOA(0, 2) - iD), NormH(h)) ' also handle body height returned as single column height, calculate 'h' by dividing iBdy with nCol

    aOA(1, 0) = 0 : aOA(1, 1) = x : aOA(1, 2) = y : aOA(1, 3) = w : aOA(1, 5) = True : aOA(1, 6) = bodyname

    Return aOA

  End Function