CopyStyleSheetResult CopyStyleSheet(StyleSheetId tStyleSheetFrom, StyleSheetId tStyleSheetTo, CopyStyleSheetArg tArg)
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.
The CopyStyleSheet operation copies styles from one styles table to another styles table.
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.
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.
{
"CopyStyleSheet" :
{
"tStyleSheetFrom" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE"
},
"tStyleSheetTo" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDKJOFMGLHHOOFOAEKEFKDLDOJNNFCNGEMJEPCPKHIICJNILC"
},
"tArg" :
{
"resolution" : "Replace"
}
}
}
{
"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: