iCAx开思工具箱

标题: 新插入的Part在结构树不显示 [打印本页]

作者: Joyce_小希    时间: 2014-5-19 16:39
标题: 新插入的Part在结构树不显示
我NewFrom一个新的Part,把它AddProduct到Product中,空间中已显示模型,结构树上不显示,右键点击打开子树,能显示我插入的part。
CATIModelEvents *piModelEventNewFeat = NULL;
rc = spObjectProduct->QueryInterface (IID_CATIModelEvents, (void**)&piModelEventNewFeat);
if (SUCCEEDED(rc))
{
        CATBaseUnknown * iObject=NULL;
        CATBaseUnknown * iParent=NULL;
        spObjectProduct->QueryInterface (IID_CATBaseUnknown, (void**)&iObject);
        spRootPro->QueryInterface (IID_CATBaseUnknown, (void**)&iParent);
        CATCreate notif (iObject, iParent);
        piModelEventNewFeat->Dispatch(notif);
        iObject->Release();
        iObject=NULL;
        iParent->Release();
        iParent=NULL;
        piModelEventNewFeat->Release();
        piModelEventNewFeat=NULL;
}


作者: Joyce_小希    时间: 2014-5-19 19:10
好吧,原来只需要Redraw一下就可以了





欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3