UF 和 NXOPEN 去参(多个)

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();
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值