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

C# NX 通过两点创建直线及更改线的颜色

2019-11-09 21:08:33
字体:
来源:转载
供稿:网友
 public static int Main(string[] args)    {        int retValue = 0;        try        {            thePRogram = new Program();            //TODO: Add your application code here             NXOpen.Part wokePart = thesession.Parts.Work;            NXOpen.Point3d starPoint3D = new Point3d(0, 0, 0);            NXOpen.Point3d endPoint3D = new Point3d(150, 120, 344);            NXOpen.Line line = wokePart.Curves.CreateLine(starPoint3D, endPoint3D);            line.Color = 186;//更改线颜色            theProgram.Dispose();        }        catch (NXOpen.NXException ex)        {            // ---- Enter your exception handling code here -----        }        return retValue;    }
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表