PrxObjectCreateResult PrxObjectCreate(string mon, string objectType)
mon. Regular report sheet moniker.
objectType. Type of created object.
The PrxObjectCreate operation creates a new object on a regular report sheet.
To execute the operation, in the mon field specify the moniker in the following format: 'Regular report instance moniker!Sheets!Sheet key', and in the objectType field specify the type of created object. Available values of the objectType field:
PrxPicture - image.
PrxChart - chart.
PrxScene3D - 3D scene.
PrxSpeedometer - speedometer.
PrxMap - map.
PrxMapTerritoryInfo - map territory info.
PrxMapLegend - map legend.
PrxShape - autoshape.
PrxFlowDocument - formatted text.
PrxVisualizer - visualizer legend.
Moniker of regular report instance can be obtained on executing the OpenPrxMeta operation.
The operation results in the identifier of created object.
Below is the example of creating a chart on a regular report sheet. The request contains sheet moniker and created object type that is a chart. The response contains identifier of the created chart.
{
"PrxObjectCreate" :
{
"mon" : "S1!M!S!P1!Sheets!1",
"objectType" : "PrxChart"
}
}
{
"PrxObjectCreateResult" :
{
"id" : "PrxChart3"
}
}
public static PrxObjectCreateResult CreatePrxChart(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tCreate = new PrxObjectCreate()
{
objectType = "PrxChart",
mon = moniker + "!Sheets!1"
};
//Create a chart
var result = somClient.PrxObjectCreate(tCreate);
return result;
}
See also: