ExportForeObj

Syntax

ExportForeObjResult ExportForeObj(OdId tObject)

Parameters

tObject. Unit or assembly moniker.

Description

The ExportForeObj operation exports development environment object to external file.

Comments

To execute the operation, in the tObject parameter specify moniker of the repository object that is unit or assembly. The object moniker can be obtained on executing the GetObjects operation. On executing the operation, the development environment object is exported and saved on the server. The operation results in the name of the obtained file and its moniker. The obtained moniker can be further used to import object from file to repository using the ImportForeObj operation.

Example

Below is the example of using the ExportForeObj operation to export repository assembly to external file. The request contains assembly moniker. The response contains name and moniker of the obtained file. The C# example uses the FindObjectById function, which code is given in the Getting Object Description by Its Identifier example.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ExportForeObj xmlns="http://www.fsight.ru/PP.SOM.Som">
<tObject xmlns="">
  <id>S1!M!172002</id>
  </tObject>
  </ExportForeObj>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ExportForeObjResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <fileName xmlns="">Additional.ppmodule</fileName>
<exportedForeObj xmlns="">
  <id>S1!M!Bin!0</id>
  </exportedForeObj>
  </ExportForeObjResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"ExportForeObj" :
{
"tObject" :
{
"id" : "S1!M!172002"
}
}
}

JSON response:

{
"ExportForeObjResult" :
{
"fileName" : "Additional.ppmodule",
"exportedForeObj" :
{
"id" : "S1!M!Bin!0"
}
}
}
public static ExportForeObjResult ExportInFile(MbId mb, string objId)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tExp = new ExportForeObj()
{
//Create object moniker
tObject = new OdId() { id = mb.id + "!" + FindObjectById(mb, objId).k }
};
//Object export
var result = somClient.ExportForeObj(tExp);
return result;
}

See also:

Working with Development Environment