CopyStyleSheet

Syntax

CopyStyleSheetResult CopyStyleSheet(StyleSheetId tStyleSheetFrom, StyleSheetId tStyleSheetTo, CopyStyleSheetArg tArg)

Parameters

tStyleSheetFrom. Moniker of styles table, from which copying is executed.

tStyleSheetTo. Moniker of the styles table, to which copying is executed.

tArg. Style copying parameters.

Description

The CopyStyleSheet operation copies styles from one styles table to another styles table.

Comments

To execute the operation, in the tStyleSheetFrom field specify moniker of the styles table, from which copying is executed, and in the tStyleSheetTo field specify moniker of the styles table, to which styles are copied. Each moniker can be obtained on executing the OpenStyleSheet operation or can be formed based on the report moniker, if styles are set up and stored together with the report.

Styles tables should be editable. The copied styles are specified in the tArg.items field.

The operation does not return any response.

Example

Below is the example of copying styles from one styles table to another one. The request contains monikers of two styles tables. The response contains no information.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CopyStyleSheet xmlns="http://www.fsight.ru/PP.SOM.Som">
<tStyleSheetFrom xmlns="">
  <id>CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE</id>
  </tStyleSheetFrom>
<tStyleSheetTo xmlns="">
  <id>CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDKJOFMGLHHOOFOAEKEFKDLDOJNNFCNGEMJEPCPKHIICJNILC</id>
  </tStyleSheetTo>
<tArg xmlns="">
  <resolution>Replace</resolution>
  </tArg>
  </CopyStyleSheet>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
  <CopyStyleSheetResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"CopyStyleSheet" :
{
"tStyleSheetFrom" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE"
},
"tStyleSheetTo" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDKJOFMGLHHOOFOAEKEFKDLDOJNNFCNGEMJEPCPKHIICJNILC"
},
"tArg" :
{
"resolution" : "Replace"
}
}
}

JSON response:

{
"CopyStyleSheetResult" : ""
}
public static void CopyStyleSheet(string monikerFrom, string monikerTo)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tCopy = new CopyStyleSheet()
{
tStyleSheetFrom = new StyleSheetId { id = monikerFrom },
tStyleSheetTo = new StyleSheetId { id = monikerTo },
tArg = new CopyStyleSheetArg()
{
resolution = StyleSheetConflictResolutionType.Replace
}
};
// Copy styles
somClient.CopyStyleSheet(tCopy);
}

See also:

Working with Styles Table