GetAssemblyResult GetAssembly(OdId tObject)
tObject. Moniker of repository object that is Fore assembly.
The GetAssembly operation gets information about repository assembly.
To execute the operation, in the tObject parameter specify moniker of repository object that is assembly. The object moniker can be obtained on executing the GetObjects operation. The operation results in the list of assemblies (system and application ones), to which links are added, and also a list of objects implemented in the assembly.
Below is the example of using the GetAssembly operation to get information about assembly. The request contains moniker of assembly in the repository. The response contains information about units implemented in the specified assembly, and links to other assemblies. The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.
{
"GetAssembly" :
{
"tObject" :
{
"id" : "S1!M!172000"
}
}
}
{
"GetAssemblyResult" :
{
"meta" :
{
"references" :
{
"builtinReferences" :
{
"s" : "Metabase"
},
"repoReferences" :
{
"it" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "18",
"@hf" : "0",
"i" : "M_ADDITIONAL",
"n" : "Additional",
"k" : "172002",
"c" : "1537",
"p" : "171999",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
},
"modules" :
{
"it" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "14",
"@hf" : "0",
"i" : "M_MAIN",
"n" : "Unit",
"k" : "172001",
"c" : "1537",
"p" : "172000",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
},
"desc" :
{
"@ds" : "",
"@isShortcut" : "0",
"@isLink" : "0",
"@ver" : "11",
"@hf" : "0",
"i" : "A_CORE",
"n" : "Assembly",
"k" : "172000",
"c" : "1539",
"p" : "171999",
"h" : "0",
"hasPrv" : "0",
"ic" : "0",
"trackElementDependents" : "0"
}
}
}
}
public static GetAssemblyResult GetAssemblyInfo(MbId mb, string assmId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tGet = new GetAssembly()
{
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, assmId).k }
};
//Get assembly information
var result = somClient.GetAssembly(tGet);
return result;
}
See also: