// get the CATFormat which says that paste should be as result
CATFormat* asResult = NULL;
CATLISTP(CATFormat) formats = spEndCAPOnPrtCont->ListExtractFormats();
for(int o=1; o<=formats.Size(); o++)
{
if(0 == strcmp(“CATPrtResult”, formats[o]->Name())) // there is also “CATPrtResult” and lots of other formats – you can copy containers etc.
asResult = formats[o];
}
// We instantiate the feature in the destination container.
// It consists in creating the feature, aggregating it at the appropriate position
// according to the specified target and updating it in its new context
CATLISTV(CATBaseUnknown_var) spFinalObject = spEndCAPOnPrtCont->Paste(listObjects,
&listTargets,
asResult);
CATISpecObject_var spSpecOnPart(spPart);
if(NULL_var != spSpecOnPart)
spSpecOnPart->Update();