标题: 请教putlistitem函数,谢谢了 [打印本页] 作者: my_dear2002 时间: 2009-3-30 17:41 标题: 请教putlistitem函数,谢谢了 theSession = Session.GetSession();
theUFSession = UFSession.GetUFSession();
PartLoadStatus pls;
Part pt = theSession.Parts.Open("c:\\xx.prt", out pls);
Tag pt_tag = theUFSession.Part.AskDisplayPart();
Tag next_tag = Tag.Null;
Tag[] list = null;
theUFSession.Modl.CreateList(out list);
do
{
theUFSession.Obj.CycleObjsInPart(pt.Tag, UFConstants.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);
为什么单步调试都进了putlistitem函数里面了list数组还是零唯呢??实在是没办法了,各位大侠帮忙阿。