It's hard to see what kind of object is causing the shorts. Perhaps plane shapes? If you could identify what kind of problem the result is causing that would help.
The shorts caused between plane shapes and traces/vias.
When I changed the code to the following, the problem didn't happened.
I don't understand how this solve the problem?
The object setting in the code shouldn't correspond to the dialog window settings?
public static LogResult ImportIDF(MGCPCB.Document pcbDoc, string emnIDFPath)
IMGCPCBIDFImport IDFImport = pcbDoc.IDFImport;
IDFImport.BoardFile = Path.ChangeExtension(emnIDFPath, ".emn");
IDFImport.NoToolAssignmentToContours = true;
return LogHandler.CheckLog(pcbDoc, LogName.IDFImport, IDFImport.Errors);
1 of 1 people found this helpful
I'm not sure either.
If you want to find out, change one item at a time back to the way it was when the error occurred, and run it each time to see when the error comes back.
Most times some trial and error is needed when figuring out how to work with the scripting objects and functions. That's normal.