Skip to content
pCon.configurator onlineDocumentation
Esc
↑↓navigate↵open⌘Jpreview
On this page

pasteContainer

Synopsis

PasteContainerResult pasteContainer(SessionId sessionId,
    BItemId fatherId,
    BItemId beforeId,
    string uri,
    PasteContainerOptions *options)
throws BasketServiceFault;

struct PasteContainerResult {
    BasketItem[] items;
    string[] originalItemIds;
    string[] itemGeometries;
    string sceneGeometry;
}

See also: PasteContainerResult, SessionId, BItemId, PasteOptions, PasteContainerOptions, BasketServiceFault, BasketItem

Arguments of this operation are similar to the arguments of the paste operation, except that the URI must reference a PEC file instead of an OBX file.1

The operation imports at least all required resources from the PEC file into the currently loaded project2 and pastes the contents of the OBX stream contained in the PEC file at the position specified by father-ID and before-ID. The operation may fail if the PEC file is defective for some reason. It always fails if the PEC file does not contain an OBX stream.

Return value is an instance of complex type PasteContainerResult. Elements of this type contain the following elements:

  • zero or more <items/> elements of complex type BasketItem

  • zero or more <itemGeometries/> elements of type xs:string. Unless option ignoreComposableGeometries has been set to true, the number of <itemGeometries/> elements is always equal to the number of <items/> elements, and the n-th element of both types correspond to each other.

The value of an <itemGeometries/> element is either an URI or an empty string. URIs are returned for user article items with an attached geometry and for basket main article items with a geometry checksum that has a valid mapping to a resource stored in the PEC file. For all other items the value is an empty string.

No <itemGeometries/> elements are returned if option ignoreComposableGeometries is true.

  • Exactly one <sceneGeometry/> element of type xs:string. The value is an URI if the PEC file contains a scene geometry and option ignoreComposableGeometries is not true. Otherwise the value is an empty string.

  • If option returnOriginalItemIds is set, PasteContainerResult will contain a list of <originalItemIds/> elements of type xs:string. The number of these elements is equal to the number of <items/> elements, and the Nth elements of both lists correspond to each other.

Returned URIs have scheme imp. Operation resolveURIs of the session service may be used to convert them into URLs.

Note that saving the project will save only those resources that are directly or indirectly referenced by basket items at the time the project is saved. Thus, GFJs, geometries and textures imported from PEC files and exclusively used by basket main article items will not be saved.

URIs returned by operation pasteContainer are guaranteed to remain valid until a new project is loaded by operation loadSession, unless they have been resolved by operation resolveURIs, in which case they will remain valid until the session is closed.

Footnotes

  1. Use of returnOptionalItemIds=true is broken in EAIWS 4.2 Beta 4. ↩

  2. The current implementation blindly imports all resources, unless option ignoreComposableGeometries is set to true, in which case no resources are imported. ↩