setLabelValueFromRows

 

Description

Set column label value from rows value

Syntax

bool setLabelValueFromRows( Worksheet & wks, int nShortName = -1, int nLongName = -1, int nUnit = -1, int nCommentFrom = -1, bool bRemoveRows = true, bool bShowLabel = true, int nCommentTo = -1, int nMainheaderLines = 0 )

Parameters

wks
[Input] The worksheet need set label value
nShortName
[Input] Row( offset) to be set as ShortName
nLongName
[Input] Row( offset) to be set as LongName
nUnit
[Input] Row( offset) to be set as Unit
nCommentFrom
[Input] Begin Row( offset) to be set as Comment
bRemoveRows
[Input] whether delete Rows after set these as label value
bShowLabel
[Input] show label or not
nCommentTo
[Input] End Row( offset) to be set as Comment
nMainheaderLines
[Input] offset

Return

True for success; otherwise false.

Examples

Ex1

void setLabelValueFromRows_Ex()
{     
        //Make sure the worksheet is active in current project
        Worksheet wks = Project.ActiveLayer();      
        if(setLabelValueFromRows(wks,0,1,2,3,false,true,5,0))
                printf("Set Success!");
}

Remark

See Also

header to Include

origin.h

Reference