I had the same issue, you also need to add the component argument:
set obst = pcbDoc.PutObstruct(putlayer,0, npoints, AoP,obtype,,Nothing )
Thank you very much. That was the problem. Now it works well
1 of 1 people found this helpful
You also need to change
Set pcbapp = GetObject(, "MGCPCB.ExpeditionPCBApplication")
Set pcbapp = Application
Otherwise if you have 2 jobs up, your script will run out of process and invoke on the first Xpedition you opened on your machine and drive you crazy.
Thx. for that hint. Will do so.
Have a nice day
I code in Excel to do all my debugging and then drop my code in an .efm form for delivery. I run into the out of process stuff all the time. I had two designs open yesterday and I ran a form I created a couple of months ago in the 2nd design. I saw the transcript in my first design cranking away. Yep forgot to change how I connected to the application! The added benefit is in-process scripts naturally run faster as well.