AnsweredAssumed Answered

Minimize a pcb application window (ActiveX exception visible false)

Question asked by longjohn on Jul 29, 2020
Latest reply on Aug 1, 2020 by longjohn

Is there a way to minimize a window of a pcb layout application via the automation?


I need to create an application that generate some files from the pcb file.

My app runs some vbs in the background - each vbs generates some files (Gerber,Description Files,PDFs etc).

My app opens the pcb application and the document before it starts to run all the vbs scripts one by one

Each of the vbs starts in:


Dim sComVersion : sComVersion = Scriting.GetEnvVariable("EXP_PROG_ID_VER"): If sComVersion = "" Then sComVersion = "1"

Set app = GetObject(,"MGCPCB.ExpeditionPCBApplication."+sComVersion)

Set docObj = GetLicensedDoc(app) //the function in the PCB Automation Reference


The GetLicensedDoc works with the active document of the application

So my first script is opening the application with the wanted pcb file (gets the path by args)

if i turned the Visible property to False in the first script the GetObject command will throw an exception 

ActiveX component can't create object: 'GetObject''

I thought that i can pass it if i could minimize the app window