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 Python
 Create new subfolder with external python
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

TorbenS

Germany
12 Posts

Posted - 01/05/2021 :  09:48:36 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hello everyone,

I try to automate the creation of my graphs. Therefore I use external Python 3.9.1 and the originpro libary and I am already able to create my graphs in origin in this fashion.

Before, I liked to order different graphs in subfolders in the project explorer. It would be very nice if I could create subfolders in the project explorer with external Python. Until now I did not found the correct function which does this for me. But, I am relativly new to Python, so maybe I did not saw it or did not understood it correctly.
So if there is such a function it would be nice if you let me know.

Thanks in advance!
Cheers
Torben

YimingChen

1621 Posts

Posted - 01/05/2021 :  10:19:08 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

Use Python script below in external Python:

import originpro as op
fldr = op.po.RootFolder.Folders.Add('subfolder')
fldr.Activate()



James


Edited by - YimingChen on 01/05/2021 10:47:42 AM
Go to Top of Page

TorbenS

Germany
12 Posts

Posted - 01/06/2021 :  11:10:50 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hey,

the code works perfectly for me!
Thank you.

Torben
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