bool SetSemanticLayerMeta(string mon, SemanticLayerMetaArg tArg)
mon. Opened data model instance moniker.
tArg. Operation execution parameters.
The SetSemanticLayerMeta operation changes data model metadata.
To execute the operation, in the mon field specify moniker of opened data model instance and in the tArg.meta field specify updated metadata. In the current implementation the operation is used to change data model visualization settings. The moniker can be obtained on executing the OpenSemanticLayer operation.
The operation results in the logical true if the metadata was changed successfully.
Below is the example of changing data model visualization settings. The request contains moniker of opened data model instance and visualization settings to be determined. The response contains whether changes were applied successfully.
{
"SetSemanticLayerMeta" :
{
"mon" : "OBNIHFAHPABDGOAEGDPOIOEEEEFKFMOEBLJPNILDEGIADEAK!M!S!POFIOKJAHPABDGOAEHEMNLOGBNPHIANDECKECPPGGIBIEIJCA",
"tArg" :
{
"meta" :
{
"viewSettings" : "{"version":"2","isHiddenFieldsVisible":true,"previewTableHeight":0.48329355608591884,"targetPreviewTableHeight":1,"previewTableAutoUpdate":true,"sourcesDropdowns":{"1":{"expanded":false},"2":{"expanded":false}},"visibleArea":{"x":0,"y":0,"height":838,"width":990,"offsetX":320,"offsetY":48},"zoom":1}"
}
}
}
}
{
"SetSemanticLayerMetaResult" : "1"
}
public static bool SetSemanticLayerMeta(string moniker, string newViewSettings)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tSet = new SetSemanticLayerMeta()
{
tArg = new SemanticLayerMetaArg()
{
meta = new SemanticLayer()
{
viewSettings = newViewSettings
}
},
// Moniker of opened data model instance
mon = moniker
};
// Change information about data model
var result = somClient.SetSemanticLayerMeta(tSet);
return result;
}
See also: