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
 "'GLayer' object has no attribute group??"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

irohani

2 Posts

Posted - 05/19/2021 :  9:47:29 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. :Origin2021, 9.8.0.200
Operating System: Win10

Hi. I'm using originpro library from Code Builder in OriginPro2021.

When I ran the command below to make a graph,
"g_layer.group(group = True,begin = 0,end = 12 )"
where "g_layer" is GLayer.

I got an error like this.
"AttributeError: 'GLayer' object has no attribute 'group'"

even though it looks GLayer object DOES have attribute 'group'according to the official document(https://www.originlab.com/python/doc/originpro/classoriginpro_1_1graph_1_1_g_layer.html#af0d6b42c3bb4fb2e42a652f5011f61dc).

Maybe I'm misunderstanding something or maybe not.

If any of you have any idea about the problem above or the way to make a group of layers using programming, please let me know.

Thanks in advance.

Sincerely.

cpyang

USA
1406 Posts

Posted - 05/19/2021 :  10:07:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
GLayer group was added in Origin2021b, so can you install the latest Origin version to try?

You can also use Labtalk for such,


n1=0
n2=12
gl.obj.LT_execute(f'layer -g {n1+1} {n2+1}')


CP
Go to Top of Page

irohani

2 Posts

Posted - 05/20/2021 :  09:41:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Wow, I didn't notice that. Thanks a lot!!
The command worked fine!
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