|
建空草图的代码如下:为什么运行后没反应呢?
- 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();
- }
复制代码
|
|