void movePar(vector<tag_t> objTag)
{
Session* theSession = Session::GetSession();
Part* workPart(theSession->Parts()->Work());
Part* displayPart(theSession->Parts()->Display());
Features::RemoveParametersBuilder* removeParametersBuilder1;
removeParametersBuilder1 = workPart->Features()->CreateRemoveParametersBuilder();
vector<NXObject*>objects;
for (int i = 0; i < objTag.size(); i++)
{
objects.push_back(dynamic_cast<NXObject*>(NXObjectManager::Get(objTag[i])));
}
removeParametersBuilder1->Objects()->Add(objects);
NXObject* nXObject1;
nXObject1 = removeParametersBuilder1->Commit();
removeParametersBuilder1->Destroy();
}
void clean(vector<tag_t>& body_tag)
{
uf_list_p_t delete_body_list;
UF_MODL_create_list(&delete_body_list);
for (size_t i = 0; i < body_tag.size(); i++)
{
UF_MODL_put_list_item(delete_body_list, body_tag[i]);
}
UF_MODL_delete_object_parms(delete_body_list);
UF_MODL_delete_list(&delete_body_list);
return;
Session* theSession = Session::GetSession();
Part* workPart(theSession->Parts()->Work());
Part* displayPart(theSession->Parts()->Display());
// ----------------------------------------------
// Menu: Edit->Feature->Remove Parameters...
// ----------------------------------------------
Session::UndoMarkId markId1;
markId1 = theSession->SetUndoMark(Session::MarkVisibilityVisible, "Start");
Features::RemoveParametersBuilder* removeParametersBuilder1;
removeParametersBuilder1 = workPart->Features()->CreateRemoveParametersBuilder();
theSession->SetUndoMarkName(markId1, NXString("Remove Parameters \345\257\271\350\257\235\346\241\206", NXString::UTF8));
vector<NXObject*> vecObj;
for (int i = 0; i < body_tag.size(); i++)
{
vecObj.push_back(dynamic_cast<NXObject*>(NXObjectManager::Get(body_tag[i])));
}
bool added1;
added1 = removeParametersBuilder1->Objects()->Add(vecObj);
Session::UndoMarkId markId2;
markId2 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Remove Parameters");
theSession->DeleteUndoMark(markId2, NULL);
Session::UndoMarkId markId3;
markId3 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Remove Parameters");
NXObject* nXObject1;
nXObject1 = removeParametersBuilder1->Commit();
theSession->DeleteUndoMark(markId3, NULL);
theSession->SetUndoMarkName(markId1, "Remove Parameters");
removeParametersBuilder1->Destroy();
}