首页 > 学院 > 开发设计 > 正文

C# NX创建方

2019-11-08 02:27:14
字体:
来源:转载
供稿:网友
public static int Main(string[] args)    {        int retValue = 0;        try        {            thePRogram = new Program();            //TODO: Add your application code here             NXOpen.Part workPart = thesession.Parts.Work;            NXOpen.Features.BlockFeatureBuilder blockFeatureBuilder1 = workPart.Features.CreateBlockFeatureBuilder(null);            Point3d originPoint1 = new Point3d(0.0, 0.0, 0.0);            blockFeatureBuilder1.SetOriginAndLengths(originPoint1, "10", "10", "10");            NXOpen.Features.Feature feature1 = blockFeatureBuilder1.CommitFeature();//特征委托给NX            blockFeatureBuilder1.Destroy();//释放委托            theProgram.Dispose();        }        catch (NXOpen.NXException ex)        {            // ---- Enter your exception handling code here -----        }        return retValue;    }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表