GetRoute method

The GetRoute method gets the path through the document hierarchy to an object.

Use the argument to specify whether you want the path through the Runtime DCO (True) or the Setup DCO (False).

Syntax

C#
string GetRoute(bool bRuntime)

Arguments

bRuntime
True for the Runtime DCO path; False for the Setup DCO path

Returns

String with the path.

Applies to

Any object type.

C# example

In the first example, GetRoute( ) returns the path through the Runtime DCO to the Vendor field on page TM000001.
m_oDCO.Read("C:\\Datacap\\APT\\batches\\20100096.001\\Verify.xml");
m_oDCOPage = m_oDCO.FindChild("TM000001");
m_oDCOField = m_oDCOPage.FindChild("Vendor");
string strRoute = m_oDCOField.GetRoute(true);
The returned string has the following format: B/D(20100096.001.01)/P(TM000001)/F(Vendor).

In the next example, GetRoute( ) returns the path through the Setup DCO to the Details field.

m_oDCO.ReadSetup("C:\\Datacap\\APT\\dco_APT\\APT.XML");
m_oDCOField = m_oDCO.FindChild("Details");
string returnString = m_oDCOField.GetRoute(false);
The returned string has the following format: B/D[Invoice]/P[Main_Page]/F[Details].