美文网首页
V5-新建三维标注集

V5-新建三维标注集

作者: 游在路上的鱼 | 来源:发表于2020-02-16 22:11 被阅读0次

// ------------------------------------------------

/**

* @brief 新建标注集

* @param[in] ipiProduct 装配节点

* @param[out] opiTPSSet 标注集

* @retval TRUE:成功;FALSE:失败

* @note [详细说明]

* @attention [注意事项说明]

*/

// ------------------------------------------------

HRESULT SJDAlwaysCreateGDTCmd::GetAnnotationTool(

CATIProduct*& ipiProduct, // 装配节点

CATITPSSet*& opiTPSSet // 标注集

)

{

HRESULT rc = S_OK;

CATITPSServicesContainers *piTPSServ = NULL;

::CATTPSInstantiateComponent(DfTPS_ItfTPSServicesContainer,(void**)&piTPSServ);

if (piTPSServ == NULL)

{

return E_FAIL;

}

piTPSServ->RetrieveOrCreateCurrentTPSSet(ipiProduct,CreateIfMissing,&opiTPSSet);

if (opiTPSSet == NULL)

{

piTPSServ->Release();

return E_FAIL;

}

piTPSServ->Release();

return S_OK;

}

注:在上述函数中主要使用了CATTPSInterfaces Global Function CATTPSInstantiateComponent

Creates a TPS component from its identificator defined as a value of enum CATTPSComponent.

相关文章

网友评论

      本文标题:V5-新建三维标注集

      本文链接:https://www.haomeiwen.com/subject/kxfvfhtx.html