The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Closing Origin using Python COM
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

schneide

Germany
45 Posts

Posted - 06/06/2018 :  07:10:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 2018 b9.5.0193
Operating System: WIN10

I am trying to open Origin from a Python script, fill a worksheet with data, execute a labtalk script, save the file and close origin.

I do not manage to close origin. Neither by a python command nor by closing out of Origin ("in use by another application").

How can I close Origin from Python, so that it is no longer running actively or in the background?

My Code is
import win32com.client
org = win32com.client.Dispatch("Origin.Application")

org.NewProject

...more code....

org.Save(r"c:\temp\test.opju")

org.Exit
del org



Giselher

YimingChen

1606 Posts

Posted - 07/20/2018 :  4:58:14 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Can you try the following script to close Origin?
org.Exit()


Thank you,

Yiming
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000