OpenStyleSheet

Syntax

OpenStyleSheetResult OpenStyleSheet(OdId tObject, OpenStyleSheetArg tArg)

Parameters

tObject. Moniker of repository object that is a styles table.

tArg. Operation execution parameters.

Description

The OpenStyleSheet operation opens styles table.

Comments

To execute the operation, in the tObject field specify moniker of object that is a styles table, and in the tArg field specify opening parameters. The object moniker can be obtained on executing the GetObjects operation. If the tArg.metaGet field is determined in parameters, style parameters are also loaded on opening styles table.

The operation results in the moniker of opened instance of styles table and style parameters if the tArg.metaGet field was defined.

The further work with styles is executed using the GetStyleSheet, CopyStyleSheet operations. To save changes, use the SaveObject, SaveObjectAs operations.

Example

Below is the example of opening styles table. The request contains moniker of repository object that is a styles table. The response contains moniker of opened styles table instance.

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">
<OpenStyleSheet xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!52741</id>
  </tObject>
<tArg xmlns="">
  <metaGet />
  </tArg>
  </OpenStyleSheet>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<OpenStyleSheetResult 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">
<id xmlns="">
  <id>CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE</id>
  </id>
<meta xmlns="">
<name>Styles table</name>
  <type>0</type>
<items>
<it>
  <key>1</key>
  <tag>TAB</tag>
  <preview>iVBORw0KGgoAAAANSUhEUgAAAHgAAAAVCAYAAACNDipWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVGhD7ZXdcQMhDISvH1eQBtxFXITf8+oe3EfKSE8XwFrNInR/43NyIcrMNxmDkBYtcEP6G4OuGcb7V9AjYXDnhMGds8rg67sGPngbxpsTFxwP8cyfzFySmXn+SmNnMZrHgmMya/Dt4xFw+fTng+Mza7B3exkcgIb0pGPufH/E4pk/pfGyPh2aE68B8vzb9VvBK8Og9pRuzDefpEwa4/xToGfeGptX95b+83hmr0sl+fzJ0qQ131sRqOYlKoPIzMZgagLX28NgrWX0Nbl53upydE4BA8uFkJyogZowrro8Rt+e5LwJf3Ivg/lUa8wrDZbcroHp96sMrpCcVr+9xb9q8NITrTgCtYmyIfzfarBlleG2uUbfrMHp9zNPdMY7nLof2d8hbjBELX4PHIGVQbk5NmalwdyktQeu0W1qN7mtNvldtD15g5HTaj+EwRmvqcUIHnMEssGl0TZGGsdr9jK4xEmeMmZqLx2Aan8bDGb9yIl10M690BqmfsGpa/fv9cgidfxJ0DxZ3LyMI1ANhkCKacyXNZ7BlrnNZNCERXgPjjbdywaDNRZwDTOHT5Z7+Dn+Jwz+S+QmVI0C0kQ+UP+BMLhzujM4qAmDOycM7pwwuHPU4KBXhvEbt9SBEBJ0pVAAAAAASUVORK5CYII=</preview>
<name>Style for headers</name>
  <id>I1</id>
  </it>
  </items>
  </meta>
  </OpenStyleSheetResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"OpenStyleSheet" :
{
"tObject" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!52741"
},
"tArg" :
{
"metaGet" : ""
}
}
}

JSON response:

{
"OpenStyleSheetResult" :
{
"id" :
{
"id" : "CPDKLBGLHHOOFOAEEOBMIPONHEFJBEBEOLJEMAEIDCPLAAGC!M!S!SDJNKBJGLHHOOFOAENACKGIKGBKMHOKOEOJBIKCBEOKJJAPGE"
},
"meta" :
{
"name" : "Styles table",
"type" : "0",
"items" :
{
"it" :
{
"key" : "1",
"tag" : "TAB",
"preview" : "iVBORw0KGgoAAAANSUhEUgAAAHgAAAAVCAYAAACNDipWAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHaSURBVGhD7ZXdcQMhDISvH1eQBtxFXITf8+oe3EfKSE8XwFrNInR\/43NyIcrMNxmDkBYtcEP6G4OuGcb7V9AjYXDnhMGds8rg67sGPngbxpsTFxwP8cyfzFySmXn+SmNnMZrHgmMya\/Dt4xFw+fTng+Mza7B3exkcgIb0pGPufH\/E4pk\/pfGyPh2aE68B8vzb9VvBK8Og9pRuzDefpEwa4\/xToGfeGptX95b+83hmr0sl+fzJ0qQ131sRqOYlKoPIzMZgagLX28NgrWX0Nbl53upydE4BA8uFkJyogZowrro8Rt+e5LwJf3Ivg\/lUa8wrDZbcroHp96sMrpCcVr+9xb9q8NITrTgCtYmyIfzfarBlleG2uUbfrMHp9zNPdMY7nLof2d8hbjBELX4PHIGVQbk5NmalwdyktQeu0W1qN7mtNvldtD15g5HTaj+EwRmvqcUIHnMEssGl0TZGGsdr9jK4xEmeMmZqLx2Aan8bDGb9yIl10M690BqmfsGpa\/fv9cgidfxJ0DxZ3LyMI1ANhkCKacyXNZ7BlrnNZNCERXgPjjbdywaDNRZwDTOHT5Z7+Dn+Jwz+S+QmVI0C0kQ+UP+BMLhzujM4qAmDOycM7pwwuHPU4KBXhvEbt9SBEBJ0pVAAAAAASUVORK5CYII=",
"name" : "Style for headers",
"id" : "I1"
}
}
}
}
}
public static OpenStyleSheetResult OpenStyleSheet(MbId mb, string id)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tOpen = new OpenStyleSheet()
{
tArg = new OpenStyleSheetArg() { metaGet = new StyleSheetMdPattern()},
tObject = new OdId { id = mb.id + "!" + FindObjectById(mb, id).k }
};
// Open styles table
var result = somClient.OpenStyleSheet(tOpen);
return result;
}

See also:

Working with Styles Table