NX二次开发-NXOPEN C#UF设置颜色theUfSession.Obj.SetColor


 1 NX11+VS2013
 2 
 3 using System; 4 using NXOpen; 5 using NXOpen.UF; 6 7 8 //创建圆柱 9 FeatureSigns sign = FeatureSigns.Nullsign;//定义布尔 10 double[] origin = { 100.0, 0.0, 0.0 };//定义原点 11 string height = "100";//定义高 12 string diam = "50";//定义直径 13 double[] direction = { 0.0, 0.0, 1.0 };//定义向量 14 Tag cyl_obj_id = Tag.Null; 15 theUfSession.Modl.CreateCyl1(sign, origin, height, diam, direction, out cyl_obj_id); 16 17 //特征找体 18 Tag body_obj_id = Tag.Null; 19 theUfSession.Modl.AskFeatBody(cyl_obj_id, out body_obj_id); 20 21 //设置颜色 22 theUfSession.Obj.SetColor(body_obj_id, 186); 23 24 Caesar卢尚宇 25 2020年2月15日


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM