WinSpec

# -*- coding: utf-8 -*-

import win32api, win32con, win32com.client, os, time, sys from win32com.client import Dispatch as CreateObject

class WinSpec32:

   def __init__(self):
       self.Ex = CreateObject("WinX32.ExpSetup")
       
   # Start PL measurement
   def aquisition(self):
       self.Ex.Start2()
       self.Ex.WaitForExperiment
   
   # Start PL measurement and close window
   def aquisitionWindowClose(self):
       Dx = CreateObject("WinX32.DocFile")
       self.Ex.Start(Dx)
       self.Ex.WaitForExperiment()
       Dx.Close()
   
   # Set the path and file name of the measured data.
   def setPathFilename(self, path, filename):
       ExUI = CreateObject("WinX32.ExpSetupUI")
       ExUI.GetPageObj(1).SetDataFilePathAndName(path, filename)
       time.sleep(0.5)
       del(ExUI)

def main():

   winspec = WinSpec32()

if __name__=='__main__':

   main()

}}

comtypes

WinSpec WinSpec


Last-modified: 2023-02-02 (ÌÚ) 12:37:30