bool SetTabObjectSettings(TabSheetId tTabSheet, TabObjectSettingsArg tArg)
tTabSheet. Sheet moniker.
tArg. Operation execution parameters.
The SetTabObjectSettings operation changes table object settings.
To execute the operation, in the tTabSheet field specify moniker of the sheet, which contains objects, and in the tArg field specify object settings to be determined. The moniker can be based on the moniker of opened object instance, with which the work is executed.
The operation results in the logical True if object settings were changed successfully.
Below is the example of changing settings of the chart located on a regular report sheet. The request contains moniker of the report sheet and chart settings to be determined. The response contains whether settings were changed successfully.
{
"SetTabObjectSettings" :
{
"tTabSheet" :
{
"id" : "GELCPBJDAHMNFOAEOGANNOOIMCBDPMLEFKAFDIFHOKGGDEFD!M!S!PLBMFNEJDAHMNFOAEKCMNMAJAJPHAFBGEILMEHGGEFPOMHMFJ!Sheets!1"
},
"tArg" :
{
"its" :
{
"it" :
[
{
"tot" : "Chart",
"tomm" : "5",
"toam" : "2",
"prn" : "false",
"id" : "PrxChart1"
}
]
}
}
}
}
{
"SetTabObjectSettingsResult" : "1"
}
public static bool SetTabObjectSettings(string reportMoniker, string sheetKey, string objectId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetTabObjectSettings()
{
tArg = new TabObjectSettingsArg()
{
its = new TabObjectSettingsItem[]
{
new TabObjectSettingsItem()
{
id = objectId,
prn = false,
tomm = 5, // Move object with cells
toam = 2, // Activate on object double-click
tot = "Chart"
}
}
},
tTabSheet = new TabSheetId() { id = reportMoniker + "!Sheets!" + sheetKey}
};
// Change table object settings
var result = somClient.SetTabObjectSettings(tSet);
return result;
}
See also: