调用components。看别人代码调用没出问题,我调用给出问题,而且感觉别人也是错的,但是为什么。
代码:
这是MGCPCB类库
public interface IMGCPCBDocument
{
Components get_Components(EPcbSelectionType eSelectOnly = EPcbSelectionType.epcbSelectAll, EPcbComponentType eCompType = EPcbComponentType.epcbCompAll, EPcbCelltype eCelltype = EPcbCelltype.epcbCelltypePackage, string sRefDes = "*");
}
这是我的代码
doc = app.ActiveDocument;
textBox1.Text =doc.Name;// '输出导人文件名
textBox2.Text = doc.Components.Count.ToString();
执行后报错
类库中只有get_Components都不存在Components,但我看别人VB和C#代码都是调佣成功了,为什么我的有问题