UG爱好者

标题: UG二次开发建空草图代码运行问题 [打印本页]

作者: yueminlee*    时间: 2014-9-7 12:43
标题: UG二次开发建空草图代码运行问题
建空草图的代码如下:为什么运行后没反应呢?

  1. void sanxiao:: CreatIPsketch()
  2. {
  3.     Sketch *nullSketch(NULL);
  4.     SketchInPlaceBuilder *sketchInPlaceBuilder1;
  5.     sketchInPlaceBuilder1 = workPart->Sketches()->CreateNewSketchInPlaceBuilder(nullSketch);
  6.         sketchInPlaceBuilder1->SetPlaneOption(Sketch::PlaneOptionNewPlane);
  7.         sketchInPlaceBuilder1->Plane()->SetMethod(PlaneTypes::MethodTypeFixedZ);

  8.     NXObject *nXObject1;
  9.     nXObject1 = sketchInPlaceBuilder1->Commit();

  10.         Sketch *sketch1(dynamic_cast<Sketch *>(nXObject1));
  11.     Features::Feature *feature1;
  12.     feature1 = sketch1->Feature();

  13.         sketchInPlaceBuilder1->Destroy();

  14. }
复制代码






欢迎光临 UG爱好者 (https://www.ugsnx.com/) Powered by Discuz! X3.2