When running a script in Xpedition it doesn't always identify the correct open design.
I can invoke it from the menu in one design and it will try to run on another open design.
How do I ensure the script runs on the appropriate design?
Currently the script uses this snippet:
Set pcbApp = GetObject(,"MGCPCB.Application")
Set pcbDesign = pcbApp.ActiveDocument
You can either use Set pcbApp = application so the script runs internally on the Xpedition PCB script engine or if for some reason you have to run the script externally you can use the FindApplication Method (Utlility object) , see the automation help documentation for an example script.