美文网首页
V5-工程图标准的建立

V5-工程图标准的建立

作者: 游在路上的鱼 | 来源:发表于2019-09-29 13:22 被阅读0次

在利用TPS视图投影生成工程图时,遇到了这样一个问题,CATIA提示一下错误:

“如果3D视图和工程图使用不同标准,则无法生成视图。请使用与3D视图相同的标准创建视图,然后重新启动该命令”

这是因为再利用CAA创建工程图后,为了保险起见,需要对工程图的标准进行设定。

// Gets the drawing feature using the CATIDftDocumentServices interface

  CATIDrawing *piDrawing = NULL;

  CATIDftDocumentServices *piDftDocServices = NULL;

  CATIContainer_var spDrwcont;

  CATISpecObject_var spSpecObj;

  if (SUCCEEDED(pDoc->QueryInterface(IID_CATIDftDocumentServices, (void **)&piDftDocServices)))

  {

          // pDoc为创建的工程图文档

           piDftDocServices->GetDrawing(IID_CATIDrawing, (void **)&piDrawing);

           piDftDocServices->Release();

        piDftDocServices = NULL;

       spSpecObj=piDrawing;

       if (spSpecObj != NULL_var) spDrwcont = spSpecObj->GetFeatContainer();

  }

  if (spDrwcont != NULL_var)

  {

          CATIDftStandardManager *piStdmgr = NULL;

           HRESULT rc = spDrwcont->QueryInterface(IID_CATIDftStandardManager,(void**)&piStdmgr);

           if (SUCCEEDED(rc))

           {

                   //  Find a standard in the list of allowed standards (ie. the list of .CATDrwSTD files in the reffiles directory)

                   CATIStringList *piListstd = NULL;

                   if ( SUCCEEDED(piStdmgr->GetAvailableStandards(&piListstd)) && piListstd )

                   {

                           unsigned int  nbrstd = 0;

                           piListstd->Count(&nbrstd);

                           for (unsigned int indice = 0; indice < nbrstd; indice ++)

                           {

                                   wchar_t  *wstd = NULL;

                                   if ( SUCCEEDED ( piListstd->Item ( indice, &wstd ) )  && wstd )

                                   {

                                           CATUnicodeString stdname;

                                           const CATUnicodeString ANSI_UncS = "ANSI";

                                            stdname.BuildFromWChar(wstd);

                                            if ( stdname == ANSI_UncS ) 

                                           {

                                                   // Import the ANSI standard in the document

                                                   piStdmgr->ImportStandard (wstd);

                                                   break;

                                           }

                                   }

                                   if (wstd) {delete[] wstd; wstd = NULL;}

                       }

                       piListstd->Release(); piListstd=NULL;           

                   }

                   piStdmgr->Release (); piStdmgr=NULL;

               }

  }

相关文章

  • V5-工程图标准的建立

    在利用TPS视图投影生成工程图时,遇到了这样一个问题,CATIA提示一下错误: “如果3D视图和工程图使用不同标准...

  • 2017-12-26

    今天是机械培训第六天,上午老师讲解了出工程图,尺寸标注,标题栏,明细表等内容。建立工程图可以打开一个模型,拉入所...

  • 2017-12-27

    今天学习了工程图,制作工程图,尺寸标注,标题栏与明细表。

  • 建立写作标准

    训练营已近尾声,今天的作业,是一份诚意十足的作业,也是我在粥老师课堂感受到震撼最强烈的一节课。因为我终于知道,自己...

  • 市政管道工程识图

    一,管道工程图一般规定 a标高 标准规定,室外工程应标注绝对标高;无绝对标高时也可标注相对标高...

  • 数据治理专题5

    对于数据治理的第一步,需要建立数据标准,标准建立了,治理才有章可循,本期聊聊,什么是数据标准。 什么是数据标准? ...

  • 《可复制的领导力》樊登:领导力的四重修炼

    【1】领导力标准化,四重修炼 建立信任, 建立团队, 建立体系(标准,技术), 建立文化(价值观,信念,氛围,土壤...

  • 2018-03-30

    今天量了支撑板的尺寸,出了工程图。

  • 建立标准,没有困扰

    肥胖的群体总是在抱怨减肥是如此困难,身体孱弱的人无比痛恨疾病造成的困扰,以至于荒废许多美好的时光。 一旦形成了某一...

  • day 1 建立标准

    第一天使用零售魔方的商户,一直

网友评论

      本文标题:V5-工程图标准的建立

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