get_RulePosition method

The get_RulePosition method gets the pos attribute of a specified rule within a SetupNode object. The pos attribute determines the position of an object type relative to other objects of the same type within the parent node. You can use this method to verify the order of pages in a document and ensure document integrity.

Attention: .NET only. For VBScript, use the RulePosition property instead.

Description

The following rules specify position requirements for documents of type Tax Return.
  • A TaxSep page must come before the 1040EZ page and any Attachment pages.
  • The 1040EZ page must come before any Attachment pages.
<D type="Tax Return">
.
.
   <P type="TaxSep" pos="1" min="0" max="1"/>        <!--Rule 0-->
   <P type="1040EZ" pos="2" min="1" max="1"/>        <!--Rule 1-->
   <P type="Attachment" pos="3" min="0" max="0"/>    <!--Rule 2-->
If a rule has pos="0", then the corresponding object type is not included in the process that confirms document integrity. For details about document integrity, see DCOSetupNode APIs.

Syntax

C#
int get_RulePosition(int nIndex)

Arguments

nIndex
The index of the rule, where 0 is the first rule under the current SetupNode object.

C# Example

This example gets the position attribute for the first rule under the current SetupNode object.
int nPosValue = m_oDCOSetupNode.get_RulePosition(0);