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
 All Forums
 Origin Forum for Programming
 Forum for Python
 Saving Origin File From Python

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 HyperlinkUpload FileInsert 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 [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
hrorigin Posted - 04/27/2023 : 12:14:24 PM
Origin Ver. and Service Release: 10.0.0.154 OriginPro 2023
Operating System: Windows 10

Hi!

I was recently trying to access and edit an origin project from Python, but I was having trouble saving the project as any edits made in the script were not visible afterward in the project. The version of the op package that I am running is 1.1.4 in Python 3.10.7. Here is an example script that I have tried to run.

import originpro as op

print(op.open("C:/Path/To/File/myProject.opju""))
op.pe.mkdir("TEST")
print(op.project.save("C:/Path/To/File/myProject.opju"))
op.utils.exit()


The output in the terminal will be:
True
False

So the project is loaded correctly, but fails to save. Any help is greatly appreciated! Thanks in advance.
2   L A T E S T    R E P L I E S    (Newest First)
JacquelineHe Posted - 12/15/2023 : 06:22:20 AM
Hi hrorigin,

Origin 2024 is available!

Some new features are supported, or issues are fixed.

The issue "op.save() supports slash in path" (ORG-27321) has been fixed in this version.

Please download Origin 2024 from the link below, install and try it.
http://www.originlab.com/demodownload.aspx

We are looking for your feedback! Any suggestion will be appreciated!


Thanks
Jacqueline He
OriginLab

YimingChen Posted - 04/27/2023 : 2:34:53 PM
Could you use backslash instead? see script below

import originpro as op

print(op.open(r"C:\Path\To\File\myProject.opju"))
op.pe.mkdir("TEST")
print(op.project.save(r"C:\Path\To\File\myProject.opju"))
op.utils.exit()


James

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