Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
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.
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()