FRAMES | NO FRAMES |
Returns XML serialized segmentation target group.
Availability: Business Analyst Server.
string OpenSegTargetGroup ( esriFolderItem Item );
Parameter | Description |
---|---|
Item | Folder item containing a segmentation target group. Type esriFolderItem. |
Variable of type String containing XML serialized segmentation target group.
The example below retrieves an existing segmentation target group item from the Business Analyst Server Repository. In order to demonstrate this method, a market segmentation target group is created and saved to the repository. The OpenSegTargetGroup method is then used to retrieve the profile.
C# |
// Instantiate the BAServerHelper class to access analysis methods BAServerHelper baServerHelper = new BAServerHelper(); baServerHelper.ActiveDatasetID = "USA_ESRI"; // Optional parameter Target[] targets = new Target[2]; targets[0] = new Target(); targets[0].Name = "Group 1"; targets[0].Values = "1,2,3"; targets[1] = new Target(); targets[1].Name = "Group 2"; targets[1].Values = "4,5"; TargetGroupParameters parameters = new TargetGroupParameters(); parameters.Targets = targets; // Set other parameters // In general, a non-null esriFolderItem is specified to save a newly-created // item to the server-side repository or to reference an existing item in it. esriFolderItem outputItem = new esriFolderItem(); outputItem.folderType = esriFolderType.esriFolderSegTGs; outputItem.itemName = "targetGroup_OpenSegTargetGroup"; outputItem.projectName = "Default Project"; outputItem.workspaceName = "Default Workspace"; baServerHelper.TargetGroup(parameters, outputItem); // Retrieve the segmentation target group list residing in the repository string result = baServerHelper.OpenSegTargetGroup(outputItem); TargetGroupData targetGroup = new TargetGroupData(); targetGroup.Description = result; |