Returns the member ID of an account’s plug account. In other words, GetPlugAccount returns the member ID of the account that has been defined as an account’s PlugAcct attribute.
<HsvAccounts>.GetPlugAccount lAccountID, plPlugAccountID
The following example creates a function that takes an account label and returns the label of the account’s Plug account.
Function GetPlugFromLabel(sAcctLabel As String) As String
Dim cAccounts As HsvAccounts, cTreeInfo As IHsvTreeInfo
Dim lAcctID As Long, lPlugID As Long, sPlugLabel As String
Set cAccounts = m_cMetadata.Accounts
Set cTreeInfo = m_cMetadata.Accounts
lAcctID = cTreeInfo.GetItemID(sAcctLabel)
cAccounts.GetPlugAccount lAcctID, lPlugID
cTreeInfo.GetLabel lPlugID, sPlugLabel
GetPlugFromLabel = sPlugLabel
End Function