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
 clone temp long/short name in python not working?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

craig_v

United Kingdom
4 Posts

Posted - 04/18/2023 :  11:33:04 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi All

Just wondering if anyone could help out with the renaming of a graph. I have created a clonable template that has built-in long and short names (the same as this https://my.originlab.com/forum/topic.asp?TOPIC_ID=46635 but clonable) and the names work when plotting manually but I'm using the API to automatically plot the graphs I need and when plotting using the API it doesn't work.

I'm using the following:
electron_transport = graph_template_folder + 'Electron_transport_Final.otpu'

wks.plot_cloneable(electron_transport)


c.venables

YimingChen

1618 Posts

Posted - 04/20/2023 :  08:53:22 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Could you try removing .optu from the template name.


electron_transport = graph_template_folder + 'Electron_transport_Final'

wks.plot_cloneable(electron_transport)



James
Go to Top of Page

craig_v

United Kingdom
4 Posts

Posted - 04/20/2023 :  09:52:13 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Sorry i think i phrased this wrong, the long names dont change after plotting as they would when using the template normaly. See below






c.venables
Go to Top of Page

YimingChen

1618 Posts

Posted - 04/20/2023 :  10:43:59 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
It appears currently the plot_cloneable() function can't preset the graph's short/long name. I have created jira ORG-26924 to fix the issue.

As a workaround, you may set the graph name manually with sample code:

gp = op.find_graph()
gp.lname = wks.lname
gp.name = wks.name


Go to Top of Page

craig_v

United Kingdom
4 Posts

Posted - 04/20/2023 :  11:15:12 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Excellent thankyou so much i will give this a try later.

c.venables
Go to Top of Page

YimingChen

1618 Posts

Posted - 05/04/2023 :  2:58:21 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The bug you reported has been resolved in Origin 2023b. Please feel free to upgrade and test the latest version. Thank you.

James
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