随笔分类 -  NX二次开发

NX二次开发
摘要:1 public static void setDisplayedConstraintLayer(string asmName ,int layerId) 2 { 3 NXOpen.Part workPart = theSession.Parts.Work; 4 NXOpen.Part displa 阅读全文
posted @ 2022-02-18 10:44 刘朋1102 阅读(275) 评论(0) 推荐(0)
摘要:C# 1 NXOpen.Session.GetSession().ListingWindow.Open(); 2 UFAttr.Iterator iter = new UFAttr.Iterator(); 3 iter.category = ""; 4 iter.check_category = f 阅读全文
posted @ 2022-01-19 15:04 刘朋1102 阅读(389) 评论(0) 推荐(0)
摘要:1 NXOpen.Body body; 2 if (body.HasUserAttribute("attrName", NXObject.AttributeType.String, -1)) 3 { 4 //属性存在 5 } 6 else 7 { 8 //属性不存在 9 } 阅读全文
posted @ 2022-01-11 09:36 刘朋1102 阅读(315) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2021-12-28 15:19 刘朋1102 阅读(51) 评论(0) 推荐(0)
摘要:1 Tag[] features = new Tag[0]; 2 Tag feature1 = Tag.Null; 3 UFSession.GetUFSession().Modl.CreateSetOfFeature("name", features, features.Length, 0, out 阅读全文
posted @ 2021-12-28 14:40 刘朋1102 阅读(465) 评论(0) 推荐(0)
摘要:1.获取封闭曲线的对象 2.延一个方向做条辅助线,判断辅助线与封闭曲线的交点个数,判断完后删除 注意还需判断交点是否在封闭对象的端点,在端点则不计算数量(-2) 3.判断交点的奇偶性 if ((num & 1) != 1) 如偶数在外边,奇数在内部 阅读全文
posted @ 2021-12-28 14:29 刘朋1102 阅读(763) 评论(0) 推荐(0)
摘要:1 NXOpen.Session theSession = NXOpen.Session.GetSession(); 2 NXOpen.Part workPart = theSession.Parts.Work; 3 NXOpen.Part displayPart = theSession.Part 阅读全文
posted @ 2021-12-28 14:13 刘朋1102 阅读(459) 评论(0) 推荐(0)
摘要:1 public static void creatOffsetFaceBuilder(NXOpen.Face[] faces1 ,double dis) 2 { 3 NXOpen.Session theSession = NXOpen.Session.GetSession(); 4 NXOpen. 阅读全文
posted @ 2021-12-28 14:06 刘朋1102 阅读(253) 评论(0) 推荐(0)
摘要:1 NXOpen.Direction direction1; 2 direction1 = workPart.Directions.CreateDirection(face, NXOpen.Sense.Forward, NXOpen.SmartObject.UpdateOption.WithinMo 阅读全文
posted @ 2021-12-28 13:59 刘朋1102 阅读(744) 评论(0) 推荐(0)
摘要:1 public void CreatDisplayTemArc(double[] mtx, double[] cenPoint, double r) 2 { 3 UFSession theUfSession = UFSession.GetUFSession(); 4 UFObj.DispProps 阅读全文
posted @ 2021-11-29 14:01 刘朋1102 阅读(224) 评论(0) 推荐(0)
摘要:1 public void CreatDisplayTemLine(double[] startPoint, double[] endPoint) 2 { 3 UFSession theUfSession = UFSession.GetUFSession(); 4 UFObj.DispProps a 阅读全文
posted @ 2021-11-29 14:00 刘朋1102 阅读(254) 评论(0) 推荐(0)
摘要:1 public void RemoveObjParameters() 2 { 3 NXOpen.Session theSessions = NXOpen.Session.GetSession(); 4 NXOpen.Part workPart = theSessions.Parts.Work; 5 阅读全文
posted @ 2021-11-29 13:58 刘朋1102 阅读(691) 评论(0) 推荐(0)
摘要:1 /// <summary> 2 /// 添加装配 3 /// </summary> 4 /// <returns>返回 </returns> 5 public void asmAddPartToAssembly(string prtfull, double[] org, double[] vec 阅读全文
posted @ 2021-11-29 13:55 刘朋1102 阅读(285) 评论(0) 推荐(0)
摘要:1 /// <summary> 2 /// 实体转化为装配 3 /// </summary> 4 /// <param name="prtfull">全路径</param> 5 /// <param name="bodys">实体</param> 6 /// <param name="SaveBoo 阅读全文
posted @ 2021-11-29 13:52 刘朋1102 阅读(1076) 评论(0) 推荐(0)
摘要:1 NXOpen.DisplayableObject[] objects1 = new NXOpen.DisplayableObject[1]; 2 NXOpen.Assemblies.Component component1 = (NXOpen.Assemblies.Component)NXObj 阅读全文
posted @ 2021-11-29 13:46 刘朋1102 阅读(275) 评论(0) 推荐(0)
摘要:1 //textTag 文本tag 2 NXOpen::Features::Text *text1(dynamic_cast<NXOpen::Features::Text *>(NXOpen::NXObjectManager::Get(textTag))); 3 theSession->Parts( 阅读全文
posted @ 2021-11-05 17:21 刘朋1102 阅读(579) 评论(0) 推荐(0)
摘要:1 std::vector<NXOpen::Features::Feature *> allFeatures; 2 allFeatures = theSession->Parts()->Work()->Features()->GetFeatures(); 3 4 for(int i = 0; i < 阅读全文
posted @ 2021-11-05 17:14 刘朋1102 阅读(1057) 评论(0) 推荐(0)
摘要:1 int number_edits; 2 UF_VIEW_vde_data_t * vde_data; 3 UF_VIEW_ask_vde_data(lineTag, &number_edits ,&vde_data); 4 tag_t view_tag = vde_data->view_tag; 阅读全文
posted @ 2021-10-18 16:04 刘朋1102 阅读(80) 评论(0) 推荐(0)
摘要:NX二次开发 超级截面 阅读全文
posted @ 2021-10-07 14:35 刘朋1102 阅读(148) 评论(0) 推荐(0)
摘要:NX二次开发 超级点 阅读全文
posted @ 2021-10-07 13:25 刘朋1102 阅读(222) 评论(0) 推荐(0)