点击查看详细介绍

PutListItem函数的问题

my_dear2002 18年前 10685 0

购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008  QQ号:85585969  


下面的代码是begtostudy博客上的这儿转载一下,我的代码跟这个一样,但是我的list为什么总是空的呢,我单步调试发现也调用了PutListItem这个函数啊,但是没有加到链表里面这是怎么回事呢?请大侠指点一下吧。跪谢了


Tag[] list=null;


Tag thePart = theUFSession.Part.AskDisplayPart();

theUFSession.Modl.CreateList(out list);

Tag Next_tag=Tag.Null;

do

{


theUFSession.Obj.CycleObjsInPart(thePart,70/* UF_solid_type*/,ref Next_tag);

if (Next_tag == Tag.Null) break;

int t, subType;

theUFSession.Obj.AskTypeAndSubtype(Next_tag,out t, out subType);

if (subType == 0/*UF_solid_body_subtype*/)

theUFSession.Modl.PutListItem(list, Next_tag);

} while (true);

bool isOpen;

theUFSession.Ui.IsListingWindowOpen(out isOpen);

if (!isOpen) theUFSession.Ui.OpenListingWindow();

int sum;

theUFSession.Modl.AskListCount(list,out sum);

0

最新回复 (0)
请登录后发表新帖