Touchstone 11.0 API Reference
GetCustomFrequencySets Method
Example 


Air.Services.Proxy Assembly > (Global) Namespace > LossAnalysisServiceClient Class : GetCustomFrequencySets Method
Contains a GetCustomFrequencySetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier, SQL Instance SID, and SID associated with the list of the Custom Frequency Sets that you want to import.
Imports all Custom Frequency Sets into Touchstone® Detailed Loss Analyses for a given SID within a specific Business Unit and SQL Server Instance.

Touchstone clients need a separate license for Model Builder with the Custom Event Frequency and Custom Vulnerability features in order to import custom catalogs using the Loss Analysis API.

The custom event frequency feature is applicable only to AIR models; it cannot be run with custom models created by the user. This feature does not apply for the Deterministic Event sets.
Syntax
Public Function GetCustomFrequencySets( _
   ByVal request As GetCustomFrequencySetsRequest _
) As GetCustomFrequencySetsResponse
Dim instance As LossAnalysisServiceClient
Dim request As GetCustomFrequencySetsRequest
Dim value As GetCustomFrequencySetsResponse
 
value = instance.GetCustomFrequencySets(request)

Parameters

request
Contains a GetCustomFrequencySetsRequest that identifies the Touchstone-generated Business Unit Sequential Identifier, SQL Instance SID, and SID associated with the list of the Custom Frequency Sets that you want to import.

Return Value

A GetCustomFrequencySetsResponse containing a list of Custom Frequency Sets for the specified Project within the specified SQL Server Instance and Business Unit.
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.

To find the Project SID to pass into this method, call the GetProjects() method.

Example
The following example shows how to import a list of all custom frequency sets for each model into Touchstone for a given SID within specific Business Unit and SQL Server Instance using the GetCustomFrequencySets() method:
using AIR.Services.Common.Data;
using AIR.Services.LossAnalysis.Api;
using System;
            
class SnippetGetCustomFrequencySetsRequest
{
private static void GetCustomFrequencySets(int businessUnitSid, int sqlInstanceSid)
{
LossAnalysisServiceClient client = new LossAnalysisServiceClient();
GetCustomFrequencySetsRequest request = new GetCustomFrequencySetsRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
GetCustomFrequencySetsResponse response = client.GetCustomFrequencySets(request);
if (response.Status.Code == StatusCode.Success)
{
 foreach (var es in response.CustomFrequencySets)
 {
            
            
Console.WriteLine("SID: " + es.Sid);
Console.WriteLine("Name: " + es.CustomFrequencyName);
Console.WriteLine("Model Code: " + es.ModelCode);
            }
        }
    }
}
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

LossAnalysisServiceClient Class
LossAnalysisServiceClient Members