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