The Origin Forum
File Exchange
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 Forum for Automation Server/COM and LabVIEW
 Closing Origin using Python COM

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
schneide Posted - 06/06/2018 : 07:10:41 AM
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
1   L A T E S T    R E P L I E S    (Newest First)
YimingChen Posted - 07/20/2018 : 4:58:14 PM
Hi,

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


Thank you,

Yiming

The Origin Forum © 2008 Originlab Corporation Go To Top Of Page
Snitz Forums 2000