上一篇介绍了Tag,TaggedObject,Handle在装配前后的差别,这一篇来介绍一下这三个对象在制图模式和建模模式的应用:UG/NX 二开开发 Tag,TaggedObject,Handle在不同场景下的分析(一)
在制图模式下,目前我还没有发现直接获取组件和部件的方法,后续会持续更新,目前是用了唐康林老师的通过手动命名,然后根据name通过ufun来获取tag,theUFSession.Obj.CycleByName。
直接看源码:
public static void Main(string[] args)
{
try
{
theSession = Session.GetSession();
displayPart = theSession.Parts.Display;
theUFSession = UFSession.GetUFSession();
workPart = theSession.Parts.Work;
theUI = UI.GetUI();
List<Component> compList = new List<Component>();
List<Body> bodyList = new List<Body>();
Dictionary<string, Component> dicComp = new Dictionary<string, Component>();
Dictionary<string, Body> dicBo

最低0.47元/天 解锁文章
1060

被折叠的 条评论
为什么被折叠?



