boost::shared_ptr<PartSetPlugin_Part> aSource; // searching for source document attribute
for(int a = aRoot->size(getGroup()) - 1; a >= 0; a--) {
aSource = boost::dynamic_pointer_cast<PartSetPlugin_Part>(
- aRoot->feature(getGroup(), a, true));
+ aRoot->object(ModelAPI_Feature::group(), a));
if (aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value() == aPManager->currentDocument())
break;
aSource.reset();
}
if (aSource) {
boost::shared_ptr<ModelAPI_Document> aCopy =
- aPManager->copy(aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value(), data()->getName());
- aRef->setFeature(aSource);
+ aPManager->copy(aSource->data()->docRef(PartSetPlugin_Part::DOC_REF())->value(), data()->name());
+ aRef->setObject(aSource);
}
}
}