ConvertTopobaseResult ConvertTopobase(TopobaseId tTopobase)
tTopobase. Topobase moniker.
The ConvertTopobase operation converts a topobase.
The operation is executed for topobases that were loaded to repository. After executing the operation the existing topobase formats are updated and new ones are created according to the list of formats supported in the current platform version. To execute the operation, in the tTopobase field specify topobase moniker in repository. The moniker is created based on the repository connection moniker and the topobase key. As a result of conversion, the system creates topobase versions with different formats. These versions will be saved to the repository database and used whenever required.
The operation results in the information about successful or failed completion of conversion.
Below is the example of repository topobase conversion. The request contains a topobase moniker. The response contains whether the operation is completed successfully.
The example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"ConvertTopobase" :
{
"tTopobase" :
{
"id" : "S1!M!296652"
}
}
}
{
"ConvertTopobaseResult" :
{
"result" : "1"
}
}
public static ConvertTopobaseResult ConvertTopobase(MbId mb, string topobaseId)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tArg = new ConvertTopobase()
{
tTopobase = new TopobaseId()
{
id = mb.id + '!' + FindObjectById(mb, topobaseId).k
}
};
// Convert topobase
var tResult = somClient.ConvertTopobase(tArg);
return tResult;
}
See also: