Venice
Year::CreateAnUnt
 
Creates an Analytical Unit object.
 
IAnUnt* CreateAnUnt (
    VARIANT_BOOL bCanChange
)
 
Parameters
bCanChange
[in] True if you want to update existing analytical unit entries (inserting or deleting an entry is not allowed), otherwise false.
 
Return value
A pointer to an Analytical Unit entry object interface.
 
Remarks
How to explicitly destroy this object?
C++
pAnUnt = NULL
The object is destroyed immediately.
C#
System.Runtime.InteropServices.Marshal.ReleaseComObject(oAnUnt)
oAnUnt = null
By assigning the object to null the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
VBS
Set oAnUnt = Nothing
The object is destroyed immediately.
VBN
System.Runtime.InteropServices.Marshal.ReleaseComObject(oAnUnt)
oAnUnt = Nothing
By assigning the object to Nothing the object is released (the reference count is decremented) but not destroyed. The garbage collector decides when the object is actually destroyed. Adding the ReleaseComObject-statement speeds up the actual destruction of the object.
 
See Also
CreateYearContext
 
Samples
 
C++
 
IAnUntPtr pAnUnt = pYear->CreateAnUnt (VARIANT_TRUE);

C#
 
AnUnt oAnUnt = oYear.CreateAnUnt (true);

VBS
 
Dim oAnUnt
Set oAnUnt = oYear.CreateAnUnt(True)

VB.NET
 
Dim oAnUnt As ClSdk.AnUnt
oAnUnt = oYear.CreateAnUnt(True)