DCOSetupNode APIs
You can use the DCOSetupNode API properties and methods to access and modify Setup DCO child objects, including rules and variables.
<D type="Invoice"> 1
<V n="ID">0</V>
<V n="TYPE">Document</V>
<V n="STATUS">0</V>
<V n="DOC DATA">0</V>
<V n="MIN_TYPES">0</V> 2
<V n="MAX_TYPES">0</V>
<V n="rules"><in><r id="1" rs="11"
/><r id="5" rs="7" /><r
id="4" rs="16" /></in></V>
<P type="Main_Page" pos="1" min="1" max="1"/>
<P type="Trailing_Page" pos="0" min="0" max="0"/> 3
<P type="Attachment" pos="0" min="0" max="0"/>
</D>
1 Setup node for the document type Invoice
2 Variables
3 Parameters
DCOSetupNode objects are created and accessed through the parent DCOSetup object.
The SetupNode object also defines the document integrity rules for that object type. The following example specifies that a Tax Return document must have at least one (min="1") and at most one (max="1") page of type 1040EZ. The relative position attribute (pos="2") specifies that the 1040EZ page must come after the TaxSep page (if present) and before the Attachment page (if present):
<D type="Tax Return">
<V n="ID">0</V>
<V n="ID">0</V>
<V n="TYPE">Document</V>
<V n="STATUS">0</V>
<V n="DOC DATA">0</V>
<V n="MIN_TYPES">2</V>
<V n="MAX_TYPES">0</V>
<V n="rules"></V>
<P type="TaxSep" pos="1" min="0" max="1"/>
<P type="1040EZ" pos="2" min="1" max="1"/> <--- Rule for page 1040EZ
<P type="Attachment" pos="3" min="0" max="0"/>
</D>
The max="0" value means unlimited. In the example, there can be any number of attachment pages. The MIN_TYPES and MAX_TYPES variables define the minimum and maximum number of child object types that must be present at run time to constitute a valid document. The MIN_TYPES value (2) specifies that each runtime document must have at least two different page types.
TDCOLib.DCOSetupNode m_oDCOSetupNode = m_oDCOSetup.GetNodeByName(2, "Main_Page");
Through
the DCOSetup object interface, you can access all of the DCOSetupNode
object properties and methods.