IPredictorServiceSiteAdmin2::get_SegmentLabels, put_SegmentLabels Property [C++]

The SegmentLabels property is a read/write Variant that contains the labels for a given segment model.

Definition

[C++]

Get method:

HRESULT IPredictorServiceSiteAdmin2::get_SegmentLabels(BSTRsModelName,
  longlDepth,
  VARIANT*pvarsaLabels);

Put method:

HRESULT IPredictorServiceSiteAdmin2::put_SegmentLabels(BSTRsModelName,
  longlDepth,
  VARIANTpvarsaLabels);

[Visual Basic]

Property SegmentLabels(sModelName As String,
  lDepth As Long) As Variant

Parameters

  • sModelName[C++]
    [in] A BSTR that contains the name of the segment model.
  • sModelName[Visual Basic]
    A String that contains the name of the segment model.
  • lDepth[C++]
    [in] A long that specifies the depth in the segment hierarchy from which labels are assigned or retrieved.
  • lDepth[Visual Basic]
    A Long that specifies the depth in the segment hierarchy from which labels are assigned or retrieved.
  • pvarsaLabels[C++]
    [in] When putting the property, a VARIANT that contains the segment labels.
    [out, retval] When getting the property, a pointer to a VARIANT used to return the segment labels.

[C++]

Return Values

These methods return an HRESULT indicating whether they completed successfully. See the following Error Values section for more details.

Error Values

[C++] These methods return S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This property sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

A segment model classifies groups of users into segments of users with similar user properties. Similar segments are grouped into higher order collections of segments, creating a hierarchy. When the segments are first generated they are generically labeled (for example, Segment4 or Group2). Rename the labels to better identify the different groups.

Valid values for the lDepth parameter are -1 (returns all segments) and 2 or greater.

Connect to the Data Warehouse using the Init method before accessing this property.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[C++]

The pvarsaLabels parameter contains valid data only if the property is accessed successfully.

[Visual Basic]

Example

' saLabels is a SafeArray of Strings
' segment level 2 contains 3 members

saLabels(0) = "TeenAgers"
saLabels(1) = "TwentySomethings"
saLabels(2) = "Oldies"

oPredictorServiceSiteAdmin.SegmentLabels("Demog1", 2) = saLabels

See Also

[C++]PredictorServiceAdmin Object

[C++]PredictorServiceSiteAdmin Object

[C++]PredModelBuilder Object

[Visual Basic]PredictorServiceAdmin Object

[Visual Basic]PredictorServiceSiteAdmin Object

[Visual Basic]PredModelBuilder Object

Copyright © 2005 Microsoft Corporation.
All rights reserved.