yueminlee* 发表于 2014-9-7 12:43:27

UG二次开发建空草图代码运行问题

建空草图的代码如下:为什么运行后没反应呢?

void sanxiao:: CreatIPsketch()
{
    Sketch *nullSketch(NULL);
    SketchInPlaceBuilder *sketchInPlaceBuilder1;
    sketchInPlaceBuilder1 = workPart->Sketches()->CreateNewSketchInPlaceBuilder(nullSketch);
      sketchInPlaceBuilder1->SetPlaneOption(Sketch::PlaneOptionNewPlane);
      sketchInPlaceBuilder1->Plane()->SetMethod(PlaneTypes::MethodTypeFixedZ);

    NXObject *nXObject1;
    nXObject1 = sketchInPlaceBuilder1->Commit();

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

      sketchInPlaceBuilder1->Destroy();

}
页: [1]
查看完整版本: UG二次开发建空草图代码运行问题