谢谢版主回复,问题是这个程序在VB中可以定义为空到C#中就不行了
代码如下:恳请高手解决,非常感谢!!!
theSession = Session.GetSession();
theUfSession = UFSession.GetUFSession();
double[] origin = { 0.0, 0.0, 0.0 };
double[] csys = { 1.0, 0.0, 0.0, 0.0, 1.0, 0.0 };
Tag[] blocks = new Tag[1];
blocks[0] = NXOpen.Tag.Null;
Tag work_part;
Tag instance;
int units;
work_part = theUfSession.Assem.AskWorkPart();
theUfSession.Part.AskUnits(work_part, out units);
MessageBox.Show(work_part.ToString());
theUfSession.Assem.CreateComponentPart(work_part, "blocks11.prt", null, null, units, 0, origin, csys, 2, blocks, out instance); |