Touchstone 11.0 API Reference
GetLossAnalysisExportTemplates Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > DataExportServiceClient Class : GetLossAnalysisExportTemplates Method
Contains a GetLossAnalysisExportTemplatesRequest that identifies the Touchstone-generated Detailed Loss Analysis Sequential Identifier (SID) of the Detailed Loss Analysis for which you want to retrieve the associated export templates, along with the associated Business Unit SID and SQL Instance SID.
Retrieves the Touchstone® Detailed Loss Analysis Export templates (identified by codes) for a given Detailed Loss Analysis.

Loss Analysis Export templates are files that contain report names and codes under which exported Analysis results data is collected and grouped for improved organization. The template files do not contain the data itself. They contain the codes used to group the data when Touchstone writes it to a comma separated values (CSV) file.

Syntax
Public Function GetLossAnalysisExportTemplates( _
   ByVal request As GetLossAnalysisExportTemplatesRequest _
) As GetLossAnalysisExportTemplatesResponse
Dim instance As DataExportServiceClient
Dim request As GetLossAnalysisExportTemplatesRequest
Dim value As GetLossAnalysisExportTemplatesResponse
 
value = instance.GetLossAnalysisExportTemplates(request)

Parameters

request
Contains a GetLossAnalysisExportTemplatesRequest that identifies the Touchstone-generated Detailed Loss Analysis Sequential Identifier (SID) of the Detailed Loss Analysis for which you want to retrieve the associated export templates, along with the associated Business Unit SID and SQL Instance SID.

Return Value

A GetLossAnalysisExportTemplatesResponse containing a list of the codes that identify the template files that group and organize Detailed Loss Analysis data for export to a CSV file.
Remarks
To find the Business Unit SID to pass into this method, call the GetBusinessUnits() method.

To find the SQL Instance SID to pass into this method, call the GetSqlInstances() method.

For information about submitting a new Touchstone Detailed Loss Analysis job, see the SubmitDetailedLossAnalysis() method.

Example
The following example shows how to retrieve the Touchstone Detailed Loss Analysis Export templates (identified by codes) for a given Detailed Loss Analysis using the GetLossAnalysisExportTemplates() method:
using System;
using AIR.Services.Common.Data;
using AIR.Services.DataExport.Api;
using AIR.Services.DataExport.Data;
            
class SnippetGetLossAnalysisExportTemplatesRequest
{
    private static void GetLossAnalysisExportTemplates(int businessUnitSid, int sqlInstanceSid, int projectSid, int analysisSid,
                        string exportFolder, string exportFileName, string exportActivityName)
    {
        DataExportServiceClient client = new DataExportServiceClient();
        GetLossAnalysisExportTemplatesRequest request = new GetLossAnalysisExportTemplatesRequest();
        request.BusinessUnitSid = businessUnitSid;
        request.SqlInstanceSid = sqlInstanceSid;
        request.AnalysisSid = analysisSid;
            
        GetLossAnalysisExportTemplatesResponse response = client.GetLossAnalysisExportTemplates(request);
        if (response.Status.Code == StatusCode.Success)
        {
            foreach (ExportReportTemplateCode templateCode in response.TemplateCodes)
            {
                Console.WriteLine("GroupByCode: " + templateCode.GroupByCode + " ViewByCode: " + templateCode.ViewByCode);
            }
        }
    }
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataExportServiceClient Class
DataExportServiceClient Members